summaryrefslogtreecommitdiffstats
path: root/clang/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
commit026bcde14b17595782b2bcb95138eee1d077c3ee (patch)
treebd85aab2a4c3020aead3653d4338cfb7f289b62e /clang/test/Sema/struct-decl.c
parenta02e45ca19ad664d8d99f7c2647a3d49b855b2d9 (diff)
downloadbcm5719-llvm-026bcde14b17595782b2bcb95138eee1d077c3ee.tar.gz
bcm5719-llvm-026bcde14b17595782b2bcb95138eee1d077c3ee.zip
fix TryToFixInvalidVariablyModifiedType to reject negative array sizes
llvm-svn: 63557
Diffstat (limited to 'clang/test/Sema/struct-decl.c')
-rw-r--r--clang/test/Sema/struct-decl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Sema/struct-decl.c b/clang/test/Sema/struct-decl.c
index cacd8476582..7d7961b16c8 100644
--- a/clang/test/Sema/struct-decl.c
+++ b/clang/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}}
};
OpenPOWER on IntegriCloud