continue;
}
+ // Ignore invalid decls; they'll just confuse the code later.
+ if (Var->isInvalidDecl())
+ continue;
+
if (!Var->hasLocalStorage()) {
Diag(C->Loc, diag::err_capture_non_automatic_variable) << C->Id;
Diag(Var->getLocation(), diag::note_previous_decl) << C->Id;
template void nested2(int); // ok
template void nested2(int, int); // expected-note {{in instantiation of}}
}
+
+namespace PR13860 {
+ void foo() {
+ auto x = PR13860UndeclaredIdentifier(); // expected-error {{use of undeclared identifier 'PR13860UndeclaredIdentifier'}}
+ auto y = [x]() { };
+ static_assert(sizeof(y), "");
+ }
+}