PCH tests for va_arg expressions. Verified that the blocks test does create a BlockDeclRefExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69376 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/PCH/va_arg.c b/test/PCH/va_arg.c
new file mode 100644
index 0000000..796be03
--- /dev/null
+++ b/test/PCH/va_arg.c
@@ -0,0 +1,12 @@
+// Test this without pch.
+// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include %S/va_arg.h -fsyntax-only -ast-print -o - %s
+
+// Test with pch.
+// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -emit-pch -o %t %S/va_arg.h &&
+// RUN: clang-cc -triple=x86_64-unknown-freebsd7.0 -include-pch %t -fsyntax-only -ast-print -o - %s
+
+char *g0(char** argv, int argc) { return argv[argc]; }
+
+char *g(char **argv) {
+ f(g0, argv, 1, 2, 3);
+}