Clang's implementation of the extension pragma is broken because it doesn't respect the following requirement from OpenCL Extension spec s1.2:
https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#extensions-overview
disable Behave (including issuing errors and warnings) as if the extension extension_name is not part of the language definition.
This means that extension functionality should not be exposed by default and if extension identifiers are not reserved they should not be recognized by the compiler. This is for example the case for some of the atomic types (i.e. 64 bit types) from extensions.
As fixing the implementation of extension pragma is not feasible and it will affect backward compatibility and require significant rework in the parser this patch simplifies the implementation of pragma by making the behavior as consistent and intuitive as possible.
This change removes the requirement on pragma when atomic types from the extensions are supported because the behavior is not conformant. With this change, the developers can use atomic types from the extensions if they are supported without enabling the pragma because disabling the pragma doesn't do anything useful but only prevents the use of already available identifiers for types and issues extra diagnostics. This makes semantics consistent with the atomic functions that are also available when the extension is supported without any need for the pragma.
This patch does not break backward compatibility since the extension pragma is still supported and it makes the behavior of the compiler less strict by accepting code without extra pragma statements.
Note that there is an ongoing thread to alter the behavior in the spec
https://github.com/KhronosGroup/OpenCL-Docs/issues/82
however this change is orthogonal as it simplifies the current implementation that is not conformant.
Any new functionality can be added later if the behavior in the spec is fixed.
Mauby simply -DLANG_VER_OK when running tests?