diff options
author | Kadir Cetinkaya <kadircet@google.com> | 2022-08-17 16:54:04 +0200 |
---|---|---|
committer | Kadir Cetinkaya <kadircet@google.com> | 2022-10-25 09:58:49 +0200 |
commit | 772fc63f5bb50996370797e55682dd65960d921a (patch) | |
tree | 21203caa645d4e3806b29f9ab407aea7d12179e7 /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | |
parent | 3a3603ff99ffd7dd7c8d166ba6d15078e33a5f71 (diff) | |
download | llvm-772fc63f5bb50996370797e55682dd65960d921a.zip llvm-772fc63f5bb50996370797e55682dd65960d921a.tar.gz llvm-772fc63f5bb50996370797e55682dd65960d921a.tar.bz2 |
[IncludeCleaner] Handle more C++ constructs
Summary:
This brings IncludeCleaner's reference discovery from AST to the parity
with current implementation in clangd. Some highlights:
- Handling of MemberExprs, only the member declaration is marked as
referenced and not the container, unlike clangd.
- Constructor calls, only the constructor and not the container, unlike
clangd.
- All the possible candidates for unresolved overloads, same as clangd.
- All the shadow decls for using-decls, same as clangd.
- Declarations for definitions of enums with an underlying type and
functions, same as clangd.
- Using typelocs, using templatenames and typedefs only reference the
found decl, same as clangd.
- Template specializations only reference the primary template, not the
explicit specializations, to be fixed.
- Expr types aren't marked as used, unlike clangd.
Going forward, we can consider having signals to indicate type of a
reference (e.g. `implicit` signal for type of an expr) so that the
applications can perform a filtering based on their needs.
At the moment the biggest discrepancy is around type of exprs, i.e. not
marking containers for member/constructor accesses. I believe this is
the right model since the declaration of the member and the container
should be available in a single file (modulo macros).
Reviewers: sammccall
Subscribers:
Differential Revision: https://reviews.llvm.org/D132110
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions