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 74249f7..dd289a0 100755
--- a/utils/scan-build
+++ b/utils/scan-build
@@ -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");
       }