Skip to content

Commit 2dac5b2

Browse files
committed
Strip an unused DiagnosticEngine param
1 parent 6d34fd9 commit 2dac5b2

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

lib/IDE/Refactoring.cpp

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4851,8 +4851,7 @@ class ClassifiedBlock {
48514851
Nodes.addNode(Node);
48524852
}
48534853

4854-
void addBinding(const ClassifiedCondition &FromCondition,
4855-
DiagnosticEngine &DiagEngine) {
4854+
void addBinding(const ClassifiedCondition &FromCondition) {
48564855
auto *P = FromCondition.BindPattern;
48574856
if (!P)
48584857
return;
@@ -4866,13 +4865,9 @@ class ClassifiedBlock {
48664865
ParamPatternBindings[FromCondition.Subject].push_back(P);
48674866
}
48684867

4869-
void addAllBindings(const ClassifiedCallbackConditions &FromConditions,
4870-
DiagnosticEngine &DiagEngine) {
4871-
for (auto &Entry : FromConditions) {
4872-
addBinding(Entry.second, DiagEngine);
4873-
if (DiagEngine.hadAnyError())
4874-
return;
4875-
}
4868+
void addAllBindings(const ClassifiedCallbackConditions &FromConditions) {
4869+
for (auto &Entry : FromConditions)
4870+
addBinding(Entry.second);
48764871
}
48774872
};
48784873

@@ -5309,9 +5304,7 @@ struct CallbackClassifier {
53095304
// comments.
53105305
CurrentBlock->addPossibleCommentLoc(Statement->getStartLoc());
53115306

5312-
ThenBlock->addAllBindings(CallbackConditions, DiagEngine);
5313-
if (DiagEngine.hadAnyError())
5314-
return;
5307+
ThenBlock->addAllBindings(CallbackConditions);
53155308

53165309
// TODO: Handle nested ifs
53175310
setNodes(ThenBlock, ElseBlock, std::move(ThenNodesToPrint));
@@ -5400,9 +5393,7 @@ struct CallbackClassifier {
54005393
Block->addPossibleCommentLoc(SS->getRBraceLoc());
54015394

54025395
setNodes(Block, OtherBlock, std::move(SuccessNodes));
5403-
Block->addBinding(*CC, DiagEngine);
5404-
if (DiagEngine.hadAnyError())
5405-
return;
5396+
Block->addBinding(*CC);
54065397
}
54075398
// Mark this switch statement as having been transformed.
54085399
HandledSwitches.insert(SS);

0 commit comments

Comments
 (0)