================
@@ -7953,6 +7953,26 @@ setBranchProtectedScope(Sema &SemaRef, 
OpenMPDirectiveKind DKind, Stmt *AStmt) {
   return CS;
 }
 
+StmtResult SemaOpenMP::ActOnOpenMPMetaDirective(ArrayRef<OMPClause *> Clauses,
+                                                Stmt *AStmt,
+                                                SourceLocation StartLoc,
+                                                SourceLocation EndLoc,
+                                                ArrayRef<Expr *> Conditions,
+                                                ArrayRef<Stmt *> Directives) {
+  assert(Conditions.size() == Directives.size() &&
+         "Conditions and Directives must have the same size");
+
+  // Determine if any condition is a non-constant runtime expression.
+  // If all conditions are constant (or this is a compile-time-only
+  // metadirective), IfStmt will already have been resolved by the caller
+  // and Conditions/Directives may be empty.
+  Stmt *IfStmt = Conditions.empty() ? AStmt : nullptr;
+  Stmt *AssocStmt = Conditions.empty() ? nullptr : AStmt;
----------------
alexey-bataev wrote:

Misleading, not called with empty conditions. Should be asserts instead?

https://github.com/llvm/llvm-project/pull/192455
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to