diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-08-20 22:07:34 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-08-20 22:07:34 +0000 |
commit | 0976278aff6adfe191e7d580f7042ffab296548c (patch) | |
tree | 39a021b23fa5fb1b09ca04c27f8af286b9e05abb /test | |
parent | f6414927e67e27d9324d8d179c5f7ea620443924 (diff) |
Fix a minor crash-on-invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Parser/recovery-3.c | 9 |
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}} +} + |