aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/enum.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-12-15 16:32:14 +0000
committerDouglas Gregor <dgregor@apple.com>2008-12-15 16:32:14 +0000
commit7df7b6bb800e1987951285ea192e4f347e1b603a (patch)
tree6043f6cfb34b0d020970b2ca82ced64f3f5b6861 /test/Sema/enum.c
parentf9d1e4bc60690386e0b2c658d707b75a77717a9c (diff)
Create new EnumDecl nodes for redeclarations of enums, linking them
together in the same way that we link RecordDecl/CXXRecordDecl nodes. Unify ActOnTag and ActOnTagStruct. Fixes PR clang/2753. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r--test/Sema/enum.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c
index 5782a43242..4c24b580d8 100644
--- a/test/Sema/enum.c
+++ b/test/Sema/enum.c
@@ -58,3 +58,9 @@ enum e0 { // expected-note {{previous definition is here}}
// PR3173
enum { PR3173A, PR3173B = PR3173A+50 };
+
+// PR2753
+void foo() {
+ enum xpto; // expected-warning{{ISO C forbids forward references to 'enum' types}}
+ enum xpto; // expected-warning{{ISO C forbids forward references to 'enum' types}}
+}