@@ -58,7 +58,7 @@ void SARIFDiagnostic::emitDiagnosticMessage(
5858 if (Loc.isValid ())
5959 Result = addLocationToResult (Result, Loc, PLoc, Ranges, *Diag);
6060
61- for (auto & [RelLoc, RelPLoc] : RelatedLocationsCache)
61+ for (auto & [RelLoc, RelPLoc] : RelatedLocationsCache)
6262 Result = addRelatedLocationToResult (Result, RelLoc, RelPLoc);
6363 RelatedLocationsCache.clear ();
6464
@@ -78,7 +78,7 @@ void SARIFDiagnostic::emitIncludeLocation(FullSourceLoc Loc, PresumedLoc PLoc) {
7878 RelatedLocationsCache.push_back ({Loc, PLoc});
7979}
8080
81- void SARIFDiagnostic::emitImportLocation (FullSourceLoc Loc, PresumedLoc PLoc,
81+ void SARIFDiagnostic::emitImportLocation (FullSourceLoc Loc, PresumedLoc PLoc,
8282 StringRef ModuleName) {
8383 RelatedLocationsCache.push_back ({Loc, PLoc});
8484}
@@ -90,14 +90,16 @@ SarifResult SARIFDiagnostic::addLocationToResult(
9090 return Result.setLocations (Locations);
9191}
9292
93- SarifResult SARIFDiagnostic::addRelatedLocationToResult (
94- SarifResult Result, FullSourceLoc Loc, PresumedLoc PLoc) {
93+ SarifResult SARIFDiagnostic::addRelatedLocationToResult (SarifResult Result,
94+ FullSourceLoc Loc,
95+ PresumedLoc PLoc) {
9596 auto Locations = getSarifLocation (Loc, PLoc, {});
9697 return Result.setRelatedLocations (Locations);
9798}
9899
99- llvm::SmallVector<CharSourceRange> SARIFDiagnostic::getSarifLocation (
100- FullSourceLoc Loc, PresumedLoc PLoc, ArrayRef<CharSourceRange> Ranges) {
100+ llvm::SmallVector<CharSourceRange>
101+ SARIFDiagnostic::getSarifLocation (FullSourceLoc Loc, PresumedLoc PLoc,
102+ ArrayRef<CharSourceRange> Ranges) {
101103 SmallVector<CharSourceRange> Locations = {};
102104
103105 if (PLoc.isInvalid ()) {
@@ -161,7 +163,7 @@ llvm::SmallVector<CharSourceRange> SARIFDiagnostic::getSarifLocation(
161163 SourceLocation DiagLoc = SM.translateLineCol (FID, PLoc.getLine (), ColNo);
162164
163165 // FIXME(llvm-project/issues/57366): Properly process #line directives.
164- CharSourceRange Range = {SourceRange{DiagLoc, DiagLoc}, /* ITR = */ false };
166+ CharSourceRange Range = {SourceRange{DiagLoc, DiagLoc}, /* ITR = */ false };
165167 if (Range.isValid ())
166168 Locations.push_back (std::move (Range));
167169
0 commit comments