freebsd-nq/test/Analysis/ObjCRetSigs.m
2009-06-02 17:58:47 +00:00

26 lines
424 B
Objective-C

// RUN: clang-cc -analyze -warn-objc-methodsigs -verify %s
#include <stdio.h>
@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