diff options
author | Sam McCall <sam.mccall@gmail.com> | 2019-07-17 13:21:25 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2019-07-17 13:21:25 +0000 |
commit | 2889fe67691b4220e31bbf8c78b63474c973f26c (patch) | |
tree | a7604f05cd32b62fe15802c1126b1a603cf1d75a | |
parent | 6011a285edf2cf45ee6d660b6219abe3db9e7dc1 (diff) | |
download | bcm5719-llvm-2889fe67691b4220e31bbf8c78b63474c973f26c.tar.gz bcm5719-llvm-2889fe67691b4220e31bbf8c78b63474c973f26c.zip |
[clangd] Force the required interpretation of #import on windows tests.
Summary: NFC but should fix a bunch of tests.
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64857
llvm-svn: 366321
-rw-r--r-- | clang-tools-extra/clangd/unittests/TestTU.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/unittests/TestTU.cpp b/clang-tools-extra/clangd/unittests/TestTU.cpp index 4747f5ea2e3..7e771608706 100644 --- a/clang-tools-extra/clangd/unittests/TestTU.cpp +++ b/clang-tools-extra/clangd/unittests/TestTU.cpp @@ -38,6 +38,10 @@ ParsedAST TestTU::build() const { 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 |