Skip to content

Commit 65331da

Browse files
committed
Partially revert "[clang] NFCI: Adopt SourceManager::getFileEntryRefForID()"
This commit partially reverts ddbcc10 to fix `clang-tools-extra/test/clang-tidy/infrastructure/clang-tidy-run-with-database.cpp`.
1 parent 24a0859 commit 65331da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Rewrite/Rewriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ bool Rewriter::overwriteChangedFiles() {
412412
unsigned OverwriteFailure = Diag.getCustomDiagID(
413413
DiagnosticsEngine::Error, "unable to overwrite file %0: %1");
414414
for (buffer_iterator I = buffer_begin(), E = buffer_end(); I != E; ++I) {
415-
OptionalFileEntryRef Entry = getSourceMgr().getFileEntryRefForID(I->first);
415+
const FileEntry *Entry = getSourceMgr().getFileEntryForID(I->first);
416416
if (auto Error =
417417
llvm::writeToOutput(Entry->getName(), [&](llvm::raw_ostream &OS) {
418418
I->second.write(OS);

0 commit comments

Comments
 (0)