aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/function.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-22 21:41:40 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-22 21:41:40 +0000
commited5d651b0d4b99d0b68bb8d4633e49b98c95bd8f (patch)
treef59bfc4080cd48710143db1d396c311581e1deb0 /test/Sema/function.c
parentcf54959eae25fb3050f41833f0eab91042fb1269 (diff)
In C++, a variadic function does not need an ellipsis prior to the comma. Parse it in both C and C++, but diagnose it as an error in C with a fix-it hint to add the comma.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82576 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/function.c')
-rw-r--r--test/Sema/function.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Sema/function.c b/test/Sema/function.c
index c9d8630c47..e7a37f1a2f 100644
--- a/test/Sema/function.c
+++ b/test/Sema/function.c
@@ -87,3 +87,5 @@ unknown_type t19(int* P) { // expected-error {{unknown type name 'unknown_type
P = P+1; // no warning.
}
+// missing ',' before '...'
+void t20(int i...) { } // expected-error {{requires a comma}}