svenvh added inline comments.
================ Comment at: clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl:27 + // expected-error@-3 0+{{no matching function for call to 'barrier'}} + // expected-error@* {{typedef type cl_mem_fence_flags not found; include the base header with -finclude-default-header}} +} ---------------- Anastasia wrote: > Actually, could we remove the `typedef` from the diagnostic because it > exposes the implementation details unnecessarily? I believe the spec doesn't > say what the type is aside from enums? As a matter of fact, we have some > types implemented as typedefs that should have been a native types e.g. > vector types that we might change one day. I agree it's an implementation detail, but I can see reasons for keeping it: when there is an enum type with the same name available in the translation unit, then the message "type X not found" is not completely correct, because a type X exists, but it is of the wrong type. By prefixing "enum" or "typedef", the diagnostic is more accurate. This diagnostic is mainly targeted at Clang developers actually, because a user shouldn't see this diagnostic in any normal use case (with the driver setting both -fdeclare-opencl-builtins and -finclude-default-header). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96051/new/ https://reviews.llvm.org/D96051 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits