[PATCH] D12827: [analyzer] fix an error finding clang path

Honggyu Kim via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 12 02:09:48 PDT 2015


honggyu.kim created this revision.
honggyu.kim added reviewers: ayartsev, zaks.anna, krememek.
honggyu.kim added subscribers: jordan_rose, dcoughlin, cfe-commits.

This patch fixes an error made by rL247466.
It mistakenly wrote "-d" check in if statement with the file name itself not a directory.

http://reviews.llvm.org/D12827

Files:
  tools/scan-build/scan-build

Index: tools/scan-build/scan-build
===================================================================
--- tools/scan-build/scan-build
+++ tools/scan-build/scan-build
@@ -1644,9 +1644,9 @@
 
 # Find 'clang'
 if (!defined $Options{AnalyzerDiscoveryMethod}) {
-  $Clang = Cwd::realpath("$RealBin/bin/clang") if (-d "$RealBin/bin/clang");
+  $Clang = Cwd::realpath("$RealBin/bin/clang") if (-d "$RealBin/bin");
   if (!defined $Clang || ! -x $Clang) {
-    $Clang = Cwd::realpath("$RealBin/clang") if (-d "$RealBin/clang");
+    $Clang = Cwd::realpath("$RealBin/clang") if (-d "$RealBin");
   }
   if (!defined $Clang || ! -x $Clang) {
     if (!$RequestDisplayHelp && !$ForceDisplayHelp) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12827.34620.patch
Type: text/x-patch
Size: 688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150912/9c1ef4ff/attachment.bin>


More information about the cfe-commits mailing list