diff options
author | Sam McCall <sam.mccall@gmail.com> | 2018-04-20 11:35:17 +0000 |
---|---|---|
committer | Sam McCall <sam.mccall@gmail.com> | 2018-04-20 11:35:17 +0000 |
commit | 28f3a574f35bbdf4a7f1dfbaf68ee8ae5cc4db4d (patch) | |
tree | 756e22ad0452579d9d85ba565be9c3ce62c81ba7 /clang-tools-extra/unittests/clangd/TestFS.cpp | |
parent | b60ebd79ee23e308625392e1ef09a233236acda6 (diff) |
Parse .h files as objective-c++ if we don't have a compile command.
Summary: This makes C++/objC not totally broken, without hurting C files too much.
Reviewers: ilya-biryukov
Subscribers: klimek, jkorous-apple, ioeric, cfe-commits
Differential Revision: https://reviews.llvm.org/D45442
Diffstat (limited to 'clang-tools-extra/unittests/clangd/TestFS.cpp')
-rw-r--r-- | clang-tools-extra/unittests/clangd/TestFS.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang-tools-extra/unittests/clangd/TestFS.cpp b/clang-tools-extra/unittests/clangd/TestFS.cpp index 2484590e2d2..4914c8acaae 100644 --- a/clang-tools-extra/unittests/clangd/TestFS.cpp +++ b/clang-tools-extra/unittests/clangd/TestFS.cpp @@ -55,8 +55,10 @@ const char *testRoot() { std::string testPath(PathRef File) { assert(sys::path::is_relative(File) && "FileName should be relative"); + SmallString<32> NativeFile = File; + sys::path::native(NativeFile); SmallString<32> Path; - sys::path::append(Path, testRoot(), File); + sys::path::append(Path, testRoot(), NativeFile); return Path.str(); } |