Skip to content

Commit

Permalink
[clang][Diagnostics][NFC] Use getFileID() directly
Browse files Browse the repository at this point in the history
Instead of calling getDecomposedLoc() and then only using the FileID.
  • Loading branch information
tbaederr committed May 31, 2023
1 parent b0bab14 commit bb6c036
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clang/lib/Frontend/TextDiagnostic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1144,9 +1144,7 @@ void TextDiagnostic::emitSnippetAndCaret(
(LastLevel != DiagnosticsEngine::Note || Level == LastLevel))
return;

// Decompose the location into a FID/Offset pair.
std::pair<FileID, unsigned> LocInfo = Loc.getDecomposedLoc();
FileID FID = LocInfo.first;
FileID FID = Loc.getFileID();
const SourceManager &SM = Loc.getManager();

// Get information about the buffer it points into.
Expand Down

0 comments on commit bb6c036

Please sign in to comment.