[flang-commits] [flang] [flang][OpenMP][NFC] Don't use special chars in error messages (PR #134686)
via flang-commits
flang-commits at lists.llvm.org
Mon Apr 7 09:49:37 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-semantics
Author: Leandro Lupori (luporl)
<details>
<summary>Changes</summary>
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
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
``````````
</details>
https://github.com/llvm/llvm-project/pull/134686
More information about the flang-commits
mailing list