This makes C++/objC not totally broken, without hurting C files too much.
Details
Diff Detail
- Repository
- rCTE Clang Tools Extra
- Build Status
Buildable 16958 Build 16958: arc lint + arc unit
Event Timeline
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 without compile command with C++/ObjC++ code?
clangd/GlobalCompilationDatabase.cpp | ||
---|---|---|
24 | Maybe use .equals_lower(".h") instead? Just in case. |
Will try to add a test.
clangd/GlobalCompilationDatabase.cpp | ||
---|---|---|
24 | .H is (unambiguously) c++, and will be treated as such by clang. |
clangd/GlobalCompilationDatabase.cpp | ||
---|---|---|
24 | Wasn't aware of that convention, thanks. |
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
clangd/GlobalCompilationDatabase.cpp | ||
---|---|---|
24 | Yeah .C/.H is rare these days I think. (But present in Driver/Types.cpp) |
Maybe use .equals_lower(".h") instead? Just in case.