decay the parameter type immediately; let CheckParameter() do its
job. Fixes <rdar://problem/
12071218>.
llvm-svn: 172780
DI = 0;
} else {
ArgType = GetTypeFromParser(ArgInfo[i].Type, &DI);
- // Perform the default array/function conversions (C99 6.7.5.3p[7,8]).
- ArgType = Context.getAdjustedParameterType(ArgType);
}
LookupResult R(*this, ArgInfo[i].Name, ArgInfo[i].NameLoc,
@end
@class NSFastEnumerationState;
@protocol NSFastEnumeration
-- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id [])buffer count:(NSUInteger)len;
+- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id __unsafe_unretained [])buffer count:(NSUInteger)len;
@end
@interface NSNumber
+ (NSNumber *)numberWithInt:(int)value;
e = @(42); // expected-warning {{assigning numeric literal to a weak variable; object will be released after assignment}}
m = @(41 + 1); // expected-warning {{assigning boxed expression to a weak variable; object will be released after assignment}}
}
+
+@interface C
+- (void)method:(id[])objects; // expected-error{{must explicitly describe intended ownership of an object array parameter}}
+@end