Fariborz Jahanian
783ffde6d3
objc: When issuing warning for missing synthesis for
...
properties in classes declared with objc_suppress_autosynthesis
attribute, pinpoint location of the said class in a note.
llvm-svn: 147562
2012-01-04 23:16:13 +00:00
Fariborz Jahanian
1fc1c6c307
In non-gc, non-arc mode, property of 'Class' type
...
variety is treated as a 'void *'. No need to issue
warning reserved for objc object properties.
// rdar://10565506
llvm-svn: 147504
2012-01-04 00:31:53 +00:00
Fariborz Jahanian
3c9707bd90
objc: use objc_suppress_autosynthesis attribute on classes
...
which should not be default synthesized.
llvm-svn: 147468
2012-01-03 19:46:00 +00:00
Fariborz Jahanian
9e49b6a6ff
objc: do not auto synthesize properties declared in
...
protocols; with a warning. // rdar://10567333
llvm-svn: 146626
2011-12-15 01:03:18 +00:00
Douglas Gregor
0b144e160a
Replace all comparisons between ObjCInterfaceDecl pointers with calls
...
to declaresSameEntity(), as a baby step toward tracking forward
declarations of Objective-C classes precisely. Part of
<rdar://problem/10583531>.
llvm-svn: 146618
2011-12-15 00:29:59 +00:00
Fariborz Jahanian
e283346d0b
objc-arc: diagnose synthesis of a 'weak unavailable' property.
...
// rdar://10535245
llvm-svn: 146272
2011-12-09 19:55:11 +00:00
Fariborz Jahanian
22b405c7aa
objc: turn warning for property type mismatch in
...
primary and its continuation class into error.
// rdar://10142679
llvm-svn: 145255
2011-11-28 18:38:27 +00:00
Argyrios Kyrtzidis
846e61a363
[PCH] Do not crash if a class extension in a chained PCH introduces/redeclares a property.
...
llvm-svn: 144520
2011-11-14 04:52:29 +00:00
Fariborz Jahanian
b1ac0813a6
objc-arc: 'readonly' property of retainable object
...
type is strong by default too. // rdar://10410903
llvm-svn: 144118
2011-11-08 20:58:53 +00:00
Argyrios Kyrtzidis
b458ffb226
Make sure when setting AttributesAsWritten of a property that they do not
...
include ownership qualifiers from the type.
llvm-svn: 143885
2011-11-06 18:58:12 +00:00
Fariborz Jahanian
3018b95093
objc: warn if a readonly property has a setter attribute too.
...
// rdar://10357768
llvm-svn: 143518
2011-11-01 23:02:16 +00:00
John McCall
526ab47a55
Restore r142914 and r142915, now with missing file and apparent
...
GCC compiler workaround.
llvm-svn: 142931
2011-10-25 17:37:35 +00:00
NAKAMURA Takumi
9a8f13961c
Revert r142914 and r142915, due to possibly missing file.
...
r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."
llvm-svn: 142921
2011-10-25 14:32:25 +00:00
John McCall
c4a2d3259f
Introduce a placeholder type for "pseudo object"
...
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.
Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.
llvm-svn: 142914
2011-10-25 07:27:56 +00:00
Argyrios Kyrtzidis
b51684d7a1
Set the objc "property attributes as written" for extension properties as well.
...
llvm-svn: 142406
2011-10-18 19:49:16 +00:00
Fariborz Jahanian
7c386f838a
obj-c++: allow the getter/setter to return/take parameters
...
by reference. // rdar://10188258
llvm-svn: 142075
2011-10-15 17:36:49 +00:00
Fariborz Jahanian
df4f7ca331
objc-arc: 'Class' property is implicitly __unsafe_unretained.
...
// rdar://10239594
llvm-svn: 141915
2011-10-13 23:45:45 +00:00
Ted Kremenek
6effcb5082
Fix typo in name of diagnostic.
...
llvm-svn: 141793
2011-10-12 18:03:37 +00:00
Fariborz Jahanian
fa643c8f3b
objc: note location of the previously declared
...
property in the diagnostic.
llvm-svn: 141745
2011-10-12 00:00:57 +00:00
Fariborz Jahanian
55b4e5c208
objc: err on a property designated both atomic and
...
nonatomic. // rdar://10260017
llvm-svn: 141580
2011-10-10 21:53:24 +00:00
Fariborz Jahanian
9059124b41
objc: Do not warn about mismatch on Super's readonly property attribute,
...
related to a readwrite property, and
Sub's readwrite property. // rdar://9396329
llvm-svn: 141497
2011-10-08 17:45:33 +00:00
Fariborz Jahanian
13d3f86577
objc++: some minor cleanup and a test case
...
for atomic setters which requires assignment operator.
llvm-svn: 141415
2011-10-07 21:08:14 +00:00
Fariborz Jahanian
9cd57a7061
objc: Improve on diagnostic when atomic proeprty is synthesized
...
on one accessor and user-provide with another.
llvm-svn: 141343
2011-10-06 23:47:58 +00:00
Fariborz Jahanian
565ed7a4c1
objc++: For atomic properties of c++ class objec typet, appropriate
...
operator= is called. Issue a warning for non-trivial case until
runtime support is provided. // rdar://6137845
llvm-svn: 141302
2011-10-06 18:38:18 +00:00
Fariborz Jahanian
f2a7b0eade
objc: Turn diagnostic on property type mismatch in
...
continuation class into warning. // rdar://10231514
llvm-svn: 141100
2011-10-04 18:44:26 +00:00
Argyrios Kyrtzidis
b8c3aaf479
Allow getting all source locations of selector identifiers in a ObjCMethodDecl.
...
Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is
-Immediately before the arguments: -(id)first:(int)x second:(int)y;
-With a space between the arguments: -(id)first: (int)x second: (int)y;
-For nullary selectors, immediately before ';': -(void)release;
In such cases we infer the locations instead of storing them.
llvm-svn: 140989
2011-10-03 06:37:04 +00:00
Argyrios Kyrtzidis
dfd6570643
Pass from the parser the locations of selector identifiers when creating
...
objc method decls.
They are not stored in the AST yet.
llvm-svn: 140984
2011-10-03 06:36:36 +00:00
Argyrios Kyrtzidis
3849394b81
Don't keep NumSelectorArgs in the ObjCMethodDecl, the number can be derived from the selector.
...
llvm-svn: 140983
2011-10-03 06:36:29 +00:00
Ted Kremenek
ab2dcc8de6
Include prefix with default synthesized ivars.
...
llvm-svn: 140657
2011-09-27 23:39:40 +00:00
Fariborz Jahanian
698bd3113e
objc - don't complain about unimplemented property when conforming
...
protocol declares the property, as well as one of its superclasses.
Property will be implemented in the super class. // rdar://10120691
llvm-svn: 140586
2011-09-27 00:23:52 +00:00
Fariborz Jahanian
0ee58d6b4b
objc - compare setter/property types using
...
hasSameUnqualifiedType in //rdar://10156674
llvm-svn: 140576
2011-09-26 22:59:09 +00:00
Fariborz Jahanian
23ef165920
objc - in matching setter argument type to its property type,
...
ingore the type qualifiers. // rdar://10156674
llvm-svn: 140571
2011-09-26 22:12:27 +00:00
Fariborz Jahanian
11ee283e2a
objc - redeclaration of property in extension class
...
must match property type declaration in its
primary class. // rdar://10142679
llvm-svn: 140438
2011-09-24 00:56:59 +00:00
Fariborz Jahanian
a195a5182c
CurContext cannot be null ever.
...
llvm-svn: 140022
2011-09-19 16:32:32 +00:00
Fariborz Jahanian
8b148bb5b7
objc: Don't crash with decl context for property impl.
...
is missing. // rdar//10127639
llvm-svn: 139988
2011-09-17 18:48:50 +00:00
Fariborz Jahanian
1723e17b78
objc-arc: warn when a 'retain' block property is
...
declared which does not force a 'copy' of the block literal
object. // rdar://9829425
llvm-svn: 139706
2011-09-14 18:03:46 +00:00
John McCall
4319286337
Refactoring, mostly to give ObjCPropertyDecls stronger invariants for
...
their semantic attributes and then to take advantage of that.
llvm-svn: 139615
2011-09-13 18:31:23 +00:00
Douglas Gregor
79a91418bd
Switch LangOptions over to a .def file that describes header of the
...
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.
AST serialization changes are next up.
llvm-svn: 139605
2011-09-13 17:21:33 +00:00
Fariborz Jahanian
eebdb67420
objc-gc: More sema work for properties declared 'weak'
...
in GC mode. // rdar://10073896
llvm-svn: 139235
2011-09-07 16:24:21 +00:00
Fariborz Jahanian
5f2b703651
objc-gc: Don't force a __strong type'd property
...
to be 'weak'. This prevents a crash and should
probably be flagged as error - later to come.
llvm-svn: 139211
2011-09-07 00:38:49 +00:00
Fariborz Jahanian
6dd3f39dae
objc-gc: Adds support for "weak" property attribute under GC.
...
// rdar://10073896
llvm-svn: 139203
2011-09-06 23:32:40 +00:00
Fariborz Jahanian
97d744bea4
objective-c: this patch (re)introduces objective-c's default property
...
synthesis. This new feature is currently placed under
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon.
// rdar://8843851
llvm-svn: 138913
2011-08-31 22:24:06 +00:00
Fariborz Jahanian
83aa8ab3ae
objective-c - Make warning on unimplemented protocols point
...
to class implementation where it is supposed to be
implemented. // rdar://10009982.
llvm-svn: 138714
2011-08-27 21:55:47 +00:00
Fariborz Jahanian
97b6ac5407
objc-arc: Mention property's attribute by name when
...
finding life-time conflict with its declared ivar.
// rdar://10007230
llvm-svn: 138659
2011-08-26 21:21:19 +00:00
Fariborz Jahanian
a646084550
objc - use existing API for temporary switch of
...
objc's decl context.
llvm-svn: 138267
2011-08-22 20:15:24 +00:00
Fariborz Jahanian
f36734dd2a
objc - minor comment fix up and cleanup.
...
llvm-svn: 138253
2011-08-22 18:34:22 +00:00
Fariborz Jahanian
8d382dc781
Restore patch I reversed in r138040. Known buildbot
...
failures are resolved.
llvm-svn: 138234
2011-08-22 15:54:49 +00:00
Fariborz Jahanian
7e47de3156
objc-arc: @property definitions should default to (strong) when not
...
specified. // rdar://9971982
llvm-svn: 138062
2011-08-19 19:28:44 +00:00
Fariborz Jahanian
9a3b269ea1
Revers r138040. Need to look at a few buildbot failures.
...
llvm-svn: 138049
2011-08-19 18:02:47 +00:00
Fariborz Jahanian
d6d866d6fa
objective-c: Bring objective-c handling of decl context
...
to modernity. Instead of passing down individual
context objects from parser to sema, establish decl
context in parser and have sema access current context
as needed. I still need to take of Doug's comment for
minor cleanups.
llvm-svn: 138040
2011-08-19 16:06:57 +00:00