[PATCH] D97617: [clangd] ObjC fixes for semantic highlighting and xref highlights
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 27 13:29:24 PST 2021
sammccall created this revision.
sammccall added a reviewer: dgoldman.
Herald added subscribers: usaxena95, kadircet, arphaman.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.
- highlight references to protocols in class/protocol/extension decls
- support multi-token selector highlights in semantic + xref highlights (method calls and declarations only)
- In `@interface I(C)`, I now references the interface and C the category
- highlight uses of interfaces as types
- added semantic highlightings of protocol names (as "interface") and category names (as "namespace"). These are both standard kinds, maybe "extension" will be standardized...
- highlight `auto` as "class" when it resolves to an ObjC pointer
- don't highlight `self` as a variable even though the AST models it as one
Not fixed: uses of protocols in type names (needs some refactoring of
unrelated code first)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97617
Files:
clang-tools-extra/clangd/FindTarget.cpp
clang-tools-extra/clangd/SemanticHighlighting.cpp
clang-tools-extra/clangd/SemanticHighlighting.h
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/unittests/FindTargetTests.cpp
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
clang-tools-extra/clangd/unittests/XRefsTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97617.326921.patch
Type: text/x-patch
Size: 17490 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210227/0a12a6b2/attachment.bin>
More information about the cfe-commits
mailing list