The index library itself seems to never pass variable templates as
input, however clangd does.
Details
- Reviewers
kadircet - Commits
- rGf6faa382f3e0: [Index] Compute correct symbol kind for variable templates
rL361996: [Index] Compute correct symbol kind for variable templates
rCTE361996: [Index] Compute correct symbol kind for variable templates
rC361996: [Index] Compute correct symbol kind for variable templates
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 32610 Build 32609: arc lint + arc unit
Event Timeline
clang/lib/Index/IndexSymbol.cpp | ||
---|---|---|
99 | what about function and class templates? Are they handled in somewhere else? |
clang/lib/Index/IndexSymbol.cpp | ||
---|---|---|
99 | Yeah, they're handled in ifs and a large switch below. I tried unifying those cases (matching a TemplateDecl here instead of VarTemplateDecl), but they start producing different results for template classes and this function is mostly not called for templates from withing the index library (only for the underlying declarations) and it's only clangd that cares about the returned value in that case. So I decided to make a minimal change that fixes clangd, but does not change behavior of the index library to avoid potential fallout of a more general fix. |
LGTM
clang/lib/Index/IndexSymbol.cpp | ||
---|---|---|
99 | ok then it makes sense, could you also add a test case for one of the fall-through cases(static member/parameter(?) etc.)? |
clang/lib/Index/IndexSymbol.cpp | ||
---|---|---|
99 | Done. (Only static member, though, since we can't have templated parameters or non-static fields) |
what about function and class templates? Are they handled in somewhere else?