2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
2009-12-08 11:35:08 +08:00
|
|
|
|
|
|
|
typedef signed char BOOL;
|
|
|
|
|
|
|
|
@interface NSString
|
2010-04-22 08:20:18 +08:00
|
|
|
- (BOOL)isEqualToString:(NSString *)aString; // expected-note 2{{passing argument to parameter 'aString' here}}
|
2009-12-08 11:35:08 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
static const NSString * Identifier1 = @"Identifier1";
|
|
|
|
static NSString const * Identifier2 = @"Identifier2";
|
|
|
|
static NSString * const Identifier3 = @"Identifier3";
|
|
|
|
|
|
|
|
int main () {
|
|
|
|
|
2010-09-05 08:43:21 +08:00
|
|
|
[@"Identifier1" isEqualToString:Identifier1]; // expected-warning {{sending 'const NSString *' to parameter of type 'NSString *' discards qualifiers}}
|
|
|
|
[@"Identifier2" isEqualToString:Identifier2]; // expected-warning {{sending 'const NSString *' to parameter of type 'NSString *' discards qualifiers}}
|
2009-12-08 11:35:08 +08:00
|
|
|
[@"Identifier3" isEqualToString:Identifier3];
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|