[clang] Adding support for iterator in motion clauses. (PR #159112)

via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 14 04:15:19 PST 2025


================
@@ -4699,19 +4699,35 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind,
         break;
       Data.MotionModifiers.push_back(Modifier);
       Data.MotionModifiersLoc.push_back(Tok.getLocation());
-      ConsumeToken();
-      if (Modifier == OMPC_MOTION_MODIFIER_mapper) {
-        IsInvalidMapperModifier = parseMapperModifier(Data);
-        if (IsInvalidMapperModifier)
+      if (PP.getSpelling(Tok) == "iterator" && getLangOpts().OpenMP >= 51) {
+        ColonProtectionRAIIObject ColonRAII(*this);
+        TentativeParsingAction TPA(*this);
+        ExprResult Tail;
+        HasIterator = true;
+        EnterScope(Scope::OpenMPDirectiveScope | Scope::DeclScope);
----------------
ShashwathiNavada wrote:

I realized we don't actually need it. Hence removed it. Thanks!

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


More information about the cfe-commits mailing list