mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 18:26:05 +00:00

OpenCL disallows using variadic arguments (s6.9.e and s6.12.5 OpenCL v2.0) apart from some exceptions: - printf - enqueue_kernel This change adds error diagnostic for variadic functions but accepts printf and any compiler internal function (which should cover __enqueue_kernel_XXX cases). It also unifies diagnostic with block prototype and adds missing uncaught cases for blocks. llvm-svn: 285395
15 lines
310 B
Common Lisp
15 lines
310 B
Common Lisp
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2
|
|
|
|
// expected-no-diagnostics
|
|
|
|
float __attribute__((overloadable)) acos(float);
|
|
|
|
typedef float float4 __attribute__((ext_vector_type(4)));
|
|
int printf(__constant const char* st, ...);
|
|
|
|
void test(void)
|
|
{
|
|
float4 a;
|
|
printf("%8.4v4hlf\n", a);
|
|
}
|