Skip to content

Commit 83545b2

Browse files
committed
More changes.
1 parent 2bd778b commit 83545b2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

clang/lib/Tooling/Refactoring/AtomicChange.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ combineReplacementsInChanges(llvm::StringRef FilePath,
196196
AtomicChange::AtomicChange(const SourceManager &SM,
197197
SourceLocation KeyPosition) {
198198
const FullSourceLoc FullKeyPosition(KeyPosition, SM);
199-
FileIDAndOffset FileIDAndOffset =
200-
FullKeyPosition.getSpellingLoc().getDecomposedLoc();
199+
auto FileIDAndOffset = FullKeyPosition.getSpellingLoc().getDecomposedLoc();
201200
OptionalFileEntryRef FE = SM.getFileEntryRefForID(FileIDAndOffset.first);
202201
assert(FE && "Cannot create AtomicChange with invalid location.");
203202
FilePath = std::string(FE->getName());

clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ bool IsValidEditLoc(const clang::SourceManager& SM, clang::SourceLocation Loc) {
4545
if (Loc.isInvalid())
4646
return false;
4747
const clang::FullSourceLoc FullLoc(Loc, SM);
48-
std::pair<clang::FileID, unsigned> FileIdAndOffset =
49-
FullLoc.getSpellingLoc().getDecomposedLoc();
48+
auto FileIdAndOffset = FullLoc.getSpellingLoc().getDecomposedLoc();
5049
return SM.getFileEntryForID(FileIdAndOffset.first) != nullptr;
5150
}
5251

0 commit comments

Comments
 (0)