[PATCH] D64857: [clangd] Force the required interpretation of #import on windows tests.

Sam McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 02:56:49 PDT 2019


sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added subscribers: llvm-commits, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: LLVM.

NFC but should fix a bunch of tests.


Repository:
  rL LLVM

https://reviews.llvm.org/D64857

Files:
  clang-tools-extra/clangd/unittests/TestTU.cpp


Index: clang-tools-extra/clangd/unittests/TestTU.cpp
===================================================================
--- clang-tools-extra/clangd/unittests/TestTU.cpp
+++ clang-tools-extra/clangd/unittests/TestTU.cpp
@@ -38,6 +38,10 @@
     Cmd.push_back("-include");
     Cmd.push_back(ImplicitHeaderGuard ? ImportThunk.c_str()
                                       : FullHeaderName.c_str());
+    // ms-compatibility changes the meaning of #import.
+    // The default is OS-dependent (on on windows), ensure it's off.
+    if (ImplicitHeaderGuard)
+      Cmd.push_back("-fno-ms-compatibility");
   }
   Cmd.insert(Cmd.end(), ExtraArgs.begin(), ExtraArgs.end());
   // Put the file name at the end -- this allows the extra arg (-xc++) to


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64857.210279.patch
Type: text/x-patch
Size: 745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190717/35b705a0/attachment.bin>


More information about the llvm-commits mailing list