[clang-tools-extra] 1772adb - [clangd] Preserve extra args in PreambleTests::IncludeParsing to fix windows build bots

Kadir Cetinkaya via cfe-commits cfe-commits at lists.llvm.org
Fri May 29 03:35:36 PDT 2020


Author: Kadir Cetinkaya
Date: 2020-05-29T12:35:25+02:00
New Revision: 1772adb0594bf0d8684fe8b63609352ad4a1ccf0

URL: https://github.com/llvm/llvm-project/commit/1772adb0594bf0d8684fe8b63609352ad4a1ccf0
DIFF: https://github.com/llvm/llvm-project/commit/1772adb0594bf0d8684fe8b63609352ad4a1ccf0.diff

LOG: [clangd] Preserve extra args in PreambleTests::IncludeParsing to fix windows build bots

Added: 
    

Modified: 
    clang-tools-extra/clangd/unittests/PreambleTests.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/unittests/PreambleTests.cpp b/clang-tools-extra/clangd/unittests/PreambleTests.cpp
index 75aad728280a..b1548ef4732b 100644
--- a/clang-tools-extra/clangd/unittests/PreambleTests.cpp
+++ b/clang-tools-extra/clangd/unittests/PreambleTests.cpp
@@ -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.


        


More information about the cfe-commits mailing list