[cfe-commits] r95349 - /cfe/trunk/tools/scan-build/scan-build

Ted Kremenek kremenek at apple.com
Thu Feb 4 18:18:40 PST 2010


Author: kremenek
Date: Thu Feb  4 20:18:39 2010
New Revision: 95349

URL: http://llvm.org/viewvc/llvm-project?rev=95349&view=rev
Log:
Now that the -cc1 options for analyzer checks have a structured naming, add back scanning for analyzer checks to scan-build.

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

Modified: cfe/trunk/tools/scan-build/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/scan-build?rev=95349&r1=95348&r2=95349&view=diff

==============================================================================
--- cfe/trunk/tools/scan-build/scan-build (original)
+++ cfe/trunk/tools/scan-build/scan-build Thu Feb  4 20:18:39 2010
@@ -98,25 +98,14 @@
 my %AvailableAnalyses;
 
 # Query clang for analysis options.
-open(PIPE, "-|", $Clang, "-cc1", "--help") or
+open(PIPE, "-|", $Clang, "-cc1", "-help") or
   DieDiag("Cannot execute '$Clang'\n");
 
-my $FoundAnalysis = 0;
-
 while(<PIPE>) {
-  if ($FoundAnalysis == 0) {
-    if (/Checks and Analyses/) {
-      $FoundAnalysis = 1;
-    }
-    next;
-  }
-  if (/^\s\s\s\s([^\s]+)\s(.+)$/) {
-    next if ($1 =~ /-dump/ or $1 =~ /-view/ 
-             or $1 =~ /-warn-uninit/);             
-    $AvailableAnalyses{$1} = $2;
+  if (/(-analyzer-check-[^\s]+)/) {
+    $AvailableAnalyses{$1} = 1;
     next;
   }  
-  last;
 }
 close (PIPE);
 
@@ -951,7 +940,7 @@
       print "    ";
     }
     
-    print " $Analysis  $AvailableAnalyses{$Analysis}\n";
+    print " $Analysis\n";
   }
   
 print <<ENDTEXT





More information about the cfe-commits mailing list