aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/enum.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-08-19 04:39:37 +0000
committerEli Friedman <eli.friedman@gmail.com>2010-08-19 04:39:37 +0000
commit34fd628d22f54baddf30cf80c401b2f862a31b23 (patch)
tree4d2bb914eb0047c49b2fea6ffdf9dead74d40334 /test/SemaCXX/enum.cpp
parenta2fc0f54d69461795433d42c46de337850be15cd (diff)
Fix for PR7911 and PR7921: make isIntegralOrEnumerationType return false
for incomplete enum types. An incomplete enum can't really be treated as an "integral or enumeration" type, and the incorrect treatment leads to bad behavior for many callers. This makes isIntegralOrEnumerationType equivalent to isIntegerType; I think we should globally replace the latter with the former; thoughts? git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/enum.cpp')
-rw-r--r--test/SemaCXX/enum.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/enum.cpp b/test/SemaCXX/enum.cpp
index 0690ead250..1dc55e3916 100644
--- a/test/SemaCXX/enum.cpp
+++ b/test/SemaCXX/enum.cpp
@@ -85,3 +85,8 @@ namespace PR7051 {
// PR7466
enum { }; // expected-warning{{declaration does not declare anything}}
typedef enum { }; // expected-warning{{typedef requires a name}}
+
+// PR7921
+enum PR7921E {
+ PR7921V = (PR7921E)(123) // expected-error {{expression is not an integer constant expression}}
+};