Selector Sel = ME->getSelector();
// self = [<foo> init...]
- if (isSelfExpr(Op->getLHS()) && Sel.getNameForSlot(0).startswith("init"))
+ if (isSelfExpr(Op->getLHS()) && ME->getMethodFamily() == OMF_init)
diagnostic = diag::warn_condition_is_idiomatic_assignment;
// <foo> = [<bar> nextObject]
}
- (id) init;
- (id) initWithInt: (int) i;
+- (id) myInit __attribute__((objc_method_family(init)));
- (void) iterate: (id) coll;
- (id) nextObject;
@property unsigned uid;
return self;
}
+- (id) myInit {
+ if (self = [self myInit]) {
+ }
+ return self;
+}
+
- (void) iterate: (id) coll {
id cur;
while (cur = [coll nextObject]) {