Anastasia 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)
----------------
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.



http://reviews.llvm.org/D16351



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to