Author: Vitaly Buka Date: 2022-09-19T10:11:37-07:00 New Revision: 8edce2ff049d2fc635fc20c658daa283661a9958
URL: https://github.com/llvm/llvm-project/commit/8edce2ff049d2fc635fc20c658daa283661a9958 DIFF: https://github.com/llvm/llvm-project/commit/8edce2ff049d2fc635fc20c658daa283661a9958.diff LOG: [test][clangd] Join back -Xclang and -undef Added: Modified: clang-tools-extra/clangd/unittests/TestTU.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/unittests/TestTU.cpp b/clang-tools-extra/clangd/unittests/TestTU.cpp index f7d294ca2c26..03f1cd77191d 100644 --- a/clang-tools-extra/clangd/unittests/TestTU.cpp +++ b/clang-tools-extra/clangd/unittests/TestTU.cpp @@ -40,12 +40,14 @@ ParseInputs TestTU::inputs(MockFS &FS) const { ParseInputs Inputs; Inputs.FeatureModules = FeatureModules; auto &Argv = Inputs.CompileCommand.CommandLine; - Argv = {"clang", "-Xclang"}; + Argv = {"clang"}; // In tests, unless explicitly specified otherwise, omit predefined macros // (__GNUC__ etc) for a 25% speedup. There are hundreds, and we'd generate, // parse, serialize, and re-parse them! - if (!PredefineMacros) + if (!PredefineMacros) { + Argv.push_back("-Xclang"); Argv.push_back("-undef"); + } // FIXME: this shouldn't need to be conditional, but it breaks a // GoToDefinition test for some reason (getMacroArgExpandedLocation fails). if (!HeaderCode.empty()) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits