[flang-commits] [flang] [llvm] [flang][OpenMP] Allow INIT clause on DEPOBJ, add depinfo-modifier (PR #173056)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Mon Dec 22 05:54:14 PST 2025


================
@@ -252,6 +252,23 @@ void OmpDirectiveNameParser::initTokens(std::vector<NameWithId> table[]) const {
   }
 }
 
+// --- Common types ---------------------------------------------------
+
+TYPE_PARSER(construct<common::OmpDependenceKind>(
+    "DEPOBJ" >> pure(common::OmpDependenceKind::Depobj) ||
+    "IN"_id >> pure(common::OmpDependenceKind::In) ||
+    "INOUT"_id >> pure(common::OmpDependenceKind::Inout) ||
----------------
kparzysz wrote:

This is because IN is a prefix of INOUT, which in turn is a prefix of INOUTSET.

Would you prefer if they were listed from the longest to the shortest without the _id, or if all of them had _id?  The _id requires a word break for the string to match, so it may fail if there is code without whitespace that could otherwise be parsed.  This hasn't been treated as a priority though.

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


More information about the flang-commits mailing list