Skip to content

Commit 7c2182a

Browse files
committed
NFC, use structured binding to simplify the code in SourceManager.cpp.
1 parent 543f948 commit 7c2182a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

clang/lib/Basic/SourceManager.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,9 +1795,8 @@ void SourceManager::associateFileChunkWithMacroArgExp(
17951795
// spelling range and if one is itself a macro argument expansion, recurse
17961796
// and associate the file chunk that it represents.
17971797

1798-
FileID SpellFID; // Current FileID in the spelling range.
1799-
unsigned SpellRelativeOffs;
1800-
std::tie(SpellFID, SpellRelativeOffs) = getDecomposedLoc(SpellLoc);
1798+
// Current FileID in the spelling range.
1799+
auto [SpellFID, SpellRelativeOffs] = getDecomposedLoc(SpellLoc);
18011800
while (true) {
18021801
const SLocEntry &Entry = getSLocEntry(SpellFID);
18031802
SourceLocation::UIntTy SpellFIDBeginOffs = Entry.getOffset();
@@ -1879,9 +1878,7 @@ SourceManager::getMacroArgExpandedLocation(SourceLocation Loc) const {
18791878
if (Loc.isInvalid() || !Loc.isFileID())
18801879
return Loc;
18811880

1882-
FileID FID;
1883-
unsigned Offset;
1884-
std::tie(FID, Offset) = getDecomposedLoc(Loc);
1881+
auto [FID, Offset] = getDecomposedLoc(Loc);
18851882
if (FID.isInvalid())
18861883
return Loc;
18871884

0 commit comments

Comments
 (0)