aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Parser/recovery-3.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Parser/recovery-3.c b/test/Parser/recovery-3.c
new file mode 100644
index 0000000000..40cf8cd709
--- /dev/null
+++ b/test/Parser/recovery-3.c
@@ -0,0 +1,9 @@
+// RUN: clang -fsyntax-only -verify -pedantic %s
+
+// Testcase derived from PR2692
+static char *f (char * (*g) (char **, int), char **p, ...) {
+ char *s;
+ va_list v; // expected-error {{identifier}}
+ s = g (p, __builtin_va_arg(v, int)); // expected-error {{identifier}} expected-warning {{extension}}
+}
+