| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
only a setter.
llvm-svn: 142236
|
|
|
|
|
|
|
| |
passing/receiving CF objects at +0 to/from Objective-C methods
or audited C functions.
llvm-svn: 142219
|
|
|
|
|
|
| |
// rdar://10268422
llvm-svn: 142078
|
|
|
|
| |
llvm-svn: 140986
|
|
|
|
|
|
|
|
| |
from the parser.
They are not kept in the AST yet.
llvm-svn: 140982
|
|
|
|
|
|
|
|
|
|
| |
calls, or calls to audited functions without an explicit
return attribute, to be casted without a bridge cast.
Tie this mechanism in with the existing exceptions to
the cast restrictions. State those restrictions more
correctly and generalize.
llvm-svn: 140912
|
|
|
|
|
|
|
|
|
| |
system change in <rdar://problem/10109725> that allows conversion from
'self' in class methods to the root of the class's hierarchy. This
conversion rule is a hack that has non-trivial repurcussions
(particularly with overload resolution).
llvm-svn: 140605
|
|
|
|
|
|
| |
class of this method. // rdar://10109725
llvm-svn: 139989
|
|
|
|
| |
llvm-svn: 139466
|
|
|
|
|
|
| |
it down to 'id'.
llvm-svn: 139394
|
|
|
|
|
|
|
|
|
|
|
|
| |
converting to an arbitrary Objective-C pointer type is. Without
significantly re-implementing anything, change the API to reflect this,
and as a minor optimization, strip the pointer conversion off before
potentially building it.
Mostly, this removes a really bizarre-looking bit of code from
BuildInstanceMessage.
llvm-svn: 139354
|
|
|
|
|
|
|
|
| |
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.
llvm-svn: 139352
|
|
|
|
|
|
|
|
|
|
| |
'id' that can be used (only!) via a contextual keyword as the result
type of an Objective-C message send. 'instancetype' then gives the
method a related result type, which we have already been inferring for
a variety of methods (new, alloc, init, self, retain). Addresses
<rdar://problem/9267640>.
llvm-svn: 139275
|
|
|
|
|
|
|
|
| |
message send to an unknown method.
rdar://problem/9416370, redux.
llvm-svn: 138893
|
|
|
|
|
|
| |
This matches gcc's logic. Second half of PR10661.
llvm-svn: 138730
|
|
|
|
|
|
| |
bridged cast. Noticed by AST inspection by Ted Kremenek!
llvm-svn: 138616
|
|
|
|
|
|
| |
This matches gcc's logic. Half of PR10661.
llvm-svn: 138240
|
|
|
|
| |
llvm-svn: 136210
|
|
|
|
|
|
|
|
| |
LLVM.h imports
them into the clang namespace.
llvm-svn: 135852
|
|
|
|
|
|
|
| |
used in @selector expression because, well, their implementation
is optional. // rdar://9545564
llvm-svn: 135057
|
|
|
|
|
|
|
|
|
|
| |
__unknown_anytype, and rewrite such message sends correctly.
I had to bite the bullet and actually add a debugger support mode for this
one, which is a bit unfortunate, but there really isn't anything else
I could imagine doing; this is clearly just debugger-specific behavior.
llvm-svn: 135051
|
|
|
|
|
|
|
| |
object to a __weak object/type. // rdar://9732636.
One item is yet todo.
llvm-svn: 134655
|
|
|
|
|
|
|
|
|
|
|
|
| |
where we have an immediate need of a retained value.
As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain. This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.
rdar://problem/9504800
llvm-svn: 134605
|
|
|
|
|
|
|
| |
passed to it, and unknown selectors causing potential leak.
// rdar://9659270
llvm-svn: 134449
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vector<int>
to
std::vector<int>
Patch by Kaelyn Uhrain, with minor tweaks + PCH support from me. Fixes
PR5776/<rdar://problem/8652971>.
Thanks Kaelyn!
llvm-svn: 134007
|
|
|
|
|
|
| |
// rdar://7811841
llvm-svn: 133970
|
|
|
|
|
|
|
| |
integral as it is not transferring ownership..
// rdar://9619861
llvm-svn: 133622
|
|
|
|
|
|
|
|
| |
__builtin___CFStringMakeConstantString and CF typed function calls
with explicit cf_returns_retained/cf_returns_not_retained attributes.
// rdar://9544832
llvm-svn: 133535
|
|
|
|
|
|
| |
// rdar://9474349
llvm-svn: 133525
|
|
|
|
|
|
| |
use the deprecated forms of llvm::StringMap::GetOrCreateValue().
llvm-svn: 133515
|
|
|
|
|
|
|
| |
message sent to an objc method (or property access)
// rdar://9474349
llvm-svn: 133469
|
|
|
|
| |
llvm-svn: 133246
|
|
|
|
|
|
|
| |
(even though it is incomplete type) because gcc
says so. // rdar://9622422
llvm-svn: 133208
|
|
|
|
|
|
|
|
|
|
| |
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.
Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.
llvm-svn: 133103
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:
t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^
It also means that we get decent type inference when writing code in
Objective-C++0x:
auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id
llvm-svn: 132868
|
|
|
|
|
|
|
|
| |
There are APIs, e.g. [NSValue valueWithBytes:objCType:], which use the encoding to find out
the size of an object pointed to by a pointer. Make things safer by making it illegal to @encode
incomplete types.
llvm-svn: 131364
|
|
|
|
|
|
|
| |
a 'deprecated' selector in the diagnostics for the
selector. // rdar://9309223
llvm-svn: 130062
|
|
|
|
|
|
|
| |
access expression that appears to be a property reference. Fixes
<rdar://problem/8985943>.
llvm-svn: 129865
|
|
|
|
|
|
| |
// rdar://9287695
llvm-svn: 129615
|
|
|
|
|
|
| |
string or not.
llvm-svn: 129488
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch authored by Eric Niebler.
Many methods on the Sema class (e.g. ConvertPropertyForRValue) take Expr
pointers as in/out parameters (Expr *&). This is especially true for the
routines that apply implicit conversions to nodes in-place. This design is
workable only as long as those conversions cannot fail. If they are allowed
to fail, they need a way to report their failures. The typical way of doing
this in clang is to use an ExprResult, which has an extra bit to signal a
valid/invalid state. Returning ExprResult is de riguour elsewhere in the Sema
interface. We suggest changing the Expr *& parameters in the Sema interface
to ExprResult &. This increases interface consistency and maintainability.
This interface change is important for work supporting MS-style C++
properties. For reasons explained here
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-February/013180.html>,
seemingly trivial operations like rvalue/lvalue conversions that formerly
could not fail now can. (The reason is that given the semantics of the
feature, getter/setter method lookup cannot happen until the point of use, at
which point it may be found that the method does not exist, or it may have the
wrong type, or overload resolution may fail, or it may be inaccessible.)
llvm-svn: 129143
|
|
|
|
|
|
|
| |
types such that protocols are seached first. Fixes
// rdar://9224670
llvm-svn: 129016
|
|
|
|
|
|
|
| |
an executable test to llvm test suite.
// rdar://9070460.
llvm-svn: 128435
|
|
|
|
|
|
| |
// rdar://9181463
llvm-svn: 128410
|
|
|
|
|
|
| |
an objc method. Fixes // rdar://9181463
llvm-svn: 128389
|
|
|
|
|
|
| |
list of protocols as well. // rdar://9078584
llvm-svn: 127367
|
|
|
|
|
|
| |
to avoid a bogus warning. // rdar:// 9072298
llvm-svn: 127355
|
|
|
|
|
|
| |
varienty of cases. // rdar://9092208
llvm-svn: 127257
|
|
|
|
| |
llvm-svn: 125752
|
|
|
|
|
|
| |
a forward class. // rdar://8851803
llvm-svn: 125699
|