[clang-tools-extra] r205136 - clang-modernize: fix invalid assignment in findClangApplyReplacements()

Guillaume Papin guillaume.papin at epitech.eu
Sun Mar 30 03:50:26 PDT 2014


Author: papin_g
Date: Sun Mar 30 05:50:25 2014
New Revision: 205136

URL: http://llvm.org/viewvc/llvm-project?rev=205136&view=rev
Log:
clang-modernize: fix invalid assignment in findClangApplyReplacements()

Summary:
When clang-apply-replacements wasn't in the PATH or sitting next to
clang-modernize, findClangApplyReplacements() was finding the wrong path
(pointing to clang-modernize instead of nothing).

See the related PR at http://llvm.org/bugs/show_bug.cgi?id=18421

Reviewers: klimek

CC: silvas, cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D3217

Modified:
    clang-tools-extra/trunk/clang-modernize/Core/ReplacementHandling.cpp

Modified: clang-tools-extra/trunk/clang-modernize/Core/ReplacementHandling.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/ReplacementHandling.cpp?rev=205136&r1=205135&r2=205136&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-modernize/Core/ReplacementHandling.cpp (original)
+++ clang-tools-extra/trunk/clang-modernize/Core/ReplacementHandling.cpp Sun Mar 30 05:50:25 2014
@@ -31,8 +31,8 @@ bool ReplacementHandling::findClangApply
     return true;
 
   static int StaticSymbol;
-  CARPath = fs::getMainExecutable(Argv0, &StaticSymbol);
-  SmallString<128> TestPath = path::parent_path(CARPath);
+  std::string ClangModernizePath = fs::getMainExecutable(Argv0, &StaticSymbol);
+  SmallString<128> TestPath = path::parent_path(ClangModernizePath);
   path::append(TestPath, "clang-apply-replacements");
   if (fs::can_execute(Twine(TestPath)))
     CARPath = TestPath.str();





More information about the cfe-commits mailing list