File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -326,18 +326,7 @@ SourceLoc StmtConditionElement::getStartLoc() const {
326
326
case StmtConditionElement::CK_Availability:
327
327
return getAvailability ()->getStartLoc ();
328
328
case StmtConditionElement::CK_PatternBinding:
329
- SourceLoc Start;
330
- if (IntroducerLoc.isValid ())
331
- Start = IntroducerLoc;
332
- else
333
- Start = getPattern ()->getStartLoc ();
334
-
335
- SourceLoc End = getInitializer ()->getEndLoc ();
336
- if (Start.isValid () && End.isValid ()) {
337
- return Start;
338
- } else {
339
- return SourceLoc ();
340
- }
329
+ return getSourceRange ().Start ;
341
330
}
342
331
}
343
332
@@ -348,18 +337,7 @@ SourceLoc StmtConditionElement::getEndLoc() const {
348
337
case StmtConditionElement::CK_Availability:
349
338
return getAvailability ()->getEndLoc ();
350
339
case StmtConditionElement::CK_PatternBinding:
351
- SourceLoc Start;
352
- if (IntroducerLoc.isValid ())
353
- Start = IntroducerLoc;
354
- else
355
- Start = getPattern ()->getStartLoc ();
356
-
357
- SourceLoc End = getInitializer ()->getEndLoc ();
358
- if (Start.isValid () && End.isValid ()) {
359
- return End;
360
- } else {
361
- return SourceLoc ();
362
- }
340
+ return getSourceRange ().End ;
363
341
}
364
342
}
365
343
You can’t perform that action at this time.
0 commit comments