Fariborz Jahanian
0c325319cf
Objective-C. Prevent an assertion crash due to buggy code
...
as it can commonly happen. // rdar://16261494
llvm-svn: 203598
2014-03-11 18:56:18 +00:00
Argyrios Kyrtzidis
0f7f222c59
[objc] Add a test to make sure that a class can add a secondary initializer via a category
...
and still inherit the designated initializers of its super class.
llvm-svn: 197301
2013-12-14 02:16:41 +00:00
Argyrios Kyrtzidis
d664a34de8
[objc] If we don't know for sure what the designated initializers of the superclass are,
...
assume that a [super init..] inside a designated initializer also refers to a designated one
and do not warn.
llvm-svn: 197202
2013-12-13 03:48:17 +00:00
Argyrios Kyrtzidis
e818681c88
Add a SubsetSubject in Attr.td to automate checking of where the objc_designated_initializer
...
attribute is acceptable.
llvm-svn: 196644
2013-12-07 06:08:04 +00:00
Argyrios Kyrtzidis
b9a405b33e
[objc] If an interface has no initializer marked as designated and introduces at least one new initializer,
...
don't assume that it inherits the designated initializers from the super class.
If the assumption was wrong because a new initializer was a designated one that was not marked as such,
we will emit misleading warnings for subclasses of the interface.
llvm-svn: 196476
2013-12-05 07:07:03 +00:00
Argyrios Kyrtzidis
db5ce0f71e
[objc] Add a warning when a class that provides a designated initializer, does not
...
override all of the designated initializers of its superclass.
llvm-svn: 196319
2013-12-03 21:11:54 +00:00
Argyrios Kyrtzidis
b66d3cf5cf
[objc] Emit warning when the implementation of a secondary initializer calls on
...
super another initializer and when the implementation does not delegate to
another initializer via a call on 'self'.
A secondary initializer is an initializer method not marked as a designated
initializer within a class that has at least one initializer marked as a
designated initializer.
llvm-svn: 196318
2013-12-03 21:11:49 +00:00
Argyrios Kyrtzidis
fcded9b93a
[objc] Emit warnings when the implementation of a designated initializer calls on
...
super an initializer that is not a designated one or any initializer on self.
llvm-svn: 196317
2013-12-03 21:11:43 +00:00
Argyrios Kyrtzidis
22bfa2c28b
[objc] Emit a warning when the implementation of a designated initializer does not chain to
...
an init method that is a designated initializer for the superclass.
llvm-svn: 196316
2013-12-03 21:11:36 +00:00
Argyrios Kyrtzidis
d1438b446e
[objc] Introduce attribute 'objc_designated_initializer'.
...
It only applies to methods of init family in an interface declaration.
llvm-svn: 196314
2013-12-03 21:11:25 +00:00