[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 12 01:38:22 PDT 2024
================
@@ -11099,6 +11099,19 @@ OpenACCClause *TreeTransform<Derived>::TransformOpenACCClause(
ParsedClause.setDefaultDetails(
cast<OpenACCDefaultClause>(OldClause)->getDefaultClauseKind());
break;
+ case OpenACCClauseKind::If: {
+ Expr *Cond = const_cast<Expr *>(
+ cast<OpenACCIfClause>(OldClause)->getConditionExpr());
----------------
cor3ntin wrote:
Can we add an assert that Cond is not null?
(I guess the logic here is that if the if clause is invalid, it will never be transformed?)
https://github.com/llvm/llvm-project/pull/88411
More information about the cfe-commits
mailing list