scan-build now looks for ccc-analyzer first in the 'bin' subdirectory and then the directory where scan-build lives.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65483 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/scan-build b/utils/scan-build
index 6d43c3c..ec5f830 100755
--- a/utils/scan-build
+++ b/utils/scan-build
@@ -1149,10 +1149,11 @@
 # Set the appropriate environment variables.
 SetHtmlEnv(\@ARGV, $HtmlDir);
 
-my $Cmd = Cwd::realpath("$RealBin/ccc-analyzer");
-
-DieDiag("Executable 'ccc-analyzer' does not exist at '$Cmd'\n")
-  if (! -x $Cmd);
+my $Cmd = Cwd::realpath("$RealBin/bin/ccc-analyzer");
+if (!defined $Cmd || ! -x $Cmd) {
+  $Cmd = Cwd::realpath("$RealBin/ccc-analyzer");
+  DieDiag("Executable 'ccc-analyzer' does not exist at '$Cmd'\n");
+}
 
 if (!defined $ClangSB || ! -x $ClangSB) {
   Diag("'clang' executable not found in '$RealBin/bin'.\n");