• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-checker=osx.cocoa.IncompatibleMethodTypes -verify -Wno-objc-root-class %s
2
3int printf(const char *, ...);
4
5@interface MyBase
6-(long long)length;
7@end
8
9@interface MySub : MyBase{}
10-(double)length;
11@end
12
13@implementation MyBase
14-(long long)length{
15   printf("Called MyBase -length;\n");
16   return 3;
17}
18@end
19
20@implementation MySub
21-(double)length{  // expected-warning{{types are incompatible}}
22   printf("Called MySub -length;\n");
23   return 3.3;
24}
25@end
26