diff --git a/clang/utils/scan-build b/clang/utils/scan-build index fc6407e213f4..4f2a68ff9ea2 100755 --- a/clang/utils/scan-build +++ b/clang/utils/scan-build @@ -84,7 +84,7 @@ sub DieDiag { my $ClangSB = Cwd::realpath("$RealBin/cbin/clang"); my $Clang = $ClangSB; -if (! -x $ClangSB) { +if (!defined $ClangSB || ! -x $ClangSB) { $Clang = "clang"; }