[PATCH] D146866: [clang][ExtractAPI] Remove extra pointer indirection from declaration fragments for Obj-C lightweight generics on id

Daniel Grumberg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 29 08:24:57 PDT 2023


dang added inline comments.


================
Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:176
+
+    // id<protocol> is an qualified id type
+    if (!T->getAs<ObjCObjectPointerType>()->isObjCQualifiedIdType()) {
----------------



================
Comment at: clang/lib/ExtractAPI/DeclarationFragments.cpp:176
+
+    // id<protocol> is an qualified id type
+    if (!T->getAs<ObjCObjectPointerType>()->isObjCQualifiedIdType()) {
----------------
dang wrote:
> 
IIUC the distinction here is that `id<Protocol>` is a `id` qualified type, but `id<Protocol> *` is not? If so this is a fairly subtle point, and worth mentioning in this comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146866



More information about the cfe-commits mailing list