aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/enum.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-03 03:30:58 +0000
committerChris Lattner <sabre@nondot.org>2008-07-03 03:30:58 +0000
commit14943b90d99d6f695a4aee70c5d26086639261c5 (patch)
tree76f1ace176ce8fe0a5c50623f26df1e416e05f57 /test/Sema/enum.c
parent90a929e240db04a464ee84ff1a746c6f826d5c25 (diff)
Fix PR2020 by recovering by defining an anonymous enum, instead of recovering
by filling in the body of a union with enum constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53069 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r--test/Sema/enum.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c
index 890b6a505b..2a20d3d7d5 100644
--- a/test/Sema/enum.c
+++ b/test/Sema/enum.c
@@ -28,3 +28,8 @@ int test2(int i)
{
ve + i;
}
+
+// PR2020
+union u0; // expected-error {{previous use is here}}
+enum u0 { U0A }; // expected-error {{error: use of 'u0' with tag type that does not match previous declaration}}
+