]> granicus.if.org Git - clang/commitdiff
Now that the -cc1 options for analyzer checks have a structured naming, add back...
authorTed Kremenek <kremenek@apple.com>
Fri, 5 Feb 2010 02:18:39 +0000 (02:18 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 5 Feb 2010 02:18:39 +0000 (02:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95349 91177308-0d34-0410-b5e6-96231b3b80d8

tools/scan-build/scan-build

index 5bbca3a6bccda5c91fe7dc1a1103816e4c5495ac..985579f7346d5eaa78b24531f6ba389f2677135e 100755 (executable)
@@ -98,25 +98,14 @@ if (!defined $Clang || ! -x $Clang) {
 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 @@ ENDTEXT
       print "    ";
     }
     
-    print " $Analysis  $AvailableAnalyses{$Analysis}\n";
+    print " $Analysis\n";
   }
   
 print <<ENDTEXT