r247510 - Use -f instead of -d flag for testing existing of clang executable (http://reviews.llvm.org/D12827).

Ted Kremenek via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 12 09:01:34 PDT 2015


Author: kremenek
Date: Sat Sep 12 11:01:34 2015
New Revision: 247510

URL: http://llvm.org/viewvc/llvm-project?rev=247510&view=rev
Log:
Use -f instead of -d flag for testing existing of clang executable (http://reviews.llvm.org/D12827).

Modified:
    cfe/trunk/tools/scan-build/scan-build

Modified: cfe/trunk/tools/scan-build/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-build/scan-build?rev=247510&r1=247509&r2=247510&view=diff
==============================================================================
--- cfe/trunk/tools/scan-build/scan-build (original)
+++ cfe/trunk/tools/scan-build/scan-build Sat Sep 12 11:01:34 2015
@@ -1644,9 +1644,9 @@ if (!@ARGV and !$RequestDisplayHelp) {
 
 # Find 'clang'
 if (!defined $Options{AnalyzerDiscoveryMethod}) {
-  $Clang = Cwd::realpath("$RealBin/bin/clang") if (-d "$RealBin/bin/clang");
+  $Clang = Cwd::realpath("$RealBin/bin/clang") if (-f "$RealBin/bin/clang");
   if (!defined $Clang || ! -x $Clang) {
-    $Clang = Cwd::realpath("$RealBin/clang") if (-d "$RealBin/clang");
+    $Clang = Cwd::realpath("$RealBin/clang") if (-f "$RealBin/clang");
   }
   if (!defined $Clang || ! -x $Clang) {
     if (!$RequestDisplayHelp && !$ForceDisplayHelp) {




More information about the cfe-commits mailing list