Skip to content

[flang][OpenMP][NFC] Don't use special chars in error messages #134686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

luporl
Copy link
Contributor

@luporl luporl commented Apr 7, 2025

Some error messages were using a special char for fi, in the
word specified, probably due to a typo.

This caused an error on Windows: #134625

Some error messages were using a special char for `fi`, in the
word `specified`, probably due to a typo.

This caused an error on Windows: llvm#134625
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:openmp flang:semantics labels Apr 7, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 7, 2025

@llvm/pr-subscribers-flang-openmp

@llvm/pr-subscribers-flang-semantics

Author: Leandro Lupori (luporl)

Changes

Some error messages were using a special char for fi, in the
word specified, probably due to a typo.

This caused an error on Windows: #134625


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

2 Files Affected:

  • (modified) flang/lib/Semantics/check-omp-structure.cpp (+4-4)
  • (modified) flang/test/Semantics/OpenMP/interop-construct.f90 (+2-2)
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 757d2316e6b53..717982f66027c 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -5762,7 +5762,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
               const auto *objectSymbol{name->symbol};
               if (llvm::is_contained(objectSymbolList, objectSymbol)) {
                 context_.Say(GetContext().directiveSource,
-                    "Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
+                    "Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
               } else {
                 objectSymbolList.insert(objectSymbol);
               }
@@ -5777,7 +5777,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
               const auto *objectSymbol{name->symbol};
               if (llvm::is_contained(objectSymbolList, objectSymbol)) {
                 context_.Say(GetContext().directiveSource,
-                    "Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
+                    "Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
               } else {
                 objectSymbolList.insert(objectSymbol);
               }
@@ -5789,7 +5789,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
               const auto *objectSymbol{name->symbol};
               if (llvm::is_contained(objectSymbolList, objectSymbol)) {
                 context_.Say(GetContext().directiveSource,
-                    "Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
+                    "Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
               } else {
                 objectSymbolList.insert(objectSymbol);
               }
@@ -5800,7 +5800,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
   }
   if (targetCount > 1 || targetSyncCount > 1) {
     context_.Say(GetContext().directiveSource,
-        "Each interop-type may be specified at most once."_err_en_US);
+        "Each interop-type may be specified at most once."_err_en_US);
   }
   if (isDependClauseOccured && !targetSyncCount) {
     context_.Say(GetContext().directiveSource,
diff --git a/flang/test/Semantics/OpenMP/interop-construct.f90 b/flang/test/Semantics/OpenMP/interop-construct.f90
index dfcd55c4adabe..bc32bd80c22a6 100644
--- a/flang/test/Semantics/OpenMP/interop-construct.f90
+++ b/flang/test/Semantics/OpenMP/interop-construct.f90
@@ -8,7 +8,7 @@
 SUBROUTINE test_interop_01()
   USE omp_lib
   INTEGER(OMP_INTEROP_KIND) :: obj
-  !ERROR: Each interop-var may be specified for at most one action-clause of each INTEROP construct.
+  !ERROR: Each interop-var may be specified for at most one action-clause of each INTEROP construct.
   !$OMP INTEROP INIT(TARGETSYNC,TARGET: obj) USE(obj)
   PRINT *, 'pass'
 END SUBROUTINE test_interop_01
@@ -16,7 +16,7 @@ END SUBROUTINE test_interop_01
 SUBROUTINE test_interop_02()
   USE omp_lib
   INTEGER(OMP_INTEROP_KIND) :: obj
-  !ERROR: Each interop-type may be specified at most once.
+  !ERROR: Each interop-type may be specified at most once.
   !$OMP INTEROP INIT(TARGETSYNC,TARGET,TARGETSYNC: obj)
   PRINT *, 'pass'
 END SUBROUTINE test_interop_02

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.

Thanks

@luporl luporl merged commit 76fee8f into llvm:main Apr 7, 2025
15 checks passed
@luporl luporl deleted the luporl-omp-errmsg branch April 7, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:openmp flang:semantics flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants