OCL analysis?

I’d like to be able to use clang to do simple OpenCL analysis. It seems like it’s not-quite-exactly a design goal for clang to be able to support the entirety of the OCL standard, yes? For example, the entire set of types/enumerations etc are not defined when using “-x cl” to specify opencl.

In the past, I’ve thrown together a patched libclc and used clang’s “-x cl” in order to generate warnings for my OpenCL kernels. Even really trivial warnings seem to uncover bugs. I suspect that the checkers also would provide some value (more signal than noise) but I haven’t used them on OCL yet.

I think there’s value in having a tool that does this, but does it belong in clang? If not, are there existing projects who already cover this use case?