diff options
author | Vedant Kumar <vsk@apple.com> | 2015-09-02 03:27:15 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2015-09-02 03:27:15 +0000 |
commit | 2ea5393ca10b785cfd3a26102479478ca053f3aa (patch) | |
tree | 45efd0c5a04845291f78169799961159d9d53a40 /clang/test/Sema/enum.c | |
parent | cd5d761c3e8e83f45a3227a564a9fd6adf5dc10e (diff) | |
download | bcm5719-llvm-2ea5393ca10b785cfd3a26102479478ca053f3aa.tar.gz bcm5719-llvm-2ea5393ca10b785cfd3a26102479478ca053f3aa.zip |
[Sema] Avoid crash on tag-type mismatch (Fixes PR24610)
Differential Revision: http://reviews.llvm.org/D12444
llvm-svn: 246618
Diffstat (limited to 'clang/test/Sema/enum.c')
-rw-r--r-- | clang/test/Sema/enum.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/enum.c b/clang/test/Sema/enum.c index fc2b491f5c3..13b88c948c8 100644 --- a/clang/test/Sema/enum.c +++ b/clang/test/Sema/enum.c @@ -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}} |