[PATCH] D55544: Warning: objc-encodings-larger-than=

Dave MacLachlan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 11 09:22:20 PST 2018


dmaclach added a comment.

In D55544#1326956 <https://reviews.llvm.org/D55544#1326956>, @theraven wrote:

> It would probably be a good idea to have a similar check on properties, as property encoding strings contain the type encoding (plus extra stuff).


Properties are already picked up based on the ivars and methods that they generate.

> I wonder if we also want an option in code generation to replace very long type encodings (or encodings of specifically annotated ivars?) with `"?"` ('unknown type')?

Yeah, this is the next step. I'm trying to decide how best to do this. For a large cross platform code base I don't necessarily want to have folks having to annotate every C++ class they use with a somewhat non-portable annotation. At the same time you can't make all structs/classes encode as ? because I think it will mess up some existing Objective C patterns such as NSCoding.


Repository:
  rC Clang

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

https://reviews.llvm.org/D55544





More information about the cfe-commits mailing list