r316661 - Try to fix warnings and windows test failures caused by r316653
Eric Liu via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 26 06:09:50 PDT 2017
Author: ioeric
Date: Thu Oct 26 06:09:50 2017
New Revision: 316661
URL: http://llvm.org/viewvc/llvm-project?rev=316661&view=rev
Log:
Try to fix warnings and windows test failures caused by r316653
Modified:
cfe/trunk/lib/Tooling/StandaloneExecution.cpp
cfe/trunk/unittests/Tooling/ExecutionTest.cpp
Modified: cfe/trunk/lib/Tooling/StandaloneExecution.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/StandaloneExecution.cpp?rev=316661&r1=316660&r2=316661&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/StandaloneExecution.cpp (original)
+++ cfe/trunk/lib/Tooling/StandaloneExecution.cpp Thu Oct 26 06:09:50 2017
@@ -62,7 +62,7 @@ llvm::Error StandaloneToolExecutor::exec
auto &Action = Actions.front();
Tool.appendArgumentsAdjuster(Action.second);
Tool.appendArgumentsAdjuster(ArgsAdjuster);
- if (int Ret = Tool.run(Action.first.get()))
+ if (Tool.run(Action.first.get()))
return make_string_error("Failed to run action.");
return llvm::Error::success();
Modified: cfe/trunk/unittests/Tooling/ExecutionTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/ExecutionTest.cpp?rev=316661&r1=316660&r2=316661&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/ExecutionTest.cpp (original)
+++ cfe/trunk/unittests/Tooling/ExecutionTest.cpp Thu Oct 26 06:09:50 2017
@@ -183,10 +183,10 @@ TEST(CreateToolExecutorTest, CreateTestT
}
TEST(StandaloneToolTest, SynctaxOnlyActionOnSimpleCode) {
- FixedCompilationDatabase Compilations("/", std::vector<std::string>());
+ FixedCompilationDatabase Compilations(".", std::vector<std::string>());
StandaloneToolExecutor Executor(Compilations,
- std::vector<std::string>(1, "/a.cc"));
- Executor.mapVirtualFile("/a.cc", "int x = 0;");
+ std::vector<std::string>(1, "a.cc"));
+ Executor.mapVirtualFile("a.cc", "int x = 0;");
auto Err = Executor.execute(newFrontendActionFactory<SyntaxOnlyAction>(),
getClangSyntaxOnlyAdjuster());
@@ -194,10 +194,10 @@ TEST(StandaloneToolTest, SynctaxOnlyActi
}
TEST(StandaloneToolTest, SimpleAction) {
- FixedCompilationDatabase Compilations("/", std::vector<std::string>());
+ FixedCompilationDatabase Compilations(".", std::vector<std::string>());
StandaloneToolExecutor Executor(Compilations,
- std::vector<std::string>(1, "/a.cc"));
- Executor.mapVirtualFile("/a.cc", "int x = 0;");
+ std::vector<std::string>(1, "a.cc"));
+ Executor.mapVirtualFile("a.cc", "int x = 0;");
auto Err = Executor.execute(std::unique_ptr<FrontendActionFactory>(
new ReportResultActionFactory(Executor.getExecutionContext())));
@@ -207,10 +207,10 @@ TEST(StandaloneToolTest, SimpleAction) {
}
TEST(StandaloneToolTest, SimpleActionWithResult) {
- FixedCompilationDatabase Compilations("/", std::vector<std::string>());
+ FixedCompilationDatabase Compilations(".", std::vector<std::string>());
StandaloneToolExecutor Executor(Compilations,
- std::vector<std::string>(1, "/a.cc"));
- Executor.mapVirtualFile("/a.cc", "int x = 0; void f() {}");
+ std::vector<std::string>(1, "a.cc"));
+ Executor.mapVirtualFile("a.cc", "int x = 0; void f() {}");
auto Err = Executor.execute(std::unique_ptr<FrontendActionFactory>(
new ReportResultActionFactory(Executor.getExecutionContext())));
More information about the cfe-commits
mailing list