[PATCH] D85253: [clangd] Show correct hover tooltip for non-preamble macro definition.

2020-08-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > I'm not quite sure there should be no tooltip for a #define. Such tooltip is > not really useful, but at the same time clangd shows tooltips for function > declarations/defnitions, namespaces, variables, etc. and not showing it for > macro definition will be a little

[PATCH] D85253: [clangd] Show correct hover tooltip for non-preamble macro definition.

2020-08-05 Thread Ilya Golovenko via Phabricator via cfe-commits
ilya-golovenko added a comment. I agree the fix is not correct. I will check how it currently works with clangd built from master branch. I'm not quite sure there should be no tooltip for a `#define`. Such tooltip is not really useful, but at the same time clangd shows tooltips for function de

[PATCH] D85253: [clangd] Show correct hover tooltip for non-preamble macro definition.

2020-08-05 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Sigh, (I think) this is working for macros defined in preamble region as a side effect of preamble being loaded separately and before anything in the main file. E.g. #define FO^O 1 #define FOO 2 void foo() { int x = FOO; }; hovering over the first definition

[PATCH] D85253: [clangd] Show correct hover tooltip for non-preamble macro definition.

2020-08-04 Thread Ilya Golovenko via Phabricator via cfe-commits
ilya-golovenko added reviewers: kadircet, sammccall. ilya-golovenko added a comment. I'm not quite sure my fix is the best way to fix the issue, so any advices are appreciated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85253/new/ https://revie

[PATCH] D85253: [clangd] Show correct hover tooltip for non-preamble macro definition.

2020-08-04 Thread Ilya Golovenko via Phabricator via cfe-commits
ilya-golovenko created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. ilya-golovenko requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Incorrect definition is shown in tooltip when hove