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

David Chisnall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 11 06:02:49 PST 2018


theraven added a comment.

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).

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')?



================
Comment at: lib/Sema/SemaDeclObjC.cpp:3881
+  unsigned long encodingSize = LangOpts.ObjCLargeEncodingSize;
+  if (encodingSize == 0) return;
+  for (ObjCIvarDecl *ivar = ID->getClassInterface()->all_declared_ivar_begin();
----------------
I missed this early exit on the first pass, please can you add some spacing to make it more obvious?


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