summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-30 20:35:01 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-30 20:35:01 +0000
commit0be628ff646a87fc691622633d94542eb7da078c (patch)
tree6e5ea9a7d0d3f3d583012cb37dcd557efc3fe839 /clang/test
parent3ca9a9b59cd21673930ee0a5b40ebf914537d7f8 (diff)
downloadbcm5719-llvm-0be628ff646a87fc691622633d94542eb7da078c.tar.gz
bcm5719-llvm-0be628ff646a87fc691622633d94542eb7da078c.zip
Fix a thinko that caused us not to compute __builtin_offset as a
constant expression in C. llvm-svn: 102762
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/offsetof.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/offsetof.c b/clang/test/Sema/offsetof.c
index cf88465e535..5026193943f 100644
--- a/clang/test/Sema/offsetof.c
+++ b/clang/test/Sema/offsetof.c
@@ -62,3 +62,6 @@ struct has_bitfields {
};
int test3 = __builtin_offsetof(struct has_bitfields, j); // expected-error{{cannot compute offset of bit-field 'j'}}
+
+typedef struct Array { int array[1]; } Array;
+int test4 = __builtin_offsetof(Array, array);
OpenPOWER on IntegriCloud