[PATCH] D38040: [OpenMP] Add an additional test for D34888

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 22 06:50:13 PDT 2017


Hahnfeld added a comment.

In https://reviews.llvm.org/D38040#878441, @gtbercea wrote:

> The test is verifying whether the parameter is passed to the kernel correctly. I believe it was not passed as a reference before the patch.


Ah, right: This isn't checked anywhere before. Maybe add a comment about what's tested here?
Do we want to check the rest of the codegen with a focus that the variable is passed as a reference?

> In addition to that, something that was in my previous patch is related to this code:
> 
>   DSAStack->checkMappableExprComponentListsForDeclAtLevel(
>           D, Level, [&](OMPClauseMappableExprCommon::MappableExprComponentListRef
> 
> 
> In particular with the Level variable. Should the Level variable actually be Level + 1 in this case?

I'm not sure, the current public `clang-ykt` has `Level`:  https://github.com/clang-ykt/clang/blob/d181aed/lib/Sema/SemaOpenMP.cpp#L1361


Repository:
  rL LLVM

https://reviews.llvm.org/D38040





More information about the cfe-commits mailing list