]> granicus.if.org Git - clang/commitdiff
Add test for a construct we currently reject, constant-evaluating a load from a const...
authorEli Friedman <eli.friedman@gmail.com>
Wed, 11 Apr 2012 23:32:29 +0000 (23:32 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Wed, 11 Apr 2012 23:32:29 +0000 (23:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154564 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/const-eval.c

index a9c8806b5d99b52f609ac794f15cdcddd0b263cb..f1c0485bc1d44a1dea588ce6798e4bcdafe2b614 100644 (file)
@@ -117,3 +117,7 @@ EVAL_EXPR(42, __builtin_constant_p(pr11391.f = 1))
 float varfloat;
 const float constfloat = 0;
 EVAL_EXPR(43, varfloat && constfloat) // expected-error {{must have a constant size}}
+
+// <rdar://problem/11205586>
+// (Make sure we continue to reject this.)
+EVAL_EXPR(44, "x"[0]); // expected-error {{variable length array}}