aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/enum.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-13 06:24:26 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-13 06:24:26 +0000
commita131d0fc0af9f79c90e7654231041b2495d355a9 (patch)
treeaaed8f10227cce77b594df588d2c05b50dc7cb0b /test/SemaCXX/enum.cpp
parent44eac33ae12df384f3f002102f919f603bee330f (diff)
Complain when an unnamed enumeration has no enumerations (in
C++). Fixes PR7466. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/enum.cpp')
-rw-r--r--test/SemaCXX/enum.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp
index 3a66617e0d..0690ead250 100644
--- a/test/SemaCXX/enum.cpp
+++ b/test/SemaCXX/enum.cpp
@@ -81,3 +81,7 @@ namespace PR7051 {
e |= 1; // expected-error{{assigning to 'PR7051::E' from incompatible type 'int'}}
}
}
+
+// PR7466
+enum { }; // expected-warning{{declaration does not declare anything}}
+typedef enum { }; // expected-warning{{typedef requires a name}}