diff options
| -rw-r--r-- | clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp index e8b7ba35bf8..45e3f682321 100644 --- a/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp +++ b/clang-tools-extra/unittests/clang-move/ClangMoveTests.cpp @@ -239,8 +239,10 @@ runClangMoveOnCode(const move::MoveDefinitionSpec &Spec, // The Key is file name, value is the new code after moving the class. std::map<std::string, std::string> Results; for (const auto &It : FileToReplacements) { - StringRef FilePath = It.first; - Results[FilePath] = Context.getRewrittenText(FileToFileID[FilePath]); + // The path may come out as "./foo.h", normalize to "foo.h". + SmallString<32> FilePath (It.first); + llvm::sys::path::remove_dots(FilePath); + Results[FilePath.str().str()] = Context.getRewrittenText(FileToFileID[FilePath]); } return Results; } |

