summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/array-init.c
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-09-01 14:47:06 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-09-01 14:47:06 +0000
commitfeac637074515d867def87be86cd54bc0d3f8f9b (patch)
tree43b99fd50d4cbad3e66bfd13884f1ca9572035b0 /clang/test/Sema/array-init.c
parent4b31a2a7cea770b51a97ca3801b154ce46efb5f9 (diff)
downloadbcm5719-llvm-feac637074515d867def87be86cd54bc0d3f8f9b.tar.gz
bcm5719-llvm-feac637074515d867def87be86cd54bc0d3f8f9b.zip
make CheckArithmeticConstantExpression() aware of &foo and pointers
llvm-svn: 55607
Diffstat (limited to 'clang/test/Sema/array-init.c')
-rw-r--r--clang/test/Sema/array-init.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c
index 24a0070c1fd..7d6e6c6d281 100644
--- a/clang/test/Sema/array-init.c
+++ b/clang/test/Sema/array-init.c
@@ -222,3 +222,16 @@ struct {int:5;} x[] = {6}; //expected-error{{initializer for aggregate with no e
struct {int a; int:5;} noNamedImplicit[] = {1,2,3};
int noNamedImplicitCheck[sizeof(noNamedImplicit) == 3 * sizeof(*noNamedImplicit) ? 1 : -1];
+
+// ptrs are constant
+struct soft_segment_descriptor {
+ int ssd_base;
+};
+static int dblfault_tss;
+
+union uniao { int ola; } xpto[1];
+
+struct soft_segment_descriptor gdt_segs[] = {
+ {(int) &dblfault_tss},
+ { (int)xpto},
+};
OpenPOWER on IntegriCloud