[PATCH] D44293: [clangd] Fix irrelevant declaratations in goto definition (on macros).
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 12 05:29:39 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: clangd/XRefs.cpp:201
std::vector<MacroDecl> MacroInfos = DeclMacrosFinder->takeMacroInfos();
+ if (!MacroInfos.empty()) {
+ for (auto Item : MacroInfos) {
----------------
I wonder whether we should fix the `DeclrationAndMacrosFinder` to not return declarations coming from macro instantiations instead.
There are other clients (e.g. document highlights) that will probably break in the same way.
Do you think it would be possible and it would make sense for `DeclrationAndMacrosFinder` to only return a macro in this case and not return Decls coming from macro expansions?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44293
More information about the cfe-commits
mailing list