Debian Codegraph @

clang/test/Analysis/inlining/test_objc_inlining_option.m

raw
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-config ipa=dynamic-bifurcate -analyzer-config objc-inlining=false -verify %s
2 // expected-no-diagnostics
3
4 typedef signed char BOOL;
5 typedef struct objc_class *Class;
6 typedef struct objc_object {
7 Class isa;
8 } *id;
9 @protocol NSObject - (BOOL)isEqual:(id)object; @end
10 @interface NSObject <NSObject> {}
11 +(id)alloc;
12 -(id)init;
13 -(id)autorelease;
14 -(id)copy;
15 - (Class)class;
16 -(id)retain;
17 @end
18
19 // Vanila: ObjC class method is called by name.
20 @interface MyParent : NSObject
21 + (int)getInt;
22 @end
23 @interface MyClass : MyParent
24 + (int)getInt;
25 @end
26 @implementation MyClass
27 + (int)testClassMethodByName {
28 int y = [MyClass getInt];
29 return 5/y; // no-warning
30 }
31 + (int)getInt {
32 return 0;
33 }
34 @end