diff options
author | Chris Lattner <sabre@nondot.org> | 2006-11-05 23:47:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-11-05 23:47:55 +0000 |
commit | 33ad2cacc9acc4a71df3521e08eb8314933bb774 (patch) | |
tree | e67d728c45151a90c47d319b2047d34954f86b6b /clang/test/Parser/bad-control.c | |
parent | c19ddcd6dd0ac5378d3356ab7f49b634a8396fca (diff) | |
download | bcm5719-llvm-33ad2cacc9acc4a71df3521e08eb8314933bb774.tar.gz bcm5719-llvm-33ad2cacc9acc4a71df3521e08eb8314933bb774.zip |
Make Scope keep track of the kind of scope it is. Properly scope loop and
switch statements. Make break/continue check that they are inside of an
appropriate control-flow construct. This implements Parser/bad-control.c.
llvm-svn: 39136
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 00000000000..7a092692307 --- /dev/null +++ b/clang/test/Parser/bad-control.c @@ -0,0 +1,9 @@ +/* RUN: clang -parse-noop %s 2>&1 | grep error: | wc -l | grep 2 +*/ +int foo() { +break; +} + +int foo2() { +continue; +} |