This resolves the issue of introducing c++-style includes for C files.
- refactor the gen_std.py, make it reusable for parsing C symbols.
- add a language mode to the mapping method to use different mapping for C and C++ files.
Paths
| Differential D63270
[clangd] Add include-mapping for C symbols. ClosedPublic Authored by hokein on Jun 13 2019, 7:42 AM.
Details Summary This resolves the issue of introducing c++-style includes for C files.
Diff Detail
Event Timeline
hokein marked 7 inline comments as done. Comment ActionsAddress review comments.
kadircet added inline comments.
This revision is now accepted and ready to land.Jun 14 2019, 4:05 AM Closed by commit rL364044: [clangd] Add include-mapping for C symbols. (authored by hokein). · Explain WhyJun 21 2019, 6:31 AM This revision was automatically updated to reflect the committed changes. Comment Actions This is awesome, but the script doesn't work anymore with -language=cpp -- is there any interest in looking into that? The C++ Standard Library has changed quite a bit recently and it would be great to update the mapping for the C++ Library.
Revision Contents
Diff 205988 clang-tools-extra/trunk/clangd/CSymbolMap.inc
clang-tools-extra/trunk/clangd/ClangdUnit.cpp
clang-tools-extra/trunk/clangd/StdSymbolMap.inc
clang-tools-extra/trunk/clangd/include-mapping/cppreference_parser.py
clang-tools-extra/trunk/clangd/include-mapping/gen_std.py
clang-tools-extra/trunk/clangd/include-mapping/test.py
clang-tools-extra/trunk/clangd/index/CanonicalIncludes.h
clang-tools-extra/trunk/clangd/index/CanonicalIncludes.cpp
clang-tools-extra/trunk/clangd/index/IndexAction.cpp
clang-tools-extra/trunk/clangd/unittests/CanonicalIncludesTests.cpp
clang-tools-extra/trunk/clangd/unittests/SymbolCollectorTests.cpp
|