This revision was automatically updated to reflect the committed changes.
Closed by commit rL297019: [Sema][ObjC] Warn about 'performSelector' calls with
selectors (authored by arphaman).
Changed prior to commit:
https://reviews.llvm.org/D30174?vs=90473&id=90709#toc
Repository:
rL LLVM
http
ahatanak accepted this revision.
ahatanak added a comment.
This revision is now accepted and ready to land.
Looks good, thanks!
Repository:
rL LLVM
https://reviews.llvm.org/D30174
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lis
arphaman updated this revision to Diff 90473.
arphaman marked 3 inline comments as done.
arphaman added a comment.
The updated diff:
- Warns for vector types.
- Addresses Akira's comments.
Repository:
rL LLVM
https://reviews.llvm.org/D30174
Files:
include/clang/Basic/DiagnosticSemaKinds.t
arphaman marked 3 inline comments as done.
arphaman added inline comments.
Comment at: lib/AST/DeclObjC.cpp:987
unsigned noParams = param_size();
if (noParams < 1 || noParams > 3)
family = OMF_None;
ahatanak wrote:
> It seems like this code
ahatanak added a comment.
I'm not sure how common it is to pass a function that doesn't return an object
or void, I think it's OK to allow returning primitive types if you think being
too strict would catch too many false positives.
Comment at: lib/AST/DeclObjC.cpp:987
arphaman added a comment.
In https://reviews.llvm.org/D30174#681890, @ahatanak wrote:
> In https://reviews.llvm.org/D30174#681843, @arphaman wrote:
>
> > Yes, we do. Primarily for the following reason: even if some target may
> > return a struct in a register, another target isn't guaranteed to
ahatanak added a comment.
In https://reviews.llvm.org/D30174#681843, @arphaman wrote:
> Yes, we do. Primarily for the following reason: even if some target may
> return a struct in a register, another target isn't guaranteed to do the same
> thing. It's better to always warn about this rather t
arphaman added a comment.
In https://reviews.llvm.org/D30174#681801, @ahatanak wrote:
> Do we still issue a warning even when the struct can be returned in a
> register? For example, x86 can return a small struct (for example, a struct
> with one int field) in a single register, in which case i
ahatanak added a comment.
Do we still issue a warning even when the struct can be returned in a register?
For example, x86 can return a small struct (for example, a struct with one int
field) in a single register, in which case it's fine to pass it to
performSelector via @selector.
If we shoul
arphaman created this revision.
The `performSelector` family of methods from Foundation use `objc_msgSend` to
dispatch the selector invocations to objects. However, method calls to methods
that return record types might have to use the `objc_msgSend_stret` as the
return value won't find into th
10 matches
Mail list logo