Author: Jun Zhang
Date: 2022-08-27T23:14:48+08:00
New Revision: b9c2b6069ea7f3d253d88725c1993da463f39575

URL: 
https://github.com/llvm/llvm-project/commit/b9c2b6069ea7f3d253d88725c1993da463f39575
DIFF: 
https://github.com/llvm/llvm-project/commit/b9c2b6069ea7f3d253d88725c1993da463f39575.diff

LOG: Avoid else-if after return, NFC

Signed-off-by: Jun Zhang <j...@junz.org>

Added: 
    

Modified: 
    clang/lib/Basic/SourceManager.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Basic/SourceManager.cpp 
b/clang/lib/Basic/SourceManager.cpp
index 38545d1be918f..24e4aefd53f1c 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -1795,11 +1795,11 @@ void SourceManager::computeMacroArgsCache(MacroArgsMap 
&MacroArgsCache,
         if (Entry.getFile().NumCreatedFIDs)
           ID += Entry.getFile().NumCreatedFIDs - 1 /*because of next ++ID*/;
         continue;
-      } else if (IncludeLoc.isValid()) {
-        // If file was included but not from FID, there is no more files/macros
-        // that may be "contained" in this file.
-        return;
       }
+      // If file was included but not from FID, there is no more files/macros
+      // that may be "contained" in this file.
+      if (IncludeLoc.isValid())
+        return;
       continue;
     }
 


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to