[PATCH] D122446: [clang][extract-api] Add Objective-C interface support

Daniel Grumberg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 29 12:12:59 PDT 2022


dang accepted this revision.
dang added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:642-648
+// Instantiate template for FunctionDecl.
+template FunctionSignature
+DeclarationFragmentsBuilder::getFunctionSignature(const FunctionDecl *);
+
+// Instantiate template for ObjCMethodDecl.
+template FunctionSignature
+DeclarationFragmentsBuilder::getFunctionSignature(const ObjCMethodDecl *);
----------------
zixuw wrote:
> dang wrote:
> > Do we need to explicitly instantiate them? Wouldn't they get instantiated as needed?
> Yeah since we are implementing the templated method here instead of in the header file, we need to explicitly instantiate it so that the symbol ends up in `DeclarationFragments.o` and picked up by the linker.
Oh yeah right of course.


================
Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:660
+
+// Subheading of an Objective-C method is a `+` or `-` sign indicating whether
+// it's a class method or an instance method, followed by the selector name.
----------------
dang wrote:
> We shouldn't be appending the +/- here. We can discuss this more offline
Nevermind We do need them here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122446



More information about the cfe-commits mailing list