forked from OSchip/llvm-project
Changed wording of warning when attribute is on
method definition. llvm-svn: 71615
This commit is contained in:
parent
a1f4997368
commit
d9d6e6e039
|
@ -1732,7 +1732,7 @@ def error_private_ivar_access : Error<"instance variable %0 is private">;
|
|||
def error_protected_ivar_access : Error<"instance variable %0 is protected">;
|
||||
def warn_maynot_respond : Warning<"%0 may not respond to %1">;
|
||||
def warn_attribute_method_def : Warning<
|
||||
"method attribute may be specified on method declarations only">;
|
||||
"method attribute can only be specified on method declarations">;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
@implementation A
|
||||
+ (void)F __attribute__((deprecated))
|
||||
{ // expected-warning {{method attribute may be specified on method declarations only}}
|
||||
{ // expected-warning {{method attribute can only be specified on method declarations}}
|
||||
[self F]; // no warning, since the caller is also deprecated.
|
||||
}
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
@end
|
||||
|
||||
@implementation INTF
|
||||
- (int) foo: (int)arg1 __attribute__((deprecated)){ // expected-warning {{method attribute may be specified}}
|
||||
- (int) foo: (int)arg1 __attribute__((deprecated)){ // expected-warning {{method attribute can only be specified}}
|
||||
return 10;
|
||||
}
|
||||
- (int) foo1: (int)arg1 {
|
||||
return 10;
|
||||
}
|
||||
- (int) foo2: (int)arg1 __attribute__((deprecated)) { // expected-warning {{method attribute may be specified}}
|
||||
- (int) foo2: (int)arg1 __attribute__((deprecated)) { // expected-warning {{method attribute can only be specified}}
|
||||
return 10;
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue