[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()
David Goldman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 10 08:39:26 PST 2020
dgoldman requested changes to this revision.
dgoldman added inline comments.
This revision now requires changes to proceed.
================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:624
+ /*IsDecl=*/false,
+ // Select the getter, setter, or @property depending on the call.
+ explicitReferenceTargets(DynTypedNode::create(*E), {})});
----------------
Worth mentioning this is handled in `add()`'s `Visitor`'s `VisitObjCPropertyRefExpr`?
================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:740
+ bool TraverseOpaqueValueExpr(OpaqueValueExpr *OVE) {
+ visitNode(DynTypedNode::create(*OVE));
----------------
Worth noting that these two functions are used currently for ObjC?
================
Comment at: clang-tools-extra/clangd/unittests/FindTargetTests.cpp:978
+ void foo() {
+ $0^f.$1^x.$2^y = 0;
+ }
----------------
Would also be good to have a test for implicit property refs (e.g `- (int)z; obj.z;`) Or maybe this should go in the other diff?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72508/new/
https://reviews.llvm.org/D72508
More information about the cfe-commits
mailing list