2011-05-02 19:39:53 +00:00
|
|
|
// RUN: %clang_cc1 -analyze -analyzer-checker=core.experimental -analyzer-checker=osx.cocoa.IncompatibleMethodTypes -verify %s
|
2009-06-02 17:58:47 +00:00
|
|
|
|
2009-11-18 14:59:57 +00:00
|
|
|
int printf(const char *, ...);
|
2009-06-02 17:58:47 +00:00
|
|
|
|
|
|
|
@interface MyBase
|
|
|
|
-(long long)length;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface MySub : MyBase{}
|
|
|
|
-(double)length;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MyBase
|
|
|
|
-(long long)length{
|
|
|
|
printf("Called MyBase -length;\n");
|
|
|
|
return 3;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation MySub
|
|
|
|
-(double)length{ // expected-warning{{types are incompatible}}
|
|
|
|
printf("Called MySub -length;\n");
|
|
|
|
return 3.3;
|
|
|
|
}
|
|
|
|
@end
|