ichesnokov added inline comments. ================ Comment at: test/SemaOpenCL/implicit-typedef.cl:3 @@ +2,3 @@ +// RUN: %clang_cc1 %s -cl-std=CL2.0 -fsyntax-only + +#if defined(TEST_WARNINGS) ---------------- Anastasia wrote: > ichesnokov wrote: > > Are you mean another text of warning? Notice that actual patch will work > > not only in OpenCL, but any language. If builtin functions present, it will > > prevent the crash. The single message "redefinition of typedef > > 'atomic_flag' is a C11 feature" is default for all targets. > > Do you want to have specific warning text for OpenCL? > No, you can use select{OpenCL|C11} or you can pass 'OpenCL' or 'C11' as a > string to the diagnostic as an argument. > > You can take a look at err_opencl_unknown_type_specifier as an example, that > uses both approaches. > > LangOpts.OpenCL will help you to detect the language mode for > selecting/passing the right string. > I can't find anything like select{} in my local copy (there's LLVM and Clang). I also can't find err_opencl_unknown_type_specifier, such file is not presernt in my WC (updated today).
> LangOpts.OpenCL will help you to detect the language mode for > selecting/passing the right string. Currently it checks both Microsoft and Itanium manglers on all platforms, with one test case. I am not sure how to use LangOpts.OpenCL... We are making .cl test suite and C++ classes will be unavailble here. Excuse me, could you please explain more? http://reviews.llvm.org/D16351 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits