diff options
author | Haojian Wu <hokein.wu@gmail.com> | 2025-06-26 14:12:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-26 14:12:51 +0200 |
commit | 0b6ddb02efdcbdac9426e8d857499ea0580303cd (patch) | |
tree | eed7f54265dca87249adc7155112d50ded8c540d /clang/lib/Serialization | |
parent | 548e8e92e98d727534aff93771e032696aca11e3 (diff) | |
download | llvm-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/Serialization')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 523165c6..4869718 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -10199,8 +10199,7 @@ void ASTReader::ReadComments() { for (RawComment *C : Comments) { SourceLocation CommentLoc = C->getBeginLoc(); if (CommentLoc.isValid()) { - std::pair<FileID, unsigned> Loc = - SourceMgr.getDecomposedLoc(CommentLoc); + FileIDAndOffset Loc = SourceMgr.getDecomposedLoc(CommentLoc); if (Loc.first.isValid()) Context.Comments.OrderedComments[Loc.first].emplace(Loc.second, C); } |