summaryrefslogtreecommitdiffstats
path: root/clang/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
commit4202c3453928128d541282b25efbb7605c9f6983 (patch)
tree38c9c368612d533582b129a7aeb07f5e2970fa16 /clang/test/SemaCXX/enum.cpp
parentfc83c60755553573567590c84dd73918b0632503 (diff)
downloadbcm5719-llvm-4202c3453928128d541282b25efbb7605c9f6983.tar.gz
bcm5719-llvm-4202c3453928128d541282b25efbb7605c9f6983.zip
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? llvm-svn: 111512
Diffstat (limited to 'clang/test/SemaCXX/enum.cpp')
-rw-r--r--clang/test/SemaCXX/enum.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/enum.cpp b/clang/test/SemaCXX/enum.cpp
index 0690ead2508..1dc55e39162 100644
--- a/clang/test/SemaCXX/enum.cpp
+++ b/clang/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}}
+};
OpenPOWER on IntegriCloud