aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-05-12 18:04:43 +0000
committerTed Kremenek <kremenek@apple.com>2009-05-12 18:04:43 +0000
commit278a55103a66e3a83530f15d0df3d4b80ed4cfee (patch)
tree3ef7123b23adc9a371a8b90667d20d93c661f51e
parent0755402a12998a186c78fe10dea40238afb85440 (diff)
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
-rwxr-xr-xutils/scan-build6
1 files 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");
}