[PATCH] D108556: [clangd] Don't highlight ObjC `id` and `instancetype`
David Goldman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 24 07:51:33 PDT 2021
dgoldman added a comment.
In D108556#2962008 <https://reviews.llvm.org/D108556#2962008>, @kadircet wrote:
> thanks, it looks good as a contained fix. but it feels like we probably don't want these to be treated as decls in other places too (e.g. can we really provide any useful goto/hover on those `id` or `instancetype` decls?) maybe we should update ASTVisitors in FindTarget to not report these at all. WDYT?
That's a good point - I guess it could be marginally useful?
Hovering over instancetype you'll see `typedef id instancetype` and can be brought via goto definition to objc.h which defines `typedef struct objc_object *id;`. Hovering over id you see `typedef id id` (which is quite confusing) and go-to definition brings you to objc.h as well. In theory the hover information should show you `A pointer to an instance of a class.` (comment from objc.h), seems to have worked previously, not sure why it doesn't atm. References doesn't appear to work and you'd really never want to use it if it did - there'd be way too many.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108556/new/
https://reviews.llvm.org/D108556
More information about the cfe-commits
mailing list