1// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config suppress-c++-stdlib=false -verify %s
2// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config suppress-c++-stdlib=true -DSUPPRESSED=1 -verify %s
3
4#ifdef SUPPRESSED
5// expected-no-diagnostics
6#endif
7
8#include "../Inputs/system-header-simulator-cxx.h"
9
10void clang_analyzer_eval(bool);
11
12void testCopyNull(int *I, int *E) {
13  std::copy(I, E, (int *)0);
14#ifndef SUPPRESSED
15  // expected-warning@../Inputs/system-header-simulator-cxx.h:110 {{Dereference of null pointer}}
16#endif
17}
18