mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
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 llvm-svn: 205136
This commit is contained in:
@@ -31,8 +31,8 @@ bool ReplacementHandling::findClangApplyReplacements(const char *Argv0) {
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user