[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 28 18:01:28 PDT 2021


ahatanak added inline comments.


================
Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3403
   }
   Ty = getFunctionOrMethodResultType(D);
   if (!isNSStringType(Ty, S.Context, /*AllowNSAttributedString=*/true) &&
----------------
Is it possible to just replace `Ty` with the class pointer type here if it is an instancetype instead of defining another function (`isNSStringInterface`) that looks at the class name and determines whether it's `NSString`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112670



More information about the cfe-commits mailing list