2 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3 // See https://llvm.org/LICENSE.txt for license information.
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 // -*- mode:C; c-basic-offset:4; tab-width:4; intent-tabs-mode:nil; -*-
15 int main (int argc
, const char * argv
[]) {
16 int (^sumn
)(int n
, ...) = ^(int n
, ...){
22 for (i
= 0 ; i
< n
; i
++) {
23 result
+= va_arg(numbers
, int);
29 int six
= sumn(3, 1, 2, 3);
32 printf("%s: Expected 6 but got %d\n", argv
[0], six
);
36 printf("%s: success\n", argv
[0]);