[PATCH] D35894: [clangd] Code hover for Clangd
Marc-Andre Laperle via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 29 09:40:27 PST 2017
malaperle added inline comments.
================
Comment at: clangd/ClangdUnit.cpp:1173
+ H.range = L.range;
+ Ref = getDataBufferFromSourceRange(AST, SR, L);
+ }
----------------
malaperle wrote:
> malaperle wrote:
> > I get the same crash as I mentioned before if I hover on the class in "isa<ObjCMethodDecl>(D)", from Clangdunit.cpp (disclaimer: I'm testing with older source so it might not be there anymore.)
> >
> > I have still yet to investigate this.
> I think it has to do with macro expansions, the plot thickens..
ObjCMethodDecl is forward-declared in astfwd.h as part of a macro expansion. We have to either use the expansion loc or spelling loc to get the appropriate file entry. Probably expansion loc makes more sense but I'll test a bit.
https://reviews.llvm.org/D35894
More information about the cfe-commits
mailing list