auto x((unknown));
int& y = x;
would crash because we were not flagging 'x' as an invalid declaration here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165675
91177308-0d34-0410-b5e6-
96231b3b80d8
}
if (ParseExpressionList(Exprs, CommaLocs)) {
+ Actions.ActOnInitializerError(ThisDecl);
SkipUntil(tok::r_paren);
if (getLangOpts().CPlusPlus && D.getCXXScopeSpec().isSet()) {
template void h<double>();
}
#endif
+
+auto fail((unknown)); // expected-error{{use of undeclared identifier 'unknown'}}
+int& crash = fail;
}
namespace PR6948 {
- template<typename T> class X;
+ template<typename T> class X; // expected-note{{template is declared here}}
void f() {
- X<char> str (read_from_file()); // expected-error{{use of undeclared identifier 'read_from_file'}}
+ X<char> str (read_from_file()); // expected-error{{use of undeclared identifier 'read_from_file'}} \
+ expected-error{{implicit instantiation of undefined template 'PR6948::X<char>'}}
}
}