ichesnokov marked 3 inline comments as done. ================ Comment at: lib/Sema/SemaDecl.cpp:2039 @@ -2038,1 +2038,3 @@ + // Added isImplicit() check, because implicit TypeDecl::getLocation() + // returns 0. The're many implicit typedefs in OpenCL, e.g. atomic_flag. ---------------- Fixed.
================ Comment at: test/SemaOpenCL/implicit-typedef.cl:2 @@ +1,3 @@ +// RUN: %clang_cc1 %s -DTEST_WARNINGS -cl-std=CL2.0 -verify -pedantic -fsyntax-only -Wsystem-headers +// RUN: %clang_cc1 %s -cl-std=CL2.0 -fsyntax-only + ---------------- Done. ================ Comment at: test/SemaOpenCL/implicit-typedef.cl:3 @@ +2,3 @@ +// RUN: %clang_cc1 %s -cl-std=CL2.0 -fsyntax-only + +#if defined(TEST_WARNINGS) ---------------- 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? http://reviews.llvm.org/D16351 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits