brintos

brintos / llvm-project-archived public Read only

0
0
Text · 887 B · 83b08a6 Raw
36 lines · plain
1// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.NoUncountedMemberChecker -verify %s2 3#include "mock-types.h"4 5__attribute__((objc_root_class))6@interface NSObject7+ (instancetype) alloc;8- (instancetype) init;9- (instancetype)retain;10- (void)release;11@end12 13void doSomeWork();14 15@interface SomeObjC : NSObject {16  RefCountable* _uncounted1;17// expected-warning@-1{{Instance variable '_uncounted1' in 'SomeObjC' is a raw pointer to ref-countable type 'RefCountable'}}  18  RefPtr<RefCountable> _counted1;19  [[clang::suppress]] RefCountable* _uncounted2;20}21- (void)doWork;22@end23 24@implementation SomeObjC {25  RefCountable* _uncounted3;26// expected-warning@-1{{Instance variable '_uncounted3' in 'SomeObjC' is a raw pointer to ref-countable type 'RefCountable'}}27  RefPtr<RefCountable> _counted2;28  [[clang::suppress]] RefCountable* _uncounted4;29}30 31- (void)doWork {32  doSomeWork();33}34 35@end36