This revision was automatically updated to reflect the committed changes.
Closed by commit rL330418: Parse .h files as objective-c++ if we don't
have a compile command. (authored by sammccall, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: jkorous.
LGTM
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45442
___
cfe-commits mail
sammccall added a comment.
@ilya-biryukov Ping :-)
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45442
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
sammccall added a comment.
Added a unit test, and cleaned up a couple of things to make it pass:
- GlobalCompilationDatabase.h wasn't self-contained due to incomplete types
- testPath() isn't very usable with subdirectories on windows
Comment at: clangd/GlobalCompilationDataba
sammccall updated this revision to Diff 141957.
sammccall added a comment.
Herald added a subscriber: mgorny.
Add test, shave required yaks
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45442
Files:
clangd/GlobalCompilationDatabase.cpp
clangd/GlobalCompilationDatabase.h
ilya-biryukov added inline comments.
Comment at: clangd/GlobalCompilationDatabase.cpp:24
+ // Parsing as Objective C++ is friendly to more cases.
+ if (llvm::sys::path::extension(File) == ".h")
+Argv.push_back("-xobjective-c++-header");
sammccall wrote:
> i
sammccall added a comment.
Will try to add a test.
Comment at: clangd/GlobalCompilationDatabase.cpp:24
+ // Parsing as Objective C++ is friendly to more cases.
+ if (llvm::sys::path::extension(File) == ".h")
+Argv.push_back("-xobjective-c++-header");
ilya
ilya-biryukov added a comment.
ObjC++ definitely seems like a nicer default. Unfortunately, we'll start
getting ObjC++ completion results, which may be confusing. But that seems like
a smaller evil.
Is there an easy way to add a regression test that checks we don't get any
errors for headers w
sammccall created this revision.
sammccall added a reviewer: ilya-biryukov.
Herald added subscribers: cfe-commits, ioeric, jkorous-apple, klimek.
This makes C++/objC not totally broken, without hurting C files too much.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D45442
Files