aboutsummaryrefslogtreecommitdiff
path: root/clang/test/AST/ByteCode/cxx11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/AST/ByteCode/cxx11.cpp')
-rw-r--r--clang/test/AST/ByteCode/cxx11.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/AST/ByteCode/cxx11.cpp b/clang/test/AST/ByteCode/cxx11.cpp
index 378702f..8a125a4 100644
--- a/clang/test/AST/ByteCode/cxx11.cpp
+++ b/clang/test/AST/ByteCode/cxx11.cpp
@@ -289,3 +289,16 @@ namespace OverlappingStrings {
}
+
+namespace NonConstLocal {
+ int a() {
+ const int t=t; // both-note {{declared here}}
+
+ switch(1) {
+ case t:; // both-note {{initializer of 't' is not a constant expression}} \
+ // both-error {{case value is not a constant expression}}
+ }
+ }
+}
+
+