This feature requires support of __opencl_c_images, so diagnostics for that is provided as well
Suggesting a slight rewording:
Maybe we should change this comment to something like:
// Validate the feature dependencies for OpenCL C 3.0.
Since it is not exactly about the macros.
Maybe we should comment that the first element of the pair is the feature that depends on the feature in the second element?
I guess we don't need the compound assignment here?
Are the parens right here? You probably want
`!S.getLangOpts().OpenCLCPlusPlus && (Ver < 200 || (Ver == 300 && isSupported))`
for the first term, but you have
`!S.getLangOpts().OpenCLCPlusPlus && (Ver < 200) || (Ver == 300 && isSupported)`
Which means the OpenCLCPlusPlus only matters for (Ver < 200) and the (Ver == 300 && ...) term makes things true independent of the OpenCLCPlusPlus check.
If what you currently have is what you want: Remove the parens around (S.getLangOpts().OpenCLVersion < 200) and do instead parenthesize like so: (!S.getLangOpts().OpenCLCPlusPlus && Ver < 200).