Add -Wobjc-property-assign-on-object-type.
authorJohn McCall <rjmccall@apple.com>
Wed, 5 Sep 2018 19:02:00 +0000 (19:02 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 5 Sep 2018 19:02:00 +0000 (19:02 +0000)
commit52a503d4f333d7f8ccfde50fa7a2fb5fe11c4b1d
treed376cfc3279240d0d073b1c8fbf91b2c7e7cb2f8
parentd2eb03aec831f2990ffb05e6a1421aaa6c3eb612
Add -Wobjc-property-assign-on-object-type.

This is a warning about using 'assign' instead of 'unsafe_unretained'
in Objective-C property declarations.  It's off by default because there
isn't consensus in the Objective-C steering group that this is the right
thing to do, but we're nonetheless okay with adding it because there's a
substantial pool of Objective-C programmers who will appreciate the warning.

Patch by Alfred Zien!

llvm-svn: 341489
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaObjCProperty.cpp
clang/test/SemaObjC/property-assign-on-object-type.m [new file with mode: 0644]
clang/test/SemaObjC/property-in-class-extension-1.m