With this patch the findReferences API will return Xref for macros.
If the symbol under the cursor is a macro then we collect the references to it from:
- Main file by looking at the ParsedAST. (These were added to the ParsedAST in https://reviews.llvm.org/D70008)
- Files other than the mainfile by looking at the:
- static index (Added in https://reviews.llvm.org/D70489)
- file index (Added in https://reviews.llvm.org/D71406)
This patch collects all the xref from the above places and outputs it in findReferences API.
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.