summaryrefslogtreecommitdiff
path: root/test/Sema/struct-decl.c
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2009-02-02 22:32:08 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2009-02-02 22:32:08 +0000
commit1dfa6e15cba39f27a438d63837435596e58af1c1 (patch)
tree738525588a18ffa898ffaa39fd6edd8b3e11693d /test/Sema/struct-decl.c
parent2b1e0039a1937e3df59b5c99bcf4746360db3441 (diff)
downloadclang-1dfa6e15cba39f27a438d63837435596e58af1c1.tar.gz
fix TryToFixInvalidVariablyModifiedType to reject negative array sizes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63557 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/struct-decl.c')
-rw-r--r--test/Sema/struct-decl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Sema/struct-decl.c b/test/Sema/struct-decl.c
index cacd847658..7d7961b16c 100644
--- a/test/Sema/struct-decl.c
+++ b/test/Sema/struct-decl.c
@@ -7,4 +7,5 @@ struct bar {
struct foo {
char name[(int)&((struct bar *)0)->n];
+ char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{fields must have a constant size}}
};