aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/malloc.c
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-05-04 17:37:16 +0000
committerAnna Zaks <ganna@apple.com>2012-05-04 17:37:16 +0000
commit84d43848e39eab9e3386cbfb3906ba2d6a382f24 (patch)
treeb49e7d0a151415565a5bc79ffa4d75edb7ea44a0 /test/Analysis/malloc.c
parent6a26e2e54aa2a8cc6c977081befd8e80e7573ca4 (diff)
[analyzer]Fixup r156134: Handle the case when FunctionDecl isn't avail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/malloc.c')
-rw-r--r--test/Analysis/malloc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Analysis/malloc.c b/test/Analysis/malloc.c
index a7d5b0b0e9..3257d3d95a 100644
--- a/test/Analysis/malloc.c
+++ b/test/Analysis/malloc.c
@@ -829,6 +829,12 @@ void r11160612_6(StWithCallback St) {
dealocateMemWhenDoneByRef(&St, x);
}
+int mySub(int, int);
+int myAdd(int, int);
+int fPtr(unsigned cond, int x) {
+ return (cond ? mySub : myAdd)(x, x);
+}
+
// ----------------------------------------------------------------------------
// Below are the known false positives.