diff options
Diffstat (limited to 'test/SemaCXX/i-c-e-cxx.cpp')
-rw-r--r-- | test/SemaCXX/i-c-e-cxx.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/SemaCXX/i-c-e-cxx.cpp b/test/SemaCXX/i-c-e-cxx.cpp index 785ea0e..b7db907 100644 --- a/test/SemaCXX/i-c-e-cxx.cpp +++ b/test/SemaCXX/i-c-e-cxx.cpp @@ -14,3 +14,10 @@ void f() { int array[value]; } } + +int a() { + const int t=t; // expected-note {{subexpression not valid}} + switch(1) { + case t:; // expected-error {{not an integer constant expression}} + } +} |