xref: /minix3/external/bsd/llvm/dist/clang/test/Analysis/shallow-mode.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config mode=shallow -verify %s
2*f4a2713aSLionel Sambuc// expected-no-diagnostics
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambucvoid clang_analyzer_checkInlined(unsigned);
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambuctypedef signed char BOOL;
7*f4a2713aSLionel Sambuctypedef struct objc_class *Class;
8*f4a2713aSLionel Sambuctypedef struct objc_object {
9*f4a2713aSLionel Sambuc    Class isa;
10*f4a2713aSLionel Sambuc} *id;
11*f4a2713aSLionel Sambuc@protocol NSObject  - (BOOL)isEqual:(id)object; @end
12*f4a2713aSLionel Sambuc@interface NSObject <NSObject> {}
13*f4a2713aSLionel Sambuc+(id)alloc;
14*f4a2713aSLionel Sambuc-(id)init;
15*f4a2713aSLionel Sambuc@end
16*f4a2713aSLionel Sambuc
17*f4a2713aSLionel Sambuc@interface MyClass : NSObject
18*f4a2713aSLionel Sambuc+ (void)callee;
19*f4a2713aSLionel Sambuc+ (void)caller;
20*f4a2713aSLionel Sambuc@end
21*f4a2713aSLionel Sambuc
22*f4a2713aSLionel Sambuc@implementation MyClass
23*f4a2713aSLionel Sambuc+ (void)caller {
24*f4a2713aSLionel Sambuc    [MyClass callee];
25*f4a2713aSLionel Sambuc}
26*f4a2713aSLionel Sambuc+ (void)callee {
27*f4a2713aSLionel Sambuc  clang_analyzer_checkInlined(0); // The call is not inlined.
28*f4a2713aSLionel Sambuc}
29*f4a2713aSLionel Sambuc@end