| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
which is wrong here.
llvm-svn: 170721
|
|
|
|
|
|
|
| |
category, when those properties will be implemented in category's
primary class or one of its super classes. // rdar://12568064
llvm-svn: 170573
|
|
|
|
|
|
| |
single attribute in the future.
llvm-svn: 170500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implementation
has inconsistent ownership with the backing ivar, point the error location to the
ivar.
Pointing to the ivar (instead of the @synthesize) is better since this is where a fix is needed.
Also provide the location of @synthesize via a note.
This also fixes the problem where an auto-synthesized property would emit an error without
any location.
llvm-svn: 170039
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uncovered.
This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.
I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.
llvm-svn: 169237
|
|
|
|
| |
llvm-svn: 167091
|
|
|
|
|
|
|
|
|
|
|
| |
source locations in places where it is necessary for diagnostics. By itself,
this causes assertions, so while I'm here, also fix property synthesis
for properties of C++ class type so we use so we properly set up a scope
and mark variable declarations.
<rdar://problem/12514189>.
llvm-svn: 166219
|
|
|
|
|
|
| |
This would make it possible for the analyzer to use the function.
llvm-svn: 166210
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Old algorithm:
1. See if the name looks like a getter or setter.
2. Use the name to look up a property in the current ObjCContainer
and all its protocols.
3. If the current container is an interface, also look in all categories
and superclasses (and superclass categories, and so on).
New algorithm:
1. See if the method is marked as a property accessor. If so, look through
all properties in the current container and find one that has a matching
selector.
2. Find all overrides of the method using ObjCMethodDecl's
getOverriddenMethods. This collects methods in superclasses and protocols
(as well as superclass categories, which isn't really necessary), and
checks if THEY are accessors. This part is not done recursively, since
getOverriddenMethods is already recursive.
This lets us handle getters and setters that do not match the property
names.
llvm-svn: 165627
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 164789
|
|
|
|
|
|
|
|
|
|
|
| |
This checker is annotation driven. It checks that the annotated
invalidation method accesses all ivars of the enclosing objects that are
objects of type, which in turn contains an invalidation method.
This is driven by
__attribute((annotation("objc_instance_variable_invalidator")).
llvm-svn: 164716
|
|
|
|
|
|
|
| |
setter or getter backing a deprecated/unavailable property,
also not location of the property. // rdar://12324295
llvm-svn: 164412
|
|
|
|
|
|
|
| |
missing 'assign' attribute as it is determined by its
overridden property in primary class. // rdar://12214070
llvm-svn: 164080
|
|
|
|
|
|
|
| |
checking on property declared in class extension.
// rdar://12214070
llvm-svn: 164053
|
|
|
|
|
|
| |
change (the problematic cases in ParseDecl.cpp are currently impossible).
llvm-svn: 163920
|
|
|
|
|
|
|
|
| |
in class extension, assume default is rewdwrite and don't
issue any diagnostics, privided other ownership models
are ok.
llvm-svn: 162583
|
|
|
|
| |
llvm-svn: 162430
|
|
|
|
| |
llvm-svn: 162361
|
|
|
|
|
|
| |
// rdar://12103400
llvm-svn: 162320
|
|
|
|
|
|
|
|
|
| |
class extensions a little. clang now allows readonly property
with no ownership rule (assign, unsafe_unretained, weak, retain,
strong, or copy) with a readwrite property with an ownership rule.
// rdar://12103400
llvm-svn: 162319
|
|
|
|
|
|
|
|
| |
diagnostics for bad deployment targets and adding a few
more predicates. Includes a patch by Jonathan Schleifer
to enable ARC for ObjFW.
llvm-svn: 162252
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, when synthesizing an explicitly strong/retain/copy property
of Class type, don't pretend during compatibility checking that the
property is actually assign. Instead, resolve incompatibilities
by secretly changing the type of *implicitly* __unsafe_unretained
Class ivars to be strong. This is moderately evil but better than
what we were doing.
Second, when synthesizing the setter for a strong property of
non-retainable type, be sure to use objc_setProperty. This is
possible when the property is decorated with the NSObject
attribute. This is an ugly, ugly corner of the language, and
we probably ought to deprecate it.
The first is rdar://problem/12039404; the second was noticed by
inspection while fixing the first.
llvm-svn: 162244
|
|
|
|
| |
llvm-svn: 161483
|
|
|
|
|
|
| |
declarations.
llvm-svn: 160156
|
|
|
|
|
|
| |
but apparently I did not.
llvm-svn: 159452
|
|
|
|
|
|
| |
to produce quotes instead of adding qoute to the test.
llvm-svn: 159450
|
|
|
|
|
|
|
| |
property retains a block object as it could be on
the stack. // rdar://11761511
llvm-svn: 159293
|
|
|
|
|
|
| |
has not overridden the property. // rdar://11656982
llvm-svn: 158871
|
|
|
|
|
|
|
|
|
|
| |
"write" attribute (copy/retain/etc.). But, property declaration in
primary class and protcols are tentative as they may be overridden
into a 'readwrite' property in class extensions. Postpone diagnosing
such warnings until the class implementation is seen.
// rdar://11656982
llvm-svn: 158869
|
|
|
|
|
|
| |
change in behavior. // rdar://11671080
llvm-svn: 158828
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
name as an existing ivar since this is common source of error
when people remove @synthesize to take advantage of autosynthesis.
// rdar://11671080
llvm-svn: 158756
|
|
|
|
|
|
|
|
|
| |
* Removed \param comments for parameters that no longer exist;
* Fixed a "\para" typo to "\param";
* Escaped @, # and \ symbols as needed in Doxygen comments;
* Added use of \brief to output short summaries.
llvm-svn: 158498
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AST: For auto-synthesized ivars give them the location of the related
property (previously they had no source location). This allows them
to be indexed by libclang.
libclang: Make sure synthesized ivars are indexed before the methods that
may reference them.
Fixes rdar://11607001.
llvm-svn: 158189
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
value_type
In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.
This rolls back r155808 and r155869.
Review by Doug Gregor incorporating feedback from Chandler Carruth.
llvm-svn: 158104
|
|
|
|
|
|
|
|
| |
getter result type is safe but does not match with property
type resulting in spurious warning followed by crash in
IRGen. // rdar://11515196
llvm-svn: 157641
|
|
|
|
|
|
| |
While there make it a SmallPtrSet.
llvm-svn: 157532
|
|
|
|
| |
llvm-svn: 157194
|
|
|
|
|
|
| |
provide a 'fixit' to change 'readonly' to 'readwrite'. // rdar://11448209
llvm-svn: 157193
|
|
|
|
|
|
|
| |
and provide a 'fixit' to change 'readonly' to 'readwrite'. 'fixit'
part needs little more work. // rdar://11448209
llvm-svn: 157121
|
|
|
|
|
|
|
|
| |
type and its accessor type and issue error if types
are incompatible, instead of crashing in IRgen.
// rdar://1105153
llvm-svn: 156871
|
|
|
|
|
|
| |
between property and its backing ivar.
llvm-svn: 156832
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reserving a bit
in ObjCMethodDecl to indicate whether the method does not override any other method,
which is the majority of cases.
That way we can avoid unnecessary work doing lookups, especially when PCH is involved.
rdar://11360082
llvm-svn: 156476
|
|
|
|
| |
llvm-svn: 156391
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
under -Wobjc-missing-property-synthesis which must be
opted-in. // rdar://11295716
llvm-svn: 156078
|
|
|
|
|
|
|
|
| |
<rdar://problem/11333367>.
While I'm here, fix source locations for other diagnostics related to property synthesis.
llvm-svn: 155953
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.
This change errs on the side of value, making op-> return T* and op* return
T&.
(reviewed by Richard Smith)
llvm-svn: 155808
|