sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land.
================ Comment at: clangd/AST.h:41 +/// Gets the symbol ID for a macro, if possible. +llvm::Optional<SymbolID> getSymbolID(const IdentifierInfo &II, + const MacroInfo *MI, ---------------- maybe add a comment about the semantics of macro symbol IDs - particularly that they depend on the exact file offset. We could change these semantics in future by reimplementing this function, there's no reason we have to use USRs for everything, and macros are really simple. ================ Comment at: clangd/index/SymbolCollector.cpp:389 llvm::SmallString<128> USR; if (index::generateUSRForMacro(Name->getName(), MI->getDefinitionLoc(), SM, USR)) ---------------- this is now dead ================ Comment at: clangd/index/SymbolCollector.cpp:452 if (const auto *MI = PP->getMacroDefinition(II).getMacroInfo()) if (!index::generateUSRForMacro(II->getName(), MI->getDefinitionLoc(), PP->getSourceManager(), USR)) ---------------- update this to use getSymbolID Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51688 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits