[flang-commits] [flang] [flang][OpenMP][NFC] Don't use special chars in error messages (PR #134686)
Leandro Lupori via flang-commits
flang-commits at lists.llvm.org
Mon Apr 7 09:49:02 PDT 2025
https://github.com/luporl created https://github.com/llvm/llvm-project/pull/134686
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
>From 47ee4bda3596fe632f7f35c4c225ac8eb07c6665 Mon Sep 17 00:00:00 2001
From: Leandro Lupori <leandro.lupori at linaro.org>
Date: Mon, 7 Apr 2025 16:35:37 +0000
Subject: [PATCH] [flang][OpenMP][NFC] Don't use special chars in error
messages
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
---
flang/lib/Semantics/check-omp-structure.cpp | 8 ++++----
flang/test/Semantics/OpenMP/interop-construct.f90 | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
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
More information about the flang-commits
mailing list