Index: clang/docs/LanguageExtensions.rst =================================================================== --- clang/docs/LanguageExtensions.rst +++ clang/docs/LanguageExtensions.rst @@ -1813,6 +1813,20 @@ #pragma OPENCL EXTENSION __cl_clang_variadic_functions : disable void bar(int a, ...); // error - variadic prototype is not allowed +Legacy 1.x atomics with generic address space +--------------------------------------------- + +Clang allows use of atomic functions from earlier than OpenCL 2.0 +standard with generic address space pointer in C++ for OpenCL mode. + +**Example of Use**: + +.. code-block:: c++ + + void foo(__generic volatile unsigned int* a) { + atomic_add(a, 1); + } + Builtin Functions =================