[Openmp-commits] [PATCH] D76211: OpenMP Metadirective with user defined condition
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Mar 30 08:03:40 PDT 2020
jdoerfert added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5801
+ Expr *expr = whenClause->getExpr();
+ Stmt *stmt = NULL;
+
----------------
Style: start names with upper case letter.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5817
+ llvm::errs() << "Misplaced default clause! Only one default clause is";
+ llvm::errs() << " allowed in metadirective in the end\n";
+ return StmtError();
----------------
You need to use `Diag` here. See other uses in this file.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:5834
+ stmt, SourceLocation(), ElseStmt);
+ }
+
----------------
Doesn't this produce:
```
if (when1) case1;
if (when2) case2;
...
```
while we need:
```
if (when1) case1;
else if (when2) case2;
...
```
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:11987
+ }
+ break;
}
----------------
I think a simple `if (DKind == ...)` makes more sense here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76211/new/
https://reviews.llvm.org/D76211
More information about the Openmp-commits
mailing list