From 2b0fa129d65e802ffeba35fce1ad041de25bedb2 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Tue, 2 May 2017 20:10:03 +0000 Subject: Simplify some va_start checking logic Combine the logic doing the ms_abi/sysv_abi checks into one function so that each check and its logical opposite are near each other. Now we don't need two Sema entry points for MS va_start and regular va_start. Refactor the code that checks if the va_start caller is a function, block, or obj-c method. We do this in three places, and they are all buggy for variadic lambdas (PR32737). After this change, I have one place to apply the functional fix. NFC llvm-svn: 301968 --- clang/test/Sema/varargs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/test/Sema/varargs.c') diff --git a/clang/test/Sema/varargs.c b/clang/test/Sema/varargs.c index 25a5c72c42e..0ade0cf0aaf 100644 --- a/clang/test/Sema/varargs.c +++ b/clang/test/Sema/varargs.c @@ -27,7 +27,7 @@ void f3(float a, ...) { // expected-note 2{{parameter of type 'float' is declare } -// stdarg: PR3075 +// stdarg: PR3075 and PR2531 void f4(const char *msg, ...) { __builtin_va_list ap; __builtin_stdarg_start((ap), (msg)); -- cgit v1.2.3