| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, unify ObjCShouldCallSuperDealloc and ObjCShouldCallSuperFinalize.
The two have identical behavior and will never be active at the same time.
There's one last simplification now, which is that if we see a call to
[super foo] and we are currently in a method named 'foo', we will
/unconditionally/ clear the ObjCShouldCallSuper flag, rather than check
first to see if we're in a method where calling super is required. There's
no reason to pay the extra lookup price here.
llvm-svn: 166285
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, [foo weakProp] was not being treated the same as foo.weakProp.
Now, for every explicit message send, we check if it's a property access,
and if so, if the property is weak. Then for every assignment of a
message, we have to do the same thing again.
This is a potentially expensive increase because determining whether a
method is a property accessor requires searching through the methods it
overrides. However, without it -Warc-repeated-use-of-weak will miss cases
from people who prefer not to use dot syntax. If this turns out to be
too expensive, we can try caching the result somewhere, or even lose
precision by not checking superclass methods. The warning is off-by-default,
though.
<rdar://problem/12407765>
llvm-svn: 165718
|
|
|
|
|
|
|
|
| |
Then, switch users of PropertyIfSetterOrGetter and LookupPropertyDecl
(the latter by name) over to findPropertyDecl. This actually makes
-Wreceiver-is-weak a bit stronger than it was before.
llvm-svn: 165628
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This more accurately reflects its use: this flag is set when a method
matches the getter or setter name for a property in the same class,
and does not actually specify whether or not the definition of the method
will be synthesized (either implicitly or explicitly with @synthesize).
This renames the setter and backing field as well, and changes the
(soon-to-be-obsolete?) XML dump format to use 'property_accessor'
instead of 'synthesized'.
llvm-svn: 165626
|
|
|
|
|
|
|
|
|
|
|
|
| |
New output:
warning: weak property may be unpredictably set to nil
note: property declared here
note: assign the value to a strong variable to keep the object alive
during use
<rdar://problem/12277204>
llvm-svn: 164857
|
|
|
|
|
|
|
|
| |
in classes. Use it to flag those method implementations which don't
contain call to 'super' if they have 'super' class and it has the method
with this attribute set. This is wip. // rdar://6386358
llvm-svn: 163434
|
|
|
|
|
|
| |
in the diagnbostic. // rdar://11303469
llvm-svn: 163003
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 162552
|
|
|
|
|
|
|
|
| |
MutableArrayRef.
This required changing all get() calls to data() and using the simpler constructors.
llvm-svn: 162501
|
|
|
|
|
|
|
| |
These were nops for quite a while and only lead to confusion. ASTMultiPtr
now behaves like a proper dumb array reference.
llvm-svn: 162475
|
|
|
|
| |
llvm-svn: 162430
|
|
|
|
|
|
| |
-dealloc method. PR13401.
llvm-svn: 161135
|
|
|
|
|
|
|
|
| |
on object pointers and whether pointer arithmetic on object pointers
is supported. Make ObjFW interpret subscripts as pseudo-objects.
Based on a patch by Jonathan Schleifer.
llvm-svn: 161028
|
|
|
|
|
|
|
| |
This is just a clarification on Fariborz's original patch, per e-mail
discussion. No functionality change.
llvm-svn: 161016
|
|
|
|
|
|
| |
CF to ARC conversions.
llvm-svn: 160923
|
|
|
|
|
|
|
| |
__bride fixit, as it doesn't matter which cast to
use. // rdar://11923822
llvm-svn: 160906
|
|
|
|
|
|
| |
// rdar://11923822
llvm-svn: 160902
|
|
|
|
|
|
|
|
| |
are cast to retainable types, only suggest CFBridgingRelease/
CFBridgingRetain and not the __bridge casts.
// rdar://11923822
llvm-svn: 160900
|
|
|
|
| |
llvm-svn: 160895
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, fix a subtle bug, which occurred due to lookupPrivateMethod
defined in DeclObjC.h not looking up the method inside parent's
categories.
Note, the code assumes that Class's parent object has the same methods
as what's in the Root class of a the hierarchy, which is a heuristic
that might not hold for hierarchies which do not descend from NSObject.
Would be great to fix this in the future.
llvm-svn: 160885
|
|
|
|
|
|
|
|
| |
retainable types in arc, only suggest CFBridgingRelease/
CFBridgingRetain and not the confusing __bridge casts.
// rdar://11923822
llvm-svn: 160839
|
|
|
|
|
|
| |
Previously this caused a crash, since protocols are not interfaces.
llvm-svn: 159357
|
|
|
|
|
|
| |
id <Protocol>. // rdar://11618852
llvm-svn: 159084
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Primarily fixed \param commands with names not matching any actual
parameters of the documented functions. In many cases this consists
just of fixing up the parameter name in the \param to match the code,
in some it means deleting obsolete documentation and occasionally it
means documenting the parameter that has replaced the older one that
was documented, which sometimes means some simple reverse-engineering
of the docs from the implementation;
* Fixed \param ParamName [out] to the correct format with [out] before
the parameter name;
* Fixed some \brief summaries.
llvm-svn: 158980
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
target Objective-C runtime down to the frontend: break this
down into a single target runtime kind and version, and compute
all the relevant information from that. This makes it
relatively painless to add support for new runtimes to the
compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z,
available at the driver level as a better and more general
alternative to -fgnu-runtime and -fnext-runtime. This new
concept of an Objective-C runtime also encompasses what we
were previously separating out as the "Objective-C ABI", so
fragile vs. non-fragile runtimes are now really modelled as
different kinds of runtime, paving the way for better overall
differentiation.
As a sort of special case, continue to accept the -cc1 flag
-fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak.
I won't go so far as to say "no functionality change", even
ignoring the new driver flag, but subtle changes in driver
semantics are almost certainly not intended.
llvm-svn: 158793
|
|
|
|
|
|
|
|
|
| |
Before, the note showed the location where you could insert __bridge variants,
but the actual fixit edit came after the cast.
No functionality change.
llvm-svn: 158131
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was a problem for people who write 'return(result);'
Also fix ARCMT's corresponding code, though there's no test case for this
because implicit casts like this are rejected by the migrator for being
ambiguous, and explicit casts have no problem.
<rdar://problem/11577346>
llvm-svn: 158130
|
|
|
|
|
|
|
| |
message receiver is 'weak' property.
// rdar://10225276
llvm-svn: 157946
|
|
|
|
|
|
|
|
|
|
| |
__bridge_retained/__bridge_transfer
when migrating.
rdar://11569198
llvm-svn: 157785
|
|
|
|
|
|
| |
and reported as PR12959. // rdar://11499742
llvm-svn: 157697
|
|
|
|
|
|
|
|
| |
backing two propeties because proprty names
match except for first letter being of different
case. // rdar://11528439, [PR12936].
llvm-svn: 157435
|
|
|
|
|
|
|
|
|
| |
Where diagnostic about unfound property is not
issued in the context where a setter is looked up
in situation in which name and property name differ
in their first letter case. // rdar://11363363
llvm-svn: 157407
|
|
|
|
| |
llvm-svn: 157117
|
|
|
|
|
|
| |
getFETokenInfoAsVoid into its only caller.
llvm-svn: 157116
|
|
|
|
|
|
|
|
|
| |
To do that, keep track of the location of the protocol id in the ObjCProtocolExpr
AST node.
rdar://11190837
llvm-svn: 156890
|
|
|
|
|
|
|
|
|
|
| |
Previously we would reject it as illegal using a value of
enum type and on ObjC++ it was illegal to use an enumerator
as well.
rdar://11454917
llvm-svn: 156843
|
|
|
|
|
|
|
|
| |
Once we've found a "good" method, we don't need to check its argument types
again. (Even if we might have later found a "bad" method, we were already
caching the method we first looked up.)
llvm-svn: 156719
|
|
|
|
| |
llvm-svn: 156718
|
|
|
|
| |
llvm-svn: 156717
|
|
|
|
|
|
|
|
| |
Also, unify some diagnostics for boxed expressions that have the same form.
Fixes PR12804.
llvm-svn: 156713
|
|
|
|
|
|
|
|
|
|
|
| |
off PartialDiagnostic. PartialDiagnostic is rather heavyweight for
something that is in the critical path and is rarely used. So, switch
over to an abstract-class-based callback mechanism that delays most of
the work until a diagnostic is actually produced. Good for ~11k code
size reduction in the compiler and 1% speedup in -fsyntax-only on the
code in <rdar://problem/11004361>.
llvm-svn: 156176
|
|
|
|
|
|
|
|
|
|
|
|
| |
BuildObjCNumericLiteral() and BuildObjCBoxedExpr() now both using
PerformCopyInitialization() rather than PerformImplicitConversion(),
which suppresses errors.
In BuildObjCBoxedExpr(): no longer calling .getCanonicalType(),
ValueType->getAs() will remove the minimal amount of sugar.
Using ValueType->isBuiltinType() instead of isa<BuiltinType>(ValueType).
llvm-svn: 155949
|
|
|
|
|
|
|
| |
is issued on weak property as receiver and not on
any other use of a weak property. // rdar://10225276
llvm-svn: 155169
|
|
|
|
|
|
|
| |
if receiver is a 'weak' property, by type or by attribute.
// rdar://10225276
llvm-svn: 155159
|
|
|
|
| |
llvm-svn: 155082
|
|
|
|
|
|
|
| |
in arc mode and opted-in with -Wreceiver-is-weak flag.
// rdar://10225276
llvm-svn: 154042
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.
My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.
Docs are forthcoming to document the implementation and behavior of these features.
llvm-svn: 152137
|
|
|
|
|
|
| |
mention the actual method. This looks better within an IDE, where text isn't always regurgitated in the presentation of a warning. Fixes radar 10914035.
llvm-svn: 151579
|
|
|
|
|
|
| |
// rdar://10907410
llvm-svn: 151296
|