1f51a89d39
These were ignored by git accidentally. We want ALL OF THEM since they all came in the llvm/clang source distribution.
26 lines
525 B
Objective-C
26 lines
525 B
Objective-C
// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.core -analyzer-checker=osx.cocoa.IncompatibleMethodTypes -verify -Wno-objc-root-class %s
|
|
|
|
int printf(const char *, ...);
|
|
|
|
@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
|