[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 25 09:52:28 PDT 2023
ABataev added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:23121-23122
+ void VisitExpr(const Expr *Ex) {
+ for (Expr::const_child_iterator it = Ex->child_begin();
+ it != Ex->child_end(); ++it) {
+ Visit(*it);
----------------
`for (const Expr *Child : Ex->children())`
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:23138-23143
+ if (Ex) {
+ if (auto *DeclRef = dyn_cast_or_null<DeclRefExpr>(Ex))
+ VisitDeclRefExpr(DeclRef);
+ else
+ VisitExpr(Ex);
+ }
----------------
Shall just something like this work here:
```
if (Ex)
Visit(Ex);
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146418/new/
https://reviews.llvm.org/D146418
More information about the cfe-commits
mailing list