for the fix in r50178 (http://llvm.org/viewvc/llvm-project?rev=50178&view=rev).
This fix was for <rdar://problem/
5881148>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50220
91177308-0d34-0410-b5e6-
96231b3b80d8
--- /dev/null
+// RUN: clang -checker-simple -verify %s
+
+struct FPRec {
+ void (*my_func)(int * x);
+};
+
+int bar(int x);
+
+int f1_a(struct FPRec* foo) {
+ int x;
+ (*foo->my_func)(&x);
+ return bar(x)+1; // no-warning
+}
+
+int f1_b() {
+ int x;
+ return bar(x)+1; // expected-warning{{Pass-by-value argument in function is undefined.}}
+}