This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE326456: [clangd] Support include canonicalization in
symbol leve. (authored by ioeric, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D43869?vs=136561&id=136565#toc
Repository:
r
ioeric added inline comments.
Comment at: clangd/index/CanonicalIncludes.h:54
/// a canonical header name.
- llvm::StringRef mapHeader(llvm::StringRef Header) const;
+ /// An optional qualified symbol name can be provided to check against the
+ /// symbol mapping.
-
ioeric updated this revision to Diff 136561.
ioeric marked 2 inline comments as done.
ioeric added a comment.
- Merge with origin/master
- Address review comments.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D43869
Files:
clangd/index/CanonicalIncludes.cpp
clangd/index/Ca
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
Comment at: clangd/index/CanonicalIncludes.h:47
+ /// Sets the canonical include for any symbol with \p QualifiedName.
+ /// Header mappings are ignored if \p Qua
ioeric added inline comments.
Comment at: clangd/index/CanonicalIncludes.cpp:83
+ static const std::vector> SymbolMap = {
+ // Map symbols in to their preferred includes.
+ {"std::basic_filebuf", ""},
hokein wrote:
> Looks like the list only contains
hokein added inline comments.
Comment at: clangd/index/CanonicalIncludes.cpp:83
+ static const std::vector> SymbolMap = {
+ // Map symbols in to their preferred includes.
+ {"std::basic_filebuf", ""},
Looks like the list only contains stream-related s
ioeric created this revision.
ioeric added reviewers: sammccall, hokein.
Herald added subscribers: cfe-commits, jkorous-apple, ilya-biryukov, klimek.
Symbols with different canonical includes might be defined in the same header
(e.g. symbols defined in STL ). This patch adds support for mapping fr