Fix an assertion failure when code completing an auto variable's initialiser.

llvm-svn: 160857
This commit is contained in:
Peter Collingbourne 2012-07-27 12:56:09 +00:00
parent a2dcac1095
commit 6b4fdc25d3
2 changed files with 3 additions and 0 deletions

View File

@ -1580,6 +1580,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(Declarator &D,
if (Tok.is(tok::code_completion)) {
Actions.CodeCompleteInitializer(getCurScope(), ThisDecl);
Actions.FinalizeDeclaration(ThisDecl);
cutOffParsing();
return 0;
}

View File

@ -0,0 +1,2 @@
// RUN: %clang_cc1 -std=c++11 -code-completion-at=%s:2:9 %s
auto i =