Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaObjC / method-arg-qualifier-warning.m
blobc198786e461ca23bb44a8c35227b73ad17de01ff
1 // RUN: %clang_cc1  -fsyntax-only -verify %s
3 typedef signed char BOOL;
5 @interface NSString
6 - (BOOL)isEqualToString:(NSString *)aString; // expected-note 2{{passing argument to parameter 'aString' here}}
7 @end
9 static const NSString * Identifier1 =   @"Identifier1";
10 static NSString const * Identifier2 =   @"Identifier2";
11 static NSString * const Identifier3 =   @"Identifier3";
13 int main (void) {
14         
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}}
17     [@"Identifier3" isEqualToString:Identifier3];
18     return 0;