aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/CodeCompleteConsumer.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2025-06-26 14:12:51 +0200
committerGitHub <noreply@github.com>2025-06-26 14:12:51 +0200
commit0b6ddb02efdcbdac9426e8d857499ea0580303cd (patch)
treeeed7f54265dca87249adc7155112d50ded8c540d /clang/lib/Sema/CodeCompleteConsumer.cpp
parent548e8e92e98d727534aff93771e032696aca11e3 (diff)
downloadllvm-0b6ddb02efdcbdac9426e8d857499ea0580303cd.zip
llvm-0b6ddb02efdcbdac9426e8d857499ea0580303cd.tar.gz
llvm-0b6ddb02efdcbdac9426e8d857499ea0580303cd.tar.bz2
[clang] NFC: Add alias for std::pair<FileID, unsigned> used in SourceLocation (#145711)
Introduce a type alias for the commonly used `std::pair<FileID, unsigned>` to improve code readability, and make it easier for future updates (64-bit source locations).
Diffstat (limited to 'clang/lib/Sema/CodeCompleteConsumer.cpp')
-rw-r--r--clang/lib/Sema/CodeCompleteConsumer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/CodeCompleteConsumer.cpp b/clang/lib/Sema/CodeCompleteConsumer.cpp
index c4e5ef0..e3fc7c1 100644
--- a/clang/lib/Sema/CodeCompleteConsumer.cpp
+++ b/clang/lib/Sema/CodeCompleteConsumer.cpp
@@ -700,8 +700,8 @@ void PrintingCodeCompleteConsumer::ProcessCodeCompleteResults(
const SourceLocation ELoc = FixIt.RemoveRange.getEnd();
SourceManager &SM = SemaRef.SourceMgr;
- std::pair<FileID, unsigned> BInfo = SM.getDecomposedLoc(BLoc);
- std::pair<FileID, unsigned> EInfo = SM.getDecomposedLoc(ELoc);
+ FileIDAndOffset BInfo = SM.getDecomposedLoc(BLoc);
+ FileIDAndOffset EInfo = SM.getDecomposedLoc(ELoc);
// Adjust for token ranges.
if (FixIt.RemoveRange.isTokenRange())
EInfo.second += Lexer::MeasureTokenLength(ELoc, SM, SemaRef.LangOpts);