minix/external/bsd/llvm/dist/clang/test/Analysis/shallow-mode.m
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

29 lines
No EOL
631 B
Objective-C

// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config mode=shallow -verify %s
// expected-no-diagnostics
void clang_analyzer_checkInlined(unsigned);
typedef signed char BOOL;
typedef struct objc_class *Class;
typedef struct objc_object {
Class isa;
} *id;
@protocol NSObject - (BOOL)isEqual:(id)object; @end
@interface NSObject <NSObject> {}
+(id)alloc;
-(id)init;
@end
@interface MyClass : NSObject
+ (void)callee;
+ (void)caller;
@end
@implementation MyClass
+ (void)caller {
[MyClass callee];
}
+ (void)callee {
clang_analyzer_checkInlined(0); // The call is not inlined.
}
@end