Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Fariborz Jahanian | 7e42cf2 | 2009-12-08 03:35:08 +0000 | [diff] [blame] | 2 | |
| 3 | typedef signed char BOOL; |
| 4 | |
| 5 | @interface NSString |
Douglas Gregor | a41a8c5 | 2010-04-22 00:20:18 +0000 | [diff] [blame] | 6 | - (BOOL)isEqualToString:(NSString *)aString; // expected-note 2{{passing argument to parameter 'aString' here}} |
Fariborz Jahanian | 7e42cf2 | 2009-12-08 03:35:08 +0000 | [diff] [blame] | 7 | @end |
| 8 | |
| 9 | static const NSString * Identifier1 = @"Identifier1"; |
| 10 | static NSString const * Identifier2 = @"Identifier2"; |
| 11 | static NSString * const Identifier3 = @"Identifier3"; |
| 12 | |
| 13 | int main () { |
| 14 | |
Chris Lattner | d7e52b8 | 2010-09-05 00:43:21 +0000 | [diff] [blame] | 15 | [@"Identifier1" isEqualToString:Identifier1]; // expected-warning {{sending 'const NSString *' to parameter of type 'NSString *' discards qualifiers}} |
| 16 | [@"Identifier2" isEqualToString:Identifier2]; // expected-warning {{sending 'const NSString *' to parameter of type 'NSString *' discards qualifiers}} |
Fariborz Jahanian | 7e42cf2 | 2009-12-08 03:35:08 +0000 | [diff] [blame] | 17 | [@"Identifier3" isEqualToString:Identifier3]; |
| 18 | return 0; |
| 19 | } |
| 20 | |