ilya-biryukov added a reviewer: ilya-biryukov.
ilya-biryukov requested changes to this revision.
ilya-biryukov added a comment.

I just wanted to take a step back and discuss what we want to get from code 
hover in the first place.

I would expect a typical code hover to be a bit more involved and include:

- "kind" of a symbol under hover (i.e. a MACRO, global function, typedef, 
class/struct),
- type of the symbol, if applicable (i.e. types for local vars, typedefs, etc.),
- name of the symbol,
- containing namespace/class information (i.e. "member of namespace std", 
"member of class std::vector"),
- doc comment, if any.

We could start with a subset of those.

This could be implemented by reusing the code of `findDefinitions` that gets 
all `Decl` and `MacroDefinition` instances, referenced in the current location.
When you have a `Decl` or `MacroDefinition`, you could pretty-print the hover 
text.


https://reviews.llvm.org/D35894



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to