[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 24 08:04:52 PDT 2022
ABataev added inline comments.
================
Comment at: clang/lib/Sema/TreeTransform.h:11071-11073
+ if (!getDerived().AlwaysRebuild() && !getSema().getLangOpts().OpenMP &&
+ Base.get() == E->getBase() && QualifierLoc == E->getQualifierLoc() &&
+ Member == E->getMemberDecl() && FoundDecl == E->getFoundDecl() &&
----------------
jyu2 wrote:
> ABataev wrote:
> > Why do we need this check here?
> Without, the field is not getting rebuild during the template instantiation. That cause the field is not getting captured and implicit firstprivate clause is not getting generate. The test is added in default_firstprivate_ast_print.cpp
> where I add check for it on line 58:
> // DUMP-NEXT: -OMPFirstprivateClause
> // DUMP-NEXT: -DeclRefExpr {{.*}} 'targetDev'
This should work without changes. Do we need clause in the template function?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127803/new/
https://reviews.llvm.org/D127803
More information about the cfe-commits
mailing list