1 // RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus.NewDelete -verify %s
3 #include "Inputs/system-header-simulator-cxx.h"
8 int *getData() { return Data
; }
14 int *freeAfterReturnTemp() {
15 return S().getData(); // expected-warning {{Use of memory after it is freed}}
18 int *freeAfterReturnLocal() {
20 return X
.getData(); // expected-warning {{Use of memory after it is freed}}