================
@@ -56,10 +56,11 @@ std::vector<Hinted<SymbolLocation>> locateDecl(const Decl
&D) {
std::vector<Hinted<SymbolLocation>> locateMacro(const Macro &M,
const tooling::stdlib::Lang L)
{
- // FIXME: Should we also provide physical locations?
+ std::vector<Hinted<SymbolLocation>> Result;
+ Result.push_back({M.Definition, Hints::CompleteSymbol});
----------------
kadircet wrote:
we also need to take care of "logical" duplicates now (see the comments in
clang-tools-extra/include-cleaner/lib/FindHeaders.cpp near `headersForSymbol`),
when the physical provider and stdlib provider are two independent headers we
don't really have an issue, but that's actually the rare case. in the common
case, we'll both recognize a symbol through stdlib mappings (e.g. `assert` and
`<assert>`) and through a physical definition (`assert` and
`/usr/include/something/assert`). despite of these being "same" headers, we'll
treat them separately and might assign different ranking symbols, yielding
hard-to-debug failures/confusion down the line.
I don't have good ideas around how to do this at the top of my head, but I am
happy to iterate if you have some proposals.
https://github.com/llvm/llvm-project/pull/173149
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits