aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/enum.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-12-04 00:07:04 +0000
committerJohn McCall <rjmccall@apple.com>2009-12-04 00:07:04 +0000
commit5023437f5a897d513c08ddf64b74d688252a23e5 (patch)
treebe9673ad8f57e11909cd09cd8be6f1bc1cf60274 /test/SemaCXX/enum.cpp
parentbcd7f9f8cb2f1b78e8ad991677a4364044e1deb7 (diff)
When recovering from an invalid forward reference to an enum type in C++,
create the enum type in the same scope as you would a record type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/enum.cpp')
-rw-r--r--test/SemaCXX/enum.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp
index db256812ab..1aba107a69 100644
--- a/test/SemaCXX/enum.cpp
+++ b/test/SemaCXX/enum.cpp
@@ -25,13 +25,13 @@ void bar() {
/// PR3688
struct s1 {
- enum e1 (*bar)(void); // expected-error{{ISO C++ forbids forward references to 'enum' types}} expected-note{{forward declaration of 'enum s1::e1'}}
+ enum e1 (*bar)(void); // expected-error{{ISO C++ forbids forward references to 'enum' types}}
};
enum e1 { YES, NO };
static enum e1 badfunc(struct s1 *q) {
- return q->bar(); // expected-error{{calling function with incomplete return type 'enum s1::e1'}}
+ return q->bar();
}
enum e2; // expected-error{{ISO C++ forbids forward references to 'enum' types}}