// isn't strictly lexical, which breaks name lookup. Be careful to insert
// the label at the appropriate place in the identifier chain.
for (I = IdResolver.begin(D->getDeclName()); I != IEnd; ++I) {
- DeclContext *IDC = (*I)->getLexicalDeclContext();
+ DeclContext *IDC = (*I)->getLexicalDeclContext()->getRedeclContext();
if (IDC == CurContext) {
if (!S->isDeclScope(*I))
continue;
-// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wall -fblocks %s
// PR9463
double *end;
end:
::end = 0;
}
- end:
+ end: // expected-warning{{unused label 'end'}}
end = 1;
}
}
}
+extern "C" {
+ void exit(int);
+}
+void f() {
+ {
+ goto exit;
+ }
+ exit:
+ return;
+}