[all-commits] [llvm/llvm-project] 6eb969: [objc_direct] fix codegen for mismatched Decl/Impl...
Pierre Habouzit via All-commits
all-commits at lists.llvm.org
Thu Jan 30 18:19:12 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 6eb969b7c5b5195d7f85b70e2e060eb2989cdc3c
https://github.com/llvm/llvm-project/commit/6eb969b7c5b5195d7f85b70e2e060eb2989cdc3c
Author: Pierre Habouzit <phabouzit at apple.com>
Date: 2020-01-30 (Thu, 30 Jan 2020)
Changed paths:
M clang/lib/CodeGen/CGObjCMac.cpp
A clang/test/CodeGenObjC/direct-method-ret-mismatch.m
Log Message:
-----------
[objc_direct] fix codegen for mismatched Decl/Impl return types
For non direct methods, the codegen uses the type of the Implementation.
Because Objective-C rules allow some differences between the Declaration
and Implementation return types, when the Implementation is in this
translation unit, the type of the Implementation should be preferred to
emit the Function over the Declaration.
Radar-Id: rdar://problem/58797748
Signed-off-by: Pierre Habouzit <phabouzit at apple.com>
Differential Revision: https://reviews.llvm.org/D73208
Commit: bebb8e2596af8fe97f9b6356ff06e4e80580cf32
https://github.com/llvm/llvm-project/commit/bebb8e2596af8fe97f9b6356ff06e4e80580cf32
Author: Pierre Habouzit <phabouzit at apple.com>
Date: 2020-01-30 (Thu, 30 Jan 2020)
Changed paths:
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/AttrDocs.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Sema/SemaDeclObjC.cpp
M clang/lib/Sema/SemaExprObjC.cpp
M clang/lib/Sema/SemaObjCProperty.cpp
A clang/test/FixIt/fixit-objc-direct.m
M clang/test/Misc/pragma-attribute-supported-attributes-list.test
A clang/test/SemaObjC/category-direct-properties.m
M clang/test/SemaObjC/method-direct.m
Log Message:
-----------
[objc_direct] Small updates to help with adoption.
Add fixits for messaging self in MRR or using super, as the intent is
clear, and it turns out people do that a lot more than expected.
Allow for objc_direct_members on main interfaces, it's extremely useful
for internal only classes, and proves to be quite annoying for adoption.
Add some better warnings around properties direct/non-direct clashes (it
was done for methods but properties were a miss).
Radar-Id: rdar://problem/58355212
Signed-off-by: Pierre Habouzit <phabouzit at apple.com>
Compare: https://github.com/llvm/llvm-project/compare/31905c2bbb80...bebb8e2596af
More information about the All-commits
mailing list