[clang] [OpenACC] Implement 'if' clause for Compute Constructs (PR #88411)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 06:06:41 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());
----------------
erichkeane wrote:

If the condition is invalid, we shouldn't have constructed an 'if' clause in the first place.  That said, I think an assert makes sense here.

https://github.com/llvm/llvm-project/pull/88411


More information about the cfe-commits mailing list