func.c revision 6d0e6ce200aa06b06f0e9b493ed365bbe2982cee
1// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=basic -verify %s
2// RUN: %clang_cc1 -analyze -analyzer-experimental-internal-checks -analyzer-check-objc-mem -analyzer-store=region -verify %s
3
4void f(void) {
5  void (*p)(void);
6  p = f;
7  p = &f; // expected-warning{{Assigned value is always the same as the existing value}}
8  p();
9  (*p)();
10}
11
12void g(void (*fp)(void));
13
14void f2() {
15  g(f);
16}
17