[PATCH] D72395: [clangd] Publish xref for macros from Index and AST.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 8 06:34:55 PST 2020
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/XRefs.cpp:463
+ }
+ // Query the index for references from other files.
+ if (Index && Results.References.size() < Limit) {
----------------
could we merge this and the code for decls by only populating `Req.IDs` with `MacroSID` here and with the symbol id below and by finally making the query in the end ? i.e.
```
RefsRequest Req;
Req.Limit = Limit;
if (macro) {
handleMainFileMacros;
Req.IDs.insert(*MacroID);
} else {
handleMainFileDecls;
populateReqIDs(Req);
}
handleIndexResults(Req);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72395/new/
https://reviews.llvm.org/D72395
More information about the cfe-commits
mailing list