@@ -208,7 +208,9 @@ runClangMoveOnCode(const move::MoveDefinitionSpec &Spec,
208
208
DeclarationReporter *const Reporter = nullptr ) {
209
209
clang::RewriterTestContext Context;
210
210
211
- Context.InMemoryFileSystem ->setCurrentWorkingDirectory (WorkingDir);
211
+ llvm::SmallString<16 > Dir (WorkingDir);
212
+ llvm::sys::path::native (Dir);
213
+ Context.InMemoryFileSystem ->setCurrentWorkingDirectory (Dir);
212
214
213
215
std::map<llvm::StringRef, clang::FileID> FileToFileID;
214
216
@@ -224,13 +226,12 @@ runClangMoveOnCode(const move::MoveDefinitionSpec &Spec,
224
226
CreateFiles (TestCCName, CC);
225
227
226
228
std::map<std::string, tooling::Replacements> FileToReplacements;
227
- ClangMoveContext MoveContext = {Spec, FileToReplacements, WorkingDir , " LLVM" ,
229
+ ClangMoveContext MoveContext = {Spec, FileToReplacements, Dir. c_str () , " LLVM" ,
228
230
Reporter != nullptr };
229
231
230
232
auto Factory = std::make_unique<clang::move::ClangMoveActionFactory>(
231
233
&MoveContext, Reporter);
232
234
233
- // std::string IncludeArg = Twine("-I" + WorkingDir;
234
235
tooling::runToolOnCodeWithArgs (
235
236
Factory->create (), CC, Context.InMemoryFileSystem ,
236
237
{" -std=c++11" , " -fparse-all-comments" , " -I." }, TestCCName, " clang-move" ,
0 commit comments