From 278a55103a66e3a83530f15d0df3d4b80ed4cfee Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 12 May 2009 18:04:43 +0000 Subject: [PATCH] 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 --- utils/scan-build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"); } -- 2.40.0