// RUN: rm -fR %t
// RUN: mkdir %t
// RUN: %clang_analyze_cc1 -analyzer-checker=core \
// RUN: -analyzer-output=html -o %t -verify %s
// RUN: cat %t/report-*.html | FileCheck %s
int dereference(int *x) {
return *x; // expected-warning{{Dereference of null pointer (loaded from variable 'x')}}
}
int foobar(bool cond, int *x) {
if (cond)
x = 0;
return dereference(x);
}
// CHECK:
// CHECK-NOT: