aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-08-04 17:01:09 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-08-04 17:01:09 +0000
commite198f5d609dda2b6d0435f040ebe2479a4e378ba (patch)
treec74db31bfb98a7690c6fe6196e55ea5d8e861be1 /test/SemaObjC
parent577f75a7498e9e2536434da0ef0da0eea390d18b (diff)
Some code refactoring. Be more generous in issuance of warning
on method type mismatches per Chris's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78075 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC')
-rw-r--r--test/SemaObjC/warn-superclass-method-mismatch.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaObjC/warn-superclass-method-mismatch.m b/test/SemaObjC/warn-superclass-method-mismatch.m
index eb75eade0a..5efe3e8d10 100644
--- a/test/SemaObjC/warn-superclass-method-mismatch.m
+++ b/test/SemaObjC/warn-superclass-method-mismatch.m
@@ -12,6 +12,8 @@
-(void) method2: (Sub*) x;
+ method3: (int)x1 : (Base *)x2 : (float)x3; // expected-note {{previous declaration is here}}
+ mathod4: (id)x1;
+- method5: (int) x : (double) d; // expected-note {{previous declaration is here}}
+- method6: (int) x : (float) d; // expected-note {{previous declaration is here}}
@end
struct A {
@@ -25,6 +27,8 @@ struct A {
+ method3: (int)x1 : (Sub *)x2 : (float)x3; // expected-warning {{method parameter type 'Sub *' does not match super class method parameter type 'Base *'}}
+ mathod4: (Base*)x1;
-(void) method_r: (char)ch : (float*)f1 : (Sub*) x; // expected-warning {{method parameter type 'Sub *' does not match super class method parameter type 'int *'}}
+- method5: (int) x : (float) d; // expected-warning {{method parameter type 'float' does not match super class method parameter type 'double'}}
+- method6: (int) x : (double) d; // expected-warning {{method parameter type 'double' does not match super class method parameter type 'float'}}
@end
void f(Base *base, Sub *sub) {