summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
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
commitc811d8f055feeb5366a2404167573fc267793895 (patch)
tree88c9b6ac28e7a84a9a798ba8b11c3c98929a537b /clang/test/Sema
parent5d196e64f1aea4136c064999c6541813761153a5 (diff)
downloadbcm5719-llvm-c811d8f055feeb5366a2404167573fc267793895.tar.gz
bcm5719-llvm-c811d8f055feeb5366a2404167573fc267793895.zip
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. llvm-svn: 61034
Diffstat (limited to 'clang/test/Sema')
-rw-r--r--clang/test/Sema/enum.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/enum.c b/clang/test/Sema/enum.c
index 5782a43242e..4c24b580d8f 100644
--- a/clang/test/Sema/enum.c
+++ b/clang/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}}
+}
OpenPOWER on IntegriCloud