1 // RUN: %clang_analyze_cc1 \
2 // RUN: -analyzer-checker=core,unix.Malloc \
5 // expected-no-diagnostics: We do not model Integer Set Library's retain-count
6 // based allocation. If any of the parameters has an
7 // '__isl_' prefixed macro definition we escape every
8 // of them when we are about to 'free()' something.
13 struct Object
{ int Ref
; };
16 Object
*copyObj(__isl_keep Object
*O
) {
21 void freeObj(__isl_take Object
*O
) {
25 free(O
); // Here we notice that the parameter contains '__isl_', escape it.
28 void useAfterFree(__isl_take Object
*A
) {
32 Object
*B
= copyObj(A
);
36 // no-warning: 'Use of memory after it is freed' was here.