diff options
author | Russell Gallop <russell.gallop@gmail.com> | 2019-07-12 15:15:56 +0000 |
---|---|---|
committer | Russell Gallop <russell.gallop@gmail.com> | 2019-07-12 15:15:56 +0000 |
commit | fb5e42106a4a6083b0a56b66082c6ee39c6f043b (patch) | |
tree | ddd41ffc483fdd6671fe6a383db9bb6ece64da5d /unittests/Tooling | |
parent | e4b85c062d1086e9b5e55ce6eaf23031e3f2aad4 (diff) | |
download | clang-fb5e42106a4a6083b0a56b66082c6ee39c6f043b.tar.gz |
Revert "[JSONCompilationDatabase] Strip distcc/ccache/gomacc wrappers from parsed commands."
New test is failing on Windows bot
This reverts commit 9c0391b36a76f8e3949588de3f44b7314c2318bf.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365906 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Tooling')
-rw-r--r-- | unittests/Tooling/CompilationDatabaseTest.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/unittests/Tooling/CompilationDatabaseTest.cpp b/unittests/Tooling/CompilationDatabaseTest.cpp index 679402975c..da7ae09917 100644 --- a/unittests/Tooling/CompilationDatabaseTest.cpp +++ b/unittests/Tooling/CompilationDatabaseTest.cpp @@ -370,30 +370,6 @@ TEST(findCompileArgsInJsonDatabase, FindsEntry) { EXPECT_EQ("command4", FoundCommand.CommandLine[0]) << ErrorMessage; } -TEST(findCompileArgsInJsonDatabase, ParsesCompilerWrappers) { - std::vector<std::pair<std::string, std::string>> Cases = { - {"distcc gcc foo.c", "gcc foo.c"}, - {"gomacc clang++ foo.c", "clang++ foo.c"}, - {"ccache gcc foo.c", "gcc foo.c"}, - {"ccache.exe gcc foo.c", "gcc foo.c"}, - {"ccache g++.exe foo.c", "g++.exe foo.c"}, - {"ccache distcc gcc foo.c", "gcc foo.c"}, - - {"distcc foo.c", "distcc foo.c"}, - {"distcc -I/foo/bar foo.c", "distcc -I/foo/bar foo.c"}, - }; - std::string ErrorMessage; - - for (const auto &Case : Cases) { - std::string DB = R"([{"directory":".", "file":"/foo.c", "command":")" + - Case.first + "\"}]"; - CompileCommand FoundCommand = - findCompileArgsInJsonDatabase("/foo.c", DB, ErrorMessage); - EXPECT_EQ(Case.second, llvm::join(FoundCommand.CommandLine, " ")) - << Case.first; - } -} - static std::vector<std::string> unescapeJsonCommandLine(StringRef Command) { std::string JsonDatabase = ("[{\"directory\":\"//net/root\", \"file\":\"test\", \"command\": \"" + |