blob: 36db470de9e1e43ba7ed840a079eaf874d998484 [file] [log] [blame]
Ted Kremenek43ae4b02008-04-24 18:28:14 +00001// RUN: clang -checker-simple -verify %s
2
3struct FPRec {
4 void (*my_func)(int * x);
5};
6
7int bar(int x);
8
9int f1_a(struct FPRec* foo) {
10 int x;
11 (*foo->my_func)(&x);
12 return bar(x)+1; // no-warning
13}
14
15int f1_b() {
16 int x;
17 return bar(x)+1; // expected-warning{{Pass-by-value argument in function is undefined.}}
18}