[cfe-commits] r127758 - /cfe/trunk/tools/scan-build/ccc-analyzer

Ted Kremenek kremenek at apple.com
Wed Mar 16 14:10:42 PDT 2011


Author: kremenek
Date: Wed Mar 16 16:10:42 2011
New Revision: 127758

URL: http://llvm.org/viewvc/llvm-project?rev=127758&view=rev
Log:
Compress argument processing in ccc-analyzer.  No functionality change.

Modified:
    cfe/trunk/tools/scan-build/ccc-analyzer

Modified: cfe/trunk/tools/scan-build/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/ccc-analyzer?rev=127758&r1=127757&r2=127758&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/ccc-analyzer (original)
+++ cfe/trunk/tools/scan-build/ccc-analyzer Wed Mar 16 16:10:42 2011
@@ -178,25 +178,20 @@
 
     # Create arguments for doing static analysis.
     if (defined $ResultFile) {
-      push @Args,'-o';
-      push @Args, $ResultFile;
+      push @Args, '-o', $ResultFile;
     }
     elsif (defined $HtmlDir) {
-      push @Args,'-o';
-      push @Args, $HtmlDir;
+      push @Args, '-o', $HtmlDir;
     }
-    push @Args,"-Xclang";
-    push @Args,"-analyzer-display-progress";
+    push @Args, "-Xclang", "-analyzer-display-progress";
 
     foreach my $arg (@$AnalyzeArgs) {
-      push @Args, "-Xclang";
-      push @Args, $arg;
+      push @Args, "-Xclang", $arg;
     }
-    
+
     # Display Ubiviz graph?
     if (defined $ENV{'CCC_UBI'}) {   
-      push @Args, "-Xclang";
-      push @Args,"-analyzer-viz-egraph-ubigraph";
+      push @Args, "-Xclang", "-analyzer-viz-egraph-ubigraph";
     }
 
     my $AnalysisArgs = GetCCArgs("--analyze", \@Args);
@@ -613,8 +608,7 @@
     my @AnalyzeArgs;    
     
     if ($FileLang ne 'unknown') {
-      push @CmdArgs,'-x';
-      push @CmdArgs,$FileLang;
+      push @CmdArgs, '-x', $FileLang;
     }
 
     if (defined $StoreModel) {
@@ -646,8 +640,7 @@
     if (scalar @Archs) {
       foreach my $arch (@Archs) {
         my @NewArgs;
-        push @NewArgs, '-arch';
-        push @NewArgs, $arch;
+        push @NewArgs, '-arch', $arch;
         push @NewArgs, @CmdArgs;
         Analyze($Clang, \@NewArgs, \@AnalyzeArgs, $FileLang, $Output,
                 $Verbose, $HtmlDir, $file);





More information about the cfe-commits mailing list