[cfe-commits] r160857 - in /cfe/trunk: lib/Parse/ParseDecl.cpp test/CodeCompletion/auto.cpp
Peter Collingbourne
peter at pcc.me.uk
Fri Jul 27 05:56:09 PDT 2012
Author: pcc
Date: Fri Jul 27 07:56:09 2012
New Revision: 160857
URL: http://llvm.org/viewvc/llvm-project?rev=160857&view=rev
Log:
Fix an assertion failure when code completing an auto variable's initialiser.
Added:
cfe/trunk/test/CodeCompletion/auto.cpp
Modified:
cfe/trunk/lib/Parse/ParseDecl.cpp
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=160857&r1=160856&r2=160857&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Fri Jul 27 07:56:09 2012
@@ -1580,6 +1580,7 @@
if (Tok.is(tok::code_completion)) {
Actions.CodeCompleteInitializer(getCurScope(), ThisDecl);
+ Actions.FinalizeDeclaration(ThisDecl);
cutOffParsing();
return 0;
}
Added: cfe/trunk/test/CodeCompletion/auto.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeCompletion/auto.cpp?rev=160857&view=auto
==============================================================================
--- cfe/trunk/test/CodeCompletion/auto.cpp (added)
+++ cfe/trunk/test/CodeCompletion/auto.cpp Fri Jul 27 07:56:09 2012
@@ -0,0 +1,2 @@
+// RUN: %clang_cc1 -std=c++11 -code-completion-at=%s:2:9 %s
+auto i =
More information about the cfe-commits
mailing list