[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

Ritanya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 09:25:14 PDT 2023


RitanyaB added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:23094-23095
+public:
+  SmallVector<Decl *> DeclVector;
+  Decl *TargetDecl;
+  void VisitDeclRefExpr(const DeclRefExpr *Node) {
----------------
ABataev wrote:
> Why public?
As the data members are accessed from outside the class (in ActOnOpenMPImplicitDeclareTarget function), I have made them public.  


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:23107-23110
+      if (isa<Expr>(*it))
+        VisitExpr(dyn_cast<Expr>(*it));
+      if (isa<DeclRefExpr>(*it))
+        Visit(*it);
----------------
ABataev wrote:
> Just Visit(*it)?
Or I can call VisitDeclRefExpr directly. Would that be more suitable?


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

https://reviews.llvm.org/D146418



More information about the cfe-commits mailing list