From: Ted Kremenek Date: Tue, 12 May 2009 18:04:43 +0000 (+0000) Subject: Make scan-build process of --use-cc and --html-title more robust. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=278a55103a66e3a83530f15d0df3d4b80ed4cfee;p=clang Make scan-build process of --use-cc and --html-title more robust. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71567 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/scan-build b/utils/scan-build index 74249f7031..dd289a0d6c 100755 --- a/utils/scan-build +++ b/utils/scan-build @@ -1067,7 +1067,7 @@ while (@ARGV) { 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 @@ while (@ARGV) { 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 @@ while (@ARGV) { 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"); }