[PATCH] D70008: [clangd] Store xref for Macros in ParsedAST.

UTKARSH SAXENA via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 11 05:47:17 PST 2019


usaxena95 added inline comments.


================
Comment at: clang-tools-extra/clangd/XRefs.cpp:898
+  // Handle macros.
+  if (auto Macro = locateMacroAt(Loc, AST.getPreprocessor())) {
+    if (auto MacroSID = getSymbolID(Macro->Name, Macro->Info, SM)) {
----------------
hokein wrote:
> this is not completed, it only shows the macro refs in main file, we still need to query the index to get the rest (but our index doesn't collect macro at the moment). I'd prefer not doing this in this patch until our index is ready.
> 
> For testing, I think we can create a new test file for `CollectMainFileMacros`.
Yup. This patch is just for the main file. The index and the lookup will be modified in the next patch. Wanted to keep this small.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70008/new/

https://reviews.llvm.org/D70008





More information about the cfe-commits mailing list