forked from OSchip/llvm-project
[clang-move] Fix unit tests with forward slash as separator on windows
Also remove a comment that seems to be left behind. Differential Revision: https://reviews.llvm.org/D113269
This commit is contained in:
parent
2ca6fc34fc
commit
98f0bf74ca
|
@ -208,7 +208,9 @@ runClangMoveOnCode(const move::MoveDefinitionSpec &Spec,
|
|||
DeclarationReporter *const Reporter = nullptr) {
|
||||
clang::RewriterTestContext Context;
|
||||
|
||||
Context.InMemoryFileSystem->setCurrentWorkingDirectory(WorkingDir);
|
||||
llvm::SmallString<16> Dir(WorkingDir);
|
||||
llvm::sys::path::native(Dir);
|
||||
Context.InMemoryFileSystem->setCurrentWorkingDirectory(Dir);
|
||||
|
||||
std::map<llvm::StringRef, clang::FileID> FileToFileID;
|
||||
|
||||
|
@ -224,13 +226,12 @@ runClangMoveOnCode(const move::MoveDefinitionSpec &Spec,
|
|||
CreateFiles(TestCCName, CC);
|
||||
|
||||
std::map<std::string, tooling::Replacements> FileToReplacements;
|
||||
ClangMoveContext MoveContext = {Spec, FileToReplacements, WorkingDir, "LLVM",
|
||||
ClangMoveContext MoveContext = {Spec, FileToReplacements, Dir.c_str(), "LLVM",
|
||||
Reporter != nullptr};
|
||||
|
||||
auto Factory = std::make_unique<clang::move::ClangMoveActionFactory>(
|
||||
&MoveContext, Reporter);
|
||||
|
||||
// std::string IncludeArg = Twine("-I" + WorkingDir;
|
||||
tooling::runToolOnCodeWithArgs(
|
||||
Factory->create(), CC, Context.InMemoryFileSystem,
|
||||
{"-std=c++11", "-fparse-all-comments", "-I."}, TestCCName, "clang-move",
|
||||
|
|
Loading…
Reference in New Issue