[PATCH] D68108: Redeclare Objective-C property accessors inside the ObjCImplDecl in which they are synthesized.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 21 11:33:46 PDT 2019


rjmccall added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5063
                                  const_cast<ObjCImplementationDecl *>(D), PID);
     }
   }
----------------
aprantl wrote:
> rjmccall wrote:
> > Is this special treatment still necessary?  Won't we encounter the getter and setter on the normal pass over the method definitions in the `@implementation`?
> We don't know which ObjMethodDecls without bodies are property accessor implementations since there is no pointer from the ObjCMethodDecl back to the ObjCPropertyImplDecl.
I mean, this doesn't seem like an unreasonable thing to be able to discover given just an `ObjCMethodDecl`.  We can certainly set something on the declaration that says that it represents a synthesized method definition (and is therefore a definition for the purposes of `isDefined` or anything similar).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68108/new/

https://reviews.llvm.org/D68108





More information about the cfe-commits mailing list