projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0bab14
)
[clang][Diagnostics][NFC] Use getFileID() directly
author
Timm Bäder
<tbaeder@redhat.com>
Mon, 22 May 2023 13:39:48 +0000
(15:39 +0200)
committer
Timm Bäder
<tbaeder@redhat.com>
Wed, 31 May 2023 07:57:16 +0000
(09:57 +0200)
Instead of calling getDecomposedLoc() and then only using the FileID.
clang/lib/Frontend/TextDiagnostic.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Frontend/TextDiagnostic.cpp
b/clang/lib/Frontend/TextDiagnostic.cpp
index
83f254f
..
a03c185
100644
(file)
--- a/
clang/lib/Frontend/TextDiagnostic.cpp
+++ b/
clang/lib/Frontend/TextDiagnostic.cpp
@@
-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.