SourceManager: Remove a redundant nullptr check in getNonBuiltinFilenameForID, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 23 Oct 2020 01:41:26 +0000 (21:41 -0400)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 23 Oct 2020 02:20:50 +0000 (22:20 -0400)
clang/lib/Basic/SourceManager.cpp

index 79eeeb2..e3b88f9 100644 (file)
@@ -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;
 }