forked from OSchip/llvm-project
Fix an assertion failure when code completing an auto variable's initialiser.
llvm-svn: 160857
This commit is contained in:
parent
a2dcac1095
commit
6b4fdc25d3
|
@ -1580,6 +1580,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(Declarator &D,
|
||||||
|
|
||||||
if (Tok.is(tok::code_completion)) {
|
if (Tok.is(tok::code_completion)) {
|
||||||
Actions.CodeCompleteInitializer(getCurScope(), ThisDecl);
|
Actions.CodeCompleteInitializer(getCurScope(), ThisDecl);
|
||||||
|
Actions.FinalizeDeclaration(ThisDecl);
|
||||||
cutOffParsing();
|
cutOffParsing();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
// RUN: %clang_cc1 -std=c++11 -code-completion-at=%s:2:9 %s
|
||||||
|
auto i =
|
Loading…
Reference in New Issue