diff options
Diffstat (limited to 'clang/test/Parser/bad-control.c')
-rw-r--r-- | clang/test/Parser/bad-control.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Parser/bad-control.c b/clang/test/Parser/bad-control.c new file mode 100644 index 0000000..480d81b --- /dev/null +++ b/clang/test/Parser/bad-control.c @@ -0,0 +1,9 @@ +/* RUN: %clang_cc1 -fsyntax-only -verify %s +*/ +void foo() { + break; /* expected-error {{'break' statement not in loop or switch statement}} */ +} + +void foo2() { + continue; /* expected-error {{'continue' statement not in loop statement}} */ +} |