[clang] [clang][OpenMP] Add 'align' modifier for 'allocate' clause (PR #121814)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 08:04:32 PST 2025


================
@@ -17153,11 +17155,25 @@ OMPClause *SemaOpenMP::ActOnOpenMPVarListClause(OpenMPClauseKind Kind,
   case OMPC_has_device_addr:
     Res = ActOnOpenMPHasDeviceAddrClause(VarList, Locs);
     break;
-  case OMPC_allocate:
-    Res = ActOnOpenMPAllocateClause(Data.DepModOrTailExpr,
-                                    Data.AllocClauseModifier, VarList, StartLoc,
-                                    LParenLoc, ColonLoc, EndLoc);
+  case OMPC_allocate: {
+    OpenMPAllocateClauseModifier Modifier1 = OMPC_ALLOCATE_unknown;
+    OpenMPAllocateClauseModifier Modifier2 = OMPC_ALLOCATE_unknown;
+    SourceLocation Modifier1Loc, Modifier2Loc;
+    if (auto NumModifiers = Data.AllocClauseModifiers.size()) {
----------------
alexey-bataev wrote:

```suggestion
    if (!Data.AllocClauseModifiers.empty()) {
```


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


More information about the cfe-commits mailing list