See original RFC: https://lists.llvm.org/pipermail/cfe-dev/2021-February/067610.html
This patch enabled the Tablegen based declarations by default along with opencl-c-base.h containing complete list of OpenCL types. It also adds a new flag -cl-no-stdinc that disables extra header includes and declarations.
The next step would be to either add missing declarations into Tablegen header or opencl-c-base.h.
The commit message suggestion:
This patch enables the builtin function declarations by default using the Tablegen solution along with the implicit include of opencl-c-base.h header. A new flag '-cl-no-stdinc' disabling all default declarations and header includes is added. If any other mechanisms were used to include the declarations (e.g. with -Xclang -finclude-default-header) and the new default approach is not sufficient the `-cl-no-stdinc` flag has to be used to switch to the old behavior.