When constant-folding, don't look at the initializer of a global const variable
if it's marked as weak: that definition may not end up being used.

llvm-svn: 143496
diff --git a/clang/test/Sema/const-eval.c b/clang/test/Sema/const-eval.c
index df56b06..c984f5b 100644
--- a/clang/test/Sema/const-eval.c
+++ b/clang/test/Sema/const-eval.c
@@ -95,3 +95,7 @@
 
 union u { int a; char b[4]; };
 char c = ((union u)(123456)).b[0]; // expected-error {{not a compile-time constant}}
+
+extern const int weak_int __attribute__((weak));
+const int weak_int = 42;
+int weak_int_test = weak_int; // expected-error {{not a compile-time constant}}