Skip to content

Conversation

@kparzysz
Copy link
Contributor

@kparzysz kparzysz commented Dec 1, 2025

…me, NFC

It is unnecessary, existing overloads handle these cases already.

…me, NFC

It is unnecessary, existing overloads handle these cases already.
@kparzysz kparzysz requested review from Stylie777 and tblah December 1, 2025 15:53
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:parser labels Dec 1, 2025
@llvmbot
Copy link
Member

llvmbot commented Dec 1, 2025

@llvm/pr-subscribers-flang-parser

Author: Krzysztof Parzyszek (kparzysz)

Changes

…me, NFC

It is unnecessary, existing overloads handle these cases already.


Full diff: https://github.com/llvm/llvm-project/pull/170157.diff

1 Files Affected:

  • (modified) flang/include/flang/Parser/openmp-utils.h (+1-11)
diff --git a/flang/include/flang/Parser/openmp-utils.h b/flang/include/flang/Parser/openmp-utils.h
index b72164e6cef4b..b7d990c9e75d6 100644
--- a/flang/include/flang/Parser/openmp-utils.h
+++ b/flang/include/flang/Parser/openmp-utils.h
@@ -67,17 +67,7 @@ struct DirectiveNameScope {
   template <typename T>
   static OmpDirectiveName GetOmpDirectiveName(const T &x) {
     if constexpr (WrapperTrait<T>) {
-      if constexpr (std::is_same_v<T, OpenMPCancelConstruct> ||
-          std::is_same_v<T, OpenMPCancellationPointConstruct> ||
-          std::is_same_v<T, OpenMPDepobjConstruct> ||
-          std::is_same_v<T, OpenMPFlushConstruct> ||
-          std::is_same_v<T, OpenMPInteropConstruct> ||
-          std::is_same_v<T, OpenMPSimpleStandaloneConstruct> ||
-          std::is_same_v<T, OpenMPGroupprivate>) {
-        return x.v.DirName();
-      } else {
-        return GetOmpDirectiveName(x.v);
-      }
+      return GetOmpDirectiveName(x.v);
     } else if constexpr (TupleTrait<T>) {
       if constexpr (std::is_base_of_v<OmpBlockConstruct, T>) {
         return std::get<OmpBeginDirective>(x.t).DirName();

Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kparzysz kparzysz merged commit f3cce97 into main Dec 1, 2025
13 checks passed
@kparzysz kparzysz deleted the users/kparzysz/simpler-getdirname branch December 1, 2025 16:43
augusto2112 pushed a commit to augusto2112/llvm-project that referenced this pull request Dec 3, 2025
llvm#170157)

…me, NFC

It is unnecessary, existing overloads handle these cases already.
kcloudy0717 pushed a commit to kcloudy0717/llvm-project that referenced this pull request Dec 4, 2025
llvm#170157)

…me, NFC

It is unnecessary, existing overloads handle these cases already.
honeygoyal pushed a commit to honeygoyal/llvm-project that referenced this pull request Dec 9, 2025
llvm#170157)

…me, NFC

It is unnecessary, existing overloads handle these cases already.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:parser flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants