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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flang/lib/Semantics/check-omp-structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions flang/test/Semantics/OpenMP/interop-construct.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
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

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
Expand Down