Skip to content

Commit e3387c6

Browse files
committed
[IDE] ExprContextAnalyzer::Analyze() doesn't need to return success
1 parent 758ba5e commit e3387c6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5376,10 +5376,10 @@ class ExprContextAnalyzer {
53765376
Context(DC->getASTContext()), PossibleTypes(PossibleTypes),
53775377
PossibleNames(PossibleNames), PossibleCallees(PossibleCallees) {}
53785378

5379-
bool Analyze() {
5379+
void Analyze() {
53805380
// We cannot analyze without target.
53815381
if (!ParsedExpr)
5382-
return false;
5382+
return;
53835383

53845384
ExprParentFinder Finder(ParsedExpr, [](ASTWalker::ParentTy Node,
53855385
ASTWalker::ParentTy Parent) {
@@ -5432,7 +5432,7 @@ class ExprContextAnalyzer {
54325432
DC->walkContext(Finder);
54335433

54345434
if (Finder.Ancestors.empty())
5435-
return false;
5435+
return;
54365436

54375437
auto &P = Finder.Ancestors.back();
54385438
if (auto Parent = P.getAsExpr()) {
@@ -5444,7 +5444,6 @@ class ExprContextAnalyzer {
54445444
} else if (auto Parent = P.getAsPattern()) {
54455445
analyzePattern(Parent);
54465446
}
5447-
return (!PossibleTypes.empty() || !PossibleNames.empty());
54485447
}
54495448
};
54505449

0 commit comments

Comments
 (0)