[cfe-commits] r71567 - /cfe/trunk/utils/scan-build

Ted Kremenek kremenek at apple.com
Tue May 12 11:04:44 PDT 2009


Author: kremenek
Date: Tue May 12 13:04:43 2009
New Revision: 71567

URL: http://llvm.org/viewvc/llvm-project?rev=71567&view=rev
Log:
Make scan-build process of --use-cc and --html-title more robust.

Modified:
    cfe/trunk/utils/scan-build

Modified: cfe/trunk/utils/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/scan-build?rev=71567&r1=71566&r2=71567&view=diff

==============================================================================
--- cfe/trunk/utils/scan-build (original)
+++ cfe/trunk/utils/scan-build Tue May 12 13:04:43 2009
@@ -1067,7 +1067,7 @@
   if ($arg =~ /^--html-title(=(.+))?$/) {
     shift @ARGV;
 
-    if ($2 eq '') {
+    if (!defined $2 || $2 eq '') {
       if (!@ARGV) {
         DieDiag("'--html-title' option requires a string.\n");
       }
@@ -1090,7 +1090,7 @@
     shift @ARGV;
     my $cc;
     
-    if ($2 eq "") {
+    if (!defined $2 || $2 eq "") {
       if (!@ARGV) {
         DieDiag("'--use-cc' option requires a compiler executable name.\n");
       }
@@ -1107,7 +1107,7 @@
   if ($arg =~ /^--use-c\+\+(=(.+))?$/) {
     shift @ARGV;
     
-    if ($2 eq "") {
+    if (!defined $2 || $2 eq "") {
       if (!@ARGV) {
         DieDiag("'--use-c++' option requires a compiler executable name.\n");
       }





More information about the cfe-commits mailing list