@@ -642,17 +642,14 @@ DiagnosticVerifier::Result DiagnosticVerifier::verifyFile(unsigned BufferID) {
642642
643643 assert (!FoundDiagnostic.FixIts .empty () &&
644644 " some fix-its should be produced here" );
645-
646- const char *noneStartLoc =
647- expected.ExpectedEnd -
648- (fixitExpectationNoneString.size () + 4 ) /* length of '{{none}}' */ ;
645+ assert (expected.noneMarkerStartLoc && " none marker location is null" );
649646
650647 const char *replStartLoc = nullptr , *replEndLoc = nullptr ;
651648 std::string message;
652649 if (expected.Fixits .empty ()) {
653650 message = " expected no fix-its" ;
654- replStartLoc = noneStartLoc ;
655- replEndLoc = noneStartLoc ;
651+ replStartLoc = expected. noneMarkerStartLoc ;
652+ replEndLoc = expected. noneMarkerStartLoc ;
656653 } else {
657654 message = " unexpected fix-it seen" ;
658655 replStartLoc = expected.Fixits .front ().StartLoc ;
@@ -676,8 +673,8 @@ DiagnosticVerifier::Result DiagnosticVerifier::verifyFile(unsigned BufferID) {
676673 actualFixits += " " ;
677674 }
678675
679- emitFixItsError (noneStartLoc , message, replStartLoc, replEndLoc ,
680- actualFixits);
676+ emitFixItsError (expected. noneMarkerStartLoc , message, replStartLoc,
677+ replEndLoc, actualFixits);
681678 }
682679
683680 // Actually remove the diagnostic from the list, so we don't match it
0 commit comments