[ELF] Reorder SectionBase/InputSectionBase members
[llvm-project.git] / clang / test / Analysis / SpecialFunctionsCFError.cpp
blob3517933f6bcc6c6a191959ccb8fd35035b6ebbf1
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.coreFoundation.CFError \
2 // RUN: -verify %s
4 typedef unsigned long size_t;
5 struct __CFError {};
6 typedef struct __CFError *CFErrorRef;
7 void *malloc(size_t);
9 class Foo {
10 public:
11 Foo(CFErrorRef *error) {} // no-warning
13 void operator delete(void *pointer, CFErrorRef *error) { // no-warning
14 return;
17 void operator delete[](void *pointer, CFErrorRef *error) { // no-warning
18 return;
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
27 return;