jyu2 added inline comments.

================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2398
+        return VD;
+      ExprResult ThisExpr = ActOnCXXThis(SourceLocation());
+      if (ThisExpr.isInvalid())
----------------
ABataev wrote:
> Maybe `BuildCXXThisExpr(SourceLocation(), getCurrentThisType(), 
> /*IsImplicit=*/true)`?
Thanks.  Change


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:2410
+          buildCaptureDecl(*this, FD->getIdentifier(), ME,
+                           DVarPrivate.CKind == OMPC_private ? false : true,
+                           CurContext->getParent(),
----------------
ABataev wrote:
> Just `DVarPrivate.CKind != OMPC_private`
Yes!! changed


================
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() &&
----------------
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'


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127803/new/

https://reviews.llvm.org/D127803

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

Reply via email to