summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/goto.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-24 14:35:16 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-24 14:35:16 +0000
commitd7d7e0d3dffd7c117ea8bbe3697bb91a5a0ab7ab (patch)
tree73fc606f90f3f7e98ba9f52e22f02a8e1fcf29fb /clang/test/SemaCXX/goto.cpp
parent084e83dfe7e4e531fda9abefa5396c643ffc2a36 (diff)
downloadbcm5719-llvm-d7d7e0d3dffd7c117ea8bbe3697bb91a5a0ab7ab.tar.gz
bcm5719-llvm-d7d7e0d3dffd7c117ea8bbe3697bb91a5a0ab7ab.zip
Minor fix in the injection of labels, since we want to look at the redeclaration context of each declaration in the identifier chain. Should fix Linux self-host
llvm-svn: 128210
Diffstat (limited to 'clang/test/SemaCXX/goto.cpp')
-rw-r--r--clang/test/SemaCXX/goto.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/goto.cpp b/clang/test/SemaCXX/goto.cpp
index b2b1e6f391f..d8d5ec51f6e 100644
--- a/clang/test/SemaCXX/goto.cpp
+++ b/clang/test/SemaCXX/goto.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wall -fblocks %s
// PR9463
double *end;
@@ -57,7 +57,7 @@ void h2(int end) {
end:
::end = 0;
}
- end:
+ end: // expected-warning{{unused label 'end'}}
end = 1;
}
@@ -92,4 +92,14 @@ namespace PR9495 {
}
}
+extern "C" {
+ void exit(int);
+}
+void f() {
+ {
+ goto exit;
+ }
+ exit:
+ return;
+}
OpenPOWER on IntegriCloud