ioeric added inline comments.
================ Comment at: clangd/index/SymbolCollector.cpp:360 + + llvm::SmallString<128> USR; + if (index::generateUSRForMacro(Name.getName(), MI.getDefinitionLoc(), SM, ---------------- sammccall wrote: > as above, can we avoid generating the USR for every reference? > The macro name or hash thereof should be enough to identify it, right? I thought I needed to store both the name and the location in order to calculate USR for macros, and just calculating USRs seems easier and not too expensive. But after another look, it turned out that `IdentifierInfo` + `Preprocessor` would also work. Thanks for pressing on this! :) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49028 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits