// RUN: %clang_analyze_cc1 -verify -analyzer-output=text %s \
// RUN: -analyzer-checker=core \
// RUN: -analyzer-checker=cplusplus \
// RUN: -analyzer-checker=unix \
// RUN: -analyzer-config \
// RUN: unix.DynamicMemoryModeling:AddNoOwnershipChangeNotes=false
// RUN: %clang_analyze_cc1 -verify=expected,ownership -analyzer-output=text %s \
// RUN: -analyzer-checker=core \
// RUN: -analyzer-checker=cplusplus \
// RUN: -analyzer-checker=unix \
// RUN: -analyzer-config \
// RUN: unix.DynamicMemoryModeling:AddNoOwnershipChangeNotes=true
//===----------------------------------------------------------------------===//
// Report for which we expect NoOwnershipChangeVisitor to add a new note.
//===----------------------------------------------------------------------===//
bool ;
// TODO: AST analysis of sink would reveal that it doesn't intent to free the
// allocated memory, but in this instance, its also the only function with
// the ability to do so, we should see a note here.
// namespace memory_allocated_in_fn_call
// Realize that sink() intends to deallocate memory, assume that it should've
// taken care of the leaked object as well.
// namespace memory_passed_to_fn_call_delete
// namespace memory_passed_to_fn_call_free
// Function pointers cannot be resolved syntactically.
// namespace memory_passed_to_fn_call_free_through_fn_ptr
// namespace memory_shared_with_ptr_of_shorter_lifetime
//===----------------------------------------------------------------------===//
// Report for which we *do not* expect NoOwnershipChangeVisitor add a new note,
// nor do we want it to.
//===----------------------------------------------------------------------===//
// namespace memory_not_passed_to_fn_call
// namespace memory_shared_with_ptr_of_same_lifetime
// namespace memory_passed_into_fn_that_doesnt_intend_to_free
// namespace memory_passed_into_fn_that_doesnt_intend_to_free2
// namespace refkind_from_unoallocated_to_allocated