r239376 - Simplify this code a bit.

Sean Silva chisophugis at gmail.com
Mon Jun 8 17:47:20 PDT 2015


Author: silvas
Date: Mon Jun  8 19:47:20 2015
New Revision: 239376

URL: http://llvm.org/viewvc/llvm-project?rev=239376&view=rev
Log:
Simplify this code a bit.

We weren't using the short-circuiting property anyway.

Modified:
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=239376&r1=239375&r2=239376&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Mon Jun  8 19:47:20 2015
@@ -1880,18 +1880,17 @@ bool CompilerInvocation::CreateFromArgs(
     Success = false;
   }
 
-  Success = ParseAnalyzerArgs(*Res.getAnalyzerOpts(), *Args, Diags) && Success;
-  Success = ParseMigratorArgs(Res.getMigratorOpts(), *Args) && Success;
+  Success &= ParseAnalyzerArgs(*Res.getAnalyzerOpts(), *Args, Diags);
+  Success &= ParseMigratorArgs(Res.getMigratorOpts(), *Args);
   ParseDependencyOutputArgs(Res.getDependencyOutputOpts(), *Args);
-  Success = ParseDiagnosticArgs(Res.getDiagnosticOpts(), *Args, &Diags)
-            && Success;
+  Success &= ParseDiagnosticArgs(Res.getDiagnosticOpts(), *Args, &Diags);
   ParseCommentArgs(Res.getLangOpts()->CommentOpts, *Args);
   ParseFileSystemArgs(Res.getFileSystemOpts(), *Args);
   // FIXME: We shouldn't have to pass the DashX option around here
   InputKind DashX = ParseFrontendArgs(Res.getFrontendOpts(), *Args, Diags);
   ParseTargetArgs(Res.getTargetOpts(), *Args);
-  Success = ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags,
-                             Res.getTargetOpts()) && Success;
+  Success &= ParseCodeGenArgs(Res.getCodeGenOpts(), *Args, DashX, Diags,
+                              Res.getTargetOpts());
   ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), *Args);
   if (DashX != IK_AST && DashX != IK_LLVM_IR) {
     ParseLangArgs(*Res.getLangOpts(), *Args, DashX, Diags);





More information about the cfe-commits mailing list