diff options
Diffstat (limited to 'clang/test/SemaCXX/constant-expression-cxx14.cpp')
| -rw-r--r-- | clang/test/SemaCXX/constant-expression-cxx14.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/constant-expression-cxx14.cpp b/clang/test/SemaCXX/constant-expression-cxx14.cpp index bea90ff..1fc6e5ec 100644 --- a/clang/test/SemaCXX/constant-expression-cxx14.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx14.cpp @@ -1450,3 +1450,9 @@ namespace GH149500 { unsigned int * p = &(*(unsigned int *)0x400); static const void *q = &(*(const struct sysrq_key_op *)0); } + +constexpr bool missingCase() { + switch (1) { + 1u: return false; // expected-error {{expected 'case' keyword before expression}} + } +} |
