diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-07 04:34:38 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-07 04:34:38 +0000 |
commit | 2beed114ba03a89dad892c70b8df959a7c014dde (patch) | |
tree | b0a3300849be9e40e098bd36034cba7aca95e9f9 /clang/test/Sema/enum.c | |
parent | 987dbdb56e508f2eafcb0824a57533d1e808b0eb (diff) | |
download | bcm5719-llvm-2beed114ba03a89dad892c70b8df959a7c014dde.tar.gz bcm5719-llvm-2beed114ba03a89dad892c70b8df959a7c014dde.zip |
Fix a couple of nasty bugs involving negative enum constants. <rdar://problem/10760113>.
llvm-svn: 149965
Diffstat (limited to 'clang/test/Sema/enum.c')
-rw-r--r-- | clang/test/Sema/enum.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Sema/enum.c b/clang/test/Sema/enum.c index a95efb035db..fc2b491f5c3 100644 --- a/clang/test/Sema/enum.c +++ b/clang/test/Sema/enum.c @@ -117,3 +117,5 @@ void crash(enum E* e) // expected-warning {{declaration of 'enum E' will not be PR8694(e); // expected-warning {{incompatible pointer types passing 'enum E *' to parameter of type 'int *'}} } +typedef enum { NegativeShort = (short)-1 } NegativeShortEnum; +int NegativeShortTest[NegativeShort == -1 ? 1 : -1]; |