aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-10-22 14:39:20 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-10-22 14:39:20 +0000
commitc498848ebcf22a9de23143b342f28b6d4f515436 (patch)
tree839570944407a606d580ad86a8461e188103e245
parent57373266011f73418381b736015d8d2bb0381176 (diff)
Add test case for FuncDecl and function pointer variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57979 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/func.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Analysis/func.c b/test/Analysis/func.c
new file mode 100644
index 0000000000..94ea0eb300
--- /dev/null
+++ b/test/Analysis/func.c
@@ -0,0 +1,9 @@
+// RUN: clang -checker-simple -verify %s
+
+void f(void) {
+ void (*p)(void);
+ p = f;
+ p = &f;
+ p();
+ (*p)();
+}