[PATCH] D119363: [clang] Add `ObjCProtocolLoc` to represent protocol references
David Goldman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 9 11:58:27 PST 2022
dgoldman created this revision.
Herald added subscribers: usaxena95, kadircet.
dgoldman requested review of this revision.
Herald added subscribers: cfe-commits, ilya-biryukov.
Herald added a project: clang.
Add `ObjCProtocolLoc` which behaves like `TypeLoc` but for
`ObjCProtocolDecl` references.
RecursiveASTVisitor now synthesizes `ObjCProtocolLoc` during traversal
and the `ObjCProtocolLoc` can be stored in a `DynTypedNode`.
In a follow up patch, I'll update clangd to make use of this
to properly support protocol references for hover + goto definition.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119363
Files:
clang/include/clang/AST/ASTFwd.h
clang/include/clang/AST/ASTTypeTraits.h
clang/include/clang/AST/RecursiveASTVisitor.h
clang/include/clang/AST/TypeLoc.h
clang/lib/AST/ASTTypeTraits.cpp
clang/lib/AST/ParentMapContext.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119363.407234.patch
Type: text/x-patch
Size: 9078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220209/5c996ef3/attachment.bin>
More information about the cfe-commits
mailing list