1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.coreFoundation.CFError \
4 typedef unsigned long size_t;
6 typedef struct __CFError
*CFErrorRef
;
11 Foo(CFErrorRef
*error
) {} // no-warning
13 void operator delete(void *pointer
, CFErrorRef
*error
) { // no-warning
17 void operator delete[](void *pointer
, CFErrorRef
*error
) { // no-warning
21 // Check that we report warnings for operators when it can be useful
22 void operator()(CFErrorRef
*error
) {} // expected-warning {{Function accepting CFErrorRef* should have a non-void return value to indicate whether or not an error occurred}}
25 // Check that global delete operator is not bothered as well
26 void operator delete(void *pointer
, CFErrorRef
*error
) { // no-warning