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