[clangd] Preserve extra args in PreambleTests::IncludeParsing to fix windows build...
authorKadir Cetinkaya <kadircet@google.com>
Fri, 29 May 2020 10:35:16 +0000 (12:35 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Fri, 29 May 2020 10:35:25 +0000 (12:35 +0200)
clang-tools-extra/clangd/unittests/PreambleTests.cpp

index 75aad72..b1548ef 100644 (file)
@@ -48,7 +48,7 @@ collectPatchedIncludes(llvm::StringRef ModifiedContents,
   TU.ExtraArgs = {"-fno-ms-compatibility"};
   auto BaselinePreamble = TU.preamble();
   // Create the patch.
-  TU = TestTU::withCode(ModifiedContents);
+  TU.Code = ModifiedContents.str();
   auto PI = TU.inputs();
   auto PP = PreamblePatch::create(testPath(TU.Filename), PI, *BaselinePreamble);
   // Collect patch contents.