All OpenCL extensions implemented in clang were adding an extension pragma. However, the spec has never described what the pragma was needed for. There is now an issue open to the spec to clarify the behavior of pragma https://github.com/KhronosGroup/OpenCL-Docs/issues/82.
The majory of extension pragmas are simply ignored by clang. This is for example the case for all extensions from the list II in RFC: http://lists.llvm.org/pipermail/cfe-dev/2020-September/066911.html. The pragmas are simply ignored because the only functionality needed is extension macro definition.
In https://reviews.llvm.org/D91531 I proposed alternative mechanisms to define the extension macro. But that patch completely removed the pragma for the extension that was accepted by the parser originally. This implies that the existing kernels that used the pragma will be compiled with a warning for the new clang releases:
unknown OpenCL extension 'cl_khr_depth_images' - ignoring
Even though it is not uncommon that the new warnings occur for the existing code with new compiler releases, it has been discussed in https://reviews.llvm.org/D89372 that this might be unacceptable for the OpenCL developers. To prevent this warning the suggestion is to introduce a new warning that is TURNED OFF by default with the following wording:
OpenCL extension pragma 'cl_khr_depth_images' has no effect - ignoring
This design favors the existing kernels that might have used the pragma. This is highly unlikely because the pragma never did anything but it is not impossible. The developer of new kernels that wish to avoid redundant pragma will be able to pass -Wpedantic-redundant-pragma flag to clang which will then provide the warning with the wording below if such pragmas are found.
Note that the same behavior has been implemented for the extension pragma that become core functionality of the specification. See -Wpedantic-core-features for more details. The proposed approach is therefore built on top of the existing concept.