[PATCH] D52530: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit status of the actual build

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 26 06:10:32 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC343105: [analyzer] scan-build: if --status-bugs is passed, don't forget about the exit… (authored by lebedevri, committed by ).

Repository:
  rC Clang

https://reviews.llvm.org/D52530

Files:
  tools/scan-build/bin/scan-build


Index: tools/scan-build/bin/scan-build
===================================================================
--- tools/scan-build/bin/scan-build
+++ tools/scan-build/bin/scan-build
@@ -1207,7 +1207,7 @@
 
    By default, the exit status of scan-build is the same as the executed build
    command. Specifying this option causes the exit status of scan-build to be 1
-   if it found potential bugs and 0 otherwise.
+   if it found potential bugs and the exit status of the build itself otherwise.
 
  --exclude <path>
 
@@ -1908,7 +1908,7 @@
 
     if ($Options{ExitStatusFoundBugs}) {
       exit 1 if ($NumBugs > 0);
-      exit 0;
+      exit $ExitStatus;
     }
   }
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52530.167118.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180926/22c9953c/attachment.bin>


More information about the cfe-commits mailing list