]> granicus.if.org Git - clang/commitdiff
Make scan-build process of --use-cc and --html-title more robust.
authorTed Kremenek <kremenek@apple.com>
Tue, 12 May 2009 18:04:43 +0000 (18:04 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 12 May 2009 18:04:43 +0000 (18:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71567 91177308-0d34-0410-b5e6-96231b3b80d8

utils/scan-build

index 74249f7031edc1dd326acb26b2060a3bc32ca346..dd289a0d6c0a851b4ca20019c882b6e3e05f7083 100755 (executable)
@@ -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");
       }