diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 3176e97f130184ece0e1a21352c8124cc83ff24a (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /test/Sema/enum.c | |
parent | 1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (diff) | |
download | FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.zip FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.tar.gz |
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r-- | test/Sema/enum.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c index fc2b491..3546bfe 100644 --- a/test/Sema/enum.c +++ b/test/Sema/enum.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic +// RUN: %clang_cc1 -triple %itanium_abi_triple %s -fsyntax-only -verify -pedantic enum e {A, B = 42LL << 32, // expected-warning {{ISO C restricts enumerator values to range of 'int'}} C = -4, D = 12456 }; @@ -119,3 +119,7 @@ void crash(enum E* e) // expected-warning {{declaration of 'enum E' will not be typedef enum { NegativeShort = (short)-1 } NegativeShortEnum; int NegativeShortTest[NegativeShort == -1 ? 1 : -1]; + +// PR24610 +enum Color { Red, Green, Blue }; // expected-note{{previous use is here}} +typedef struct Color NewColor; // expected-error {{use of 'Color' with tag type that does not match previous declaration}} |