]> granicus.if.org Git - clang/commitdiff
Add test case for FuncDecl and function pointer variable.
authorZhongxing Xu <xuzhongxing@gmail.com>
Wed, 22 Oct 2008 14:39:20 +0000 (14:39 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Wed, 22 Oct 2008 14:39:20 +0000 (14:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57979 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/func.c [new file with mode: 0644]

diff --git a/test/Analysis/func.c b/test/Analysis/func.c
new file mode 100644 (file)
index 0000000..94ea0eb
--- /dev/null
@@ -0,0 +1,9 @@
+// RUN: clang -checker-simple -verify %s
+
+void f(void) {
+  void (*p)(void);
+  p = f;
+  p = &f;
+  p();
+  (*p)();
+}