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 | 04ca25276245fbcf0a353e965de476080fa01b99 (patch) | |
tree | ac6a94fcc2e9a211258c5ba0ad7f0a2e9b9f890a /test/Sema/enum.c | |
parent | 2ea020c8bbcc4ad18f35fd2c1edfea56ad44eae3 (diff) |
Fix a couple of nasty bugs involving negative enum constants. <rdar://problem/10760113>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149965 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r-- | test/Sema/enum.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c index a95efb035d..fc2b491f5c 100644 --- a/test/Sema/enum.c +++ b/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]; |