[PATCH] D72508: [clangd] Support pseudo-obj expr, opaque values, and property references in findExplicitReferences()

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 25 07:07:00 PST 2020


sammccall added inline comments.


================
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), {})});
----------------
dgoldman wrote:
> Worth mentioning this is handled in `add()`'s `Visitor`'s `VisitObjCPropertyRefExpr`?
I don't think we should echo the code structure here, it could change.


================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:740
 
+  bool TraverseOpaqueValueExpr(OpaqueValueExpr *OVE) {
+    visitNode(DynTypedNode::create(*OVE));
----------------
dgoldman wrote:
> Worth noting that these two functions are used currently for ObjC?
These functions are used for ObjC because these node types are used for objC - documenting that belongs on the AST class.
(I guess it's not currently done because someone currently/previously had an ambition to use these for other things, thus the generic names)


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