If a switch condition is constant, don't warn about missing enum cases.
If a switch condition is constant, warn if there's no case for it.
Constant switch conditions do come up in reasonable template code.
llvm-svn: 104010
diff --git a/clang/test/SemaCXX/i-c-e-cxx.cpp b/clang/test/SemaCXX/i-c-e-cxx.cpp
index e8275d4..9672a42 100644
--- a/clang/test/SemaCXX/i-c-e-cxx.cpp
+++ b/clang/test/SemaCXX/i-c-e-cxx.cpp
@@ -17,7 +17,7 @@
int a() {
const int t=t; // expected-note {{subexpression not valid}}
- switch(1) {
+ switch(1) { // expected-warning {{no case matching constant switch condition '1'}}
case t:; // expected-error {{not an integer constant expression}}
}
}