diff options
author | David Blaikie <dblaikie@gmail.com> | 2012-10-10 23:15:05 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2012-10-10 23:15:05 +0000 |
commit | 3ea19c8307932655092235b57f04a5e6658bbc46 (patch) | |
tree | 2e504fcbc9706f4822b0159b8530f03acde93514 /lib/Parse/ParseDecl.cpp | |
parent | b9966bd81878c6627d702368d6c4a8bc62bc01ac (diff) |
Fix a crash-on-invalid when parsing a reference to an invalid auto declaration
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
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 52bd4166bb..3ef4f38ad0 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -1680,6 +1680,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(Declarator &D, } if (ParseExpressionList(Exprs, CommaLocs)) { + Actions.ActOnInitializerError(ThisDecl); SkipUntil(tok::r_paren); if (getLangOpts().CPlusPlus && D.getCXXScopeSpec().isSet()) { |