[clang] [Clang][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 23 09:28:57 PDT 2024


================
@@ -11350,8 +11350,13 @@ void OMPClauseReader::VisitOMPAllocateClause(OMPAllocateClause *C) {
 
 void OMPClauseReader::VisitOMPNumTeamsClause(OMPNumTeamsClause *C) {
   VisitOMPClauseWithPreInit(C);
-  C->setNumTeams(Record.readSubExpr());
   C->setLParenLoc(Record.readSourceLocation());
+  unsigned NumVars = C->varlist_size();
+  SmallVector<Expr *, 16> Vars;
+  Vars.reserve(NumVars);
+  for (unsigned i = 0; i != NumVars; ++i)
----------------
alexey-bataev wrote:

```suggestion
  for (unsigned I : seq<unsigned>(NumVars))
```

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


More information about the cfe-commits mailing list