[clang-tools-extra] r221260 - Use findProgramByName. NFC.
Rafael Espindola
rafael.espindola at gmail.com
Tue Nov 4 04:48:22 PST 2014
Author: rafael
Date: Tue Nov 4 06:48:22 2014
New Revision: 221260
URL: http://llvm.org/viewvc/llvm-project?rev=221260&view=rev
Log:
Use findProgramByName. NFC.
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=221260&r1=221259&r2=221260&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-modernize/Core/ReplacementHandling.cpp (original)
+++ clang-tools-extra/trunk/clang-modernize/Core/ReplacementHandling.cpp Tue Nov 4 06:48:22 2014
@@ -25,11 +25,12 @@ using namespace llvm::sys;
using namespace clang::tooling;
bool ReplacementHandling::findClangApplyReplacements(const char *Argv0) {
- CARPath = FindProgramByName("clang-apply-replacements");
-
- if (!CARPath.empty())
+ ErrorOr<std::string> CARPathOrErr =
+ findProgramByName("clang-apply-replacements");
+ if (!CARPathOrErr)
return true;
+ CARPath = *CARPathOrErr;
static int StaticSymbol;
std::string ClangModernizePath = fs::getMainExecutable(Argv0, &StaticSymbol);
SmallString<128> TestPath = path::parent_path(ClangModernizePath);
More information about the cfe-commits
mailing list