[CodeCompletion] Fix assertion failure with curried function

Remove some untested broken code that I am fairly sure could never find
the correct FunctionDecl.

rdar://problem/22688199

Swift SVN r32000
This commit is contained in:
Ben Langmuir
2015-09-16 18:03:32 +00:00
parent 42c470ad73
commit 3fdfd1a05a
2 changed files with 13 additions and 8 deletions

View File

@@ -3332,11 +3332,6 @@ void CodeCompletionCallbacksImpl::doneParsing() {
case CompletionKind::PostfixExprParen: {
Lookup.setHaveLParen(true);
ValueDecl *VD = nullptr;
if (auto *AE = dyn_cast<ApplyExpr>(ParsedExpr)) {
if (auto *DRE = dyn_cast<DeclRefExpr>(AE->getFn()))
VD = DRE->getDecl();
}
CodeCompletionTypeContextAnalyzer TypeAnalyzer(CurDeclContext,
CodeCompleteTokenExpr);
llvm::SmallVector<Type, 2> PossibleTypes;
@@ -3344,7 +3339,7 @@ void CodeCompletionCallbacksImpl::doneParsing() {
Lookup.setExpectedTypes(PossibleTypes);
}
if (ExprType)
Lookup.getValueExprCompletions(*ExprType, VD);
Lookup.getValueExprCompletions(*ExprType);
if (!Lookup.FoundFunctionCalls ||
(Lookup.FoundFunctionCalls &&
Lookup.FoundFunctionsWithoutFirstKeyword)) {