[clang] [llvm] [OpenMP 60] Update parsing and semantic support for `nowait` clause to accept optional argument (PR #159628)

Fazlay Rabbi via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 8 21:56:38 PDT 2025


================
@@ -18107,9 +18109,26 @@ OMPClause *SemaOpenMP::ActOnOpenMPClause(OpenMPClauseKind Kind,
 }
 
 OMPClause *SemaOpenMP::ActOnOpenMPNowaitClause(SourceLocation StartLoc,
-                                               SourceLocation EndLoc) {
+                                               SourceLocation EndLoc,
+                                               SourceLocation LParenLoc,
+                                               Expr *Condition) {
+  Expr *ValExpr = Condition;
+  if (Condition && LParenLoc.isValid()) {
+    if (!Condition->isValueDependent() && !Condition->isTypeDependent() &&
+        !Condition->isInstantiationDependent() &&
+        !Condition->containsUnexpandedParameterPack()) {
+      ExprResult Val = SemaRef.CheckBooleanCondition(StartLoc, Condition);
+      if (Val.isInvalid())
+        return nullptr;
+
+      ValExpr = Val.get();
+    }
+  } else {
+    ValExpr = nullptr;
----------------
mdfazlay wrote:

Done. Thank you.

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


More information about the llvm-commits mailing list