dexonsmith created this revision.
dexonsmith added reviewers: jansvoboda11, Bigcheese.
dexonsmith requested review of this revision.
Herald added a project: clang.

Remove an early return from an `else` block that's immediately followed
by an equivalent early return after the `else` block.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101671

Files:
  clang/lib/Frontend/CompilerInstance.cpp


Index: clang/lib/Frontend/CompilerInstance.cpp
===================================================================
--- clang/lib/Frontend/CompilerInstance.cpp
+++ clang/lib/Frontend/CompilerInstance.cpp
@@ -1885,8 +1885,6 @@
       return Result;
     Module = Result;
     MM.cacheModuleLoad(*Path[0].first, Module);
-    if (!Module)
-      return Module;
   }
 
   // If we never found the module, fail.  Otherwise, verify the module and link


Index: clang/lib/Frontend/CompilerInstance.cpp
===================================================================
--- clang/lib/Frontend/CompilerInstance.cpp
+++ clang/lib/Frontend/CompilerInstance.cpp
@@ -1885,8 +1885,6 @@
       return Result;
     Module = Result;
     MM.cacheModuleLoad(*Path[0].first, Module);
-    if (!Module)
-      return Module;
   }
 
   // If we never found the module, fail.  Otherwise, verify the module and link
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D101671: M... Duncan P. N. Exon Smith via Phabricator via cfe-commits

Reply via email to