aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/enum.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-06-22 14:26:35 +0000
committerDouglas Gregor <dgregor@apple.com>2010-06-22 14:26:35 +0000
commitf3a7b7cfacf802db5458874842b71a74845f0023 (patch)
treee036522d5905c77fff431c1e48270498b13b4408 /test/SemaCXX/enum.cpp
parent661c36b057d07c76c16fee95c01d96f3956265be (diff)
In C++, allow a declaration of an enum to follow a definition of that
enum as a GNU extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106540 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/enum.cpp')
-rw-r--r--test/SemaCXX/enum.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp
index bfb5784dd1..3a66617e0d 100644
--- a/test/SemaCXX/enum.cpp
+++ b/test/SemaCXX/enum.cpp
@@ -1,9 +1,11 @@
// RUN: %clang_cc1 -fsyntax-only -pedantic -std=c++98 -verify -triple x86_64-apple-darwin %s
-enum E {
+enum E { // expected-note{{previous definition is here}}
Val1,
Val2
};
+enum E; // expected-warning{{redeclaration of already-defined enum 'E' is a GNU extension}}
+
int& enumerator_type(int);
float& enumerator_type(E);