[PATCH] D55544: Warning: objc-encodings-larger-than=
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 14 16:41:44 PST 2018
ahatanak added a comment.
The patch looks largely fine to me.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6207
+def warn_objc_method_encoding_too_large : Warning<
+ "%0 method %1 encoding of size %2 is larger than %3 bytes">,
+ InGroup<ObjCEncodingLargerThan>;
----------------
You can use '%select' to choose between "class" and "instance" for %0.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6209
+ InGroup<ObjCEncodingLargerThan>;
+def warn_objc_block_encoding_too_large : Warning<
+ "block argument encoding of size %0 is larger than %1 bytes">,
----------------
You can merge warn_objc_block_encoding_too_large and warn_objc_ivar_encoding_too_large using '%select'.
================
Comment at: test/SemaObjC/objc-large-encoding-warn.m:16
+ id idThatDoesntWarn;
+}
+ at end
----------------
Can you add tests for properties and categories just to make sure clang prints the expected diagnostics?
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