@@ -4851,8 +4851,7 @@ class ClassifiedBlock {
4851
4851
Nodes.addNode (Node);
4852
4852
}
4853
4853
4854
- void addBinding (const ClassifiedCondition &FromCondition,
4855
- DiagnosticEngine &DiagEngine) {
4854
+ void addBinding (const ClassifiedCondition &FromCondition) {
4856
4855
auto *P = FromCondition.BindPattern ;
4857
4856
if (!P)
4858
4857
return ;
@@ -4866,13 +4865,9 @@ class ClassifiedBlock {
4866
4865
ParamPatternBindings[FromCondition.Subject ].push_back (P);
4867
4866
}
4868
4867
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 );
4876
4871
}
4877
4872
};
4878
4873
@@ -5309,9 +5304,7 @@ struct CallbackClassifier {
5309
5304
// comments.
5310
5305
CurrentBlock->addPossibleCommentLoc (Statement->getStartLoc ());
5311
5306
5312
- ThenBlock->addAllBindings (CallbackConditions, DiagEngine);
5313
- if (DiagEngine.hadAnyError ())
5314
- return ;
5307
+ ThenBlock->addAllBindings (CallbackConditions);
5315
5308
5316
5309
// TODO: Handle nested ifs
5317
5310
setNodes (ThenBlock, ElseBlock, std::move (ThenNodesToPrint));
@@ -5400,9 +5393,7 @@ struct CallbackClassifier {
5400
5393
Block->addPossibleCommentLoc (SS->getRBraceLoc ());
5401
5394
5402
5395
setNodes (Block, OtherBlock, std::move (SuccessNodes));
5403
- Block->addBinding (*CC, DiagEngine);
5404
- if (DiagEngine.hadAnyError ())
5405
- return ;
5396
+ Block->addBinding (*CC);
5406
5397
}
5407
5398
// Mark this switch statement as having been transformed.
5408
5399
HandledSwitches.insert (SS);
0 commit comments