]> granicus.if.org Git - clang/commitdiff
Use scan-view to view reports. Opening index.html is deprecated.
authorTed Kremenek <kremenek@apple.com>
Mon, 22 Sep 2008 06:47:01 +0000 (06:47 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 22 Sep 2008 06:47:01 +0000 (06:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56431 91177308-0d34-0410-b5e6-96231b3b80d8

utils/scan-build

index f48b71d57cb12b4eeb9eaad27390c09061b3a928..4105c37cf368da51ec94200e83941f992d0bbe31 100755 (executable)
@@ -743,7 +743,7 @@ ENDTEXT
   my $Num = scalar(@Index);
   Diag("$Num bugs found.\n");
   if ($Num > 0 && -r "$Dir/index.html") {
-    Diag("Open '$Dir/index.html' to examine bug reports.\n");
+    Diag("Run 'scan-view $Dir' to examine bug reports.\n");
   }
   
   DiagCrashes($Dir) if ($Crashes);
@@ -1118,9 +1118,11 @@ my $ExitStatus = RunBuildCommand(\@ARGV, $IgnoreErrors, $Cmd);
 my $NumBugs = Postprocess($HtmlDir, $BaseDir);
 
 if ($ViewResults and -r "$HtmlDir/index.html") {
-  # Only works on Mac OS X (for now).
-  print "Viewing analysis results: '$HtmlDir/index.html'\n";
-  system("open", "$HtmlDir/index.html");
+  Diag 'analysis run complete.\n';
+  Diag "Viewing analysis results in '$HtmlDir' using scan-view.\n";
+  my $ScanView = "$RealBin/scan-view";
+  if (! -x $ScanView) { $ScanView = "scan-view"; }
+  exec $ScanView, "$HtmlDir";
 }
 
 if ($ExitStatusFoundBugs) {