ABataev added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:11348
     // initialiser
-    if (var->getTypeSourceInfo()->getType()->isBlockPointerType() &&
-        !var->hasInit()) {
+    if (var->getType()->isBlockPointerType() && !var->hasInit()) {
       Diag(var->getLocation(), diag::err_opencl_invalid_block_declaration)
----------------
Anastasia wrote:
> Does `simd` result in block creation? My original understanding of it was 
> that it will result in vector operations, not extra threads. 
Currently all of the OpenMP constructs (even simd) create special lambda-like 
construct CapturedStmt that are kind of a block. It is required for unified 
processing of the OpenMP constructs. 


================
Comment at: test/SemaOpenCL/omp_simd.cl:1
+// RUN: %clang_cc1 -verify -fopenmp -fsyntax-only -x cl %s
+// expected-no-diagnostics
----------------
It would be good to check that at least -ast-print or -ast-dump works 
correctly. 


Repository:
  rC Clang

https://reviews.llvm.org/D46667



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

Reply via email to