[clang] 3b8d895 - SourceManager: Remove a redundant nullptr check in getNonBuiltinFilenameForID, NFC
Duncan P. N. Exon Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 22 19:21:03 PDT 2020
Author: Duncan P. N. Exon Smith
Date: 2020-10-22T22:20:50-04:00
New Revision: 3b8d8954bf2c192502d757019b9fe434864068e9
URL: https://github.com/llvm/llvm-project/commit/3b8d8954bf2c192502d757019b9fe434864068e9
DIFF: https://github.com/llvm/llvm-project/commit/3b8d8954bf2c192502d757019b9fe434864068e9.diff
LOG: SourceManager: Remove a redundant nullptr check in getNonBuiltinFilenameForID, NFC
Added:
Modified:
clang/lib/Basic/SourceManager.cpp
Removed:
################################################################################
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 79eeeb29d6b9..e3b88f9127d5 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -729,7 +729,7 @@ Optional<StringRef>
SourceManager::getNonBuiltinFilenameForID(FileID FID) const {
if (const SrcMgr::SLocEntry *Entry = getSLocEntryForFile(FID))
if (auto *Content = Entry->getFile().getContentCache())
- if (Content && Content->OrigEntry)
+ if (Content->OrigEntry)
return Entry->getFile().getName();
return None;
}
More information about the cfe-commits
mailing list