[PATCH] D14940: [OpenMP] Update target directive codegen to use 4.5 implicit data mappings.
Samuel Antao via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 30 19:55:37 PST 2015
sfantao added a comment.
Hi Alexey,
Thanks for the review!
================
Comment at: include/clang/AST/Stmt.h:2018-2020
@@ -2016,2 +2017,5 @@
break;
+ case VCK_ByCopy:
+ assert(Var && "capturing by copy must have a variable!");
+ break;
case VCK_VLAType:
----------------
ABataev wrote:
> Also add assertion that only pointers anmd scalars are allowed to be captured by value
Done! Note however that VarDecl was an incomplete type here. So I moved the code to Stmt.cpp.
================
Comment at: lib/Sema/SemaOpenMP.cpp:818-819
@@ +817,4 @@
+ // captures in that those cases.
+ IsByRef = isa<TemplateTypeParmType>(Ty) || isa<RecordType>(Ty) ||
+ isa<ArrayType>(Ty);
+ }
----------------
ABataev wrote:
> Wow. I think it is just enough to check !Ty->isScalarType().
Oh, right. Changed that to use `isScalarType`.
http://reviews.llvm.org/D14940
More information about the cfe-commits
mailing list