Skip to content

Commit e14498b

Browse files
committed
Addressed NIT comments.
1 parent 830dff8 commit e14498b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ TYPE_PARSER(sourced(construct<OmpSimpleStandaloneDirective>(first(
12371237
TYPE_PARSER(sourced(construct<OpenMPSimpleStandaloneConstruct>(
12381238
Parser<OmpSimpleStandaloneDirective>{}, Parser<OmpClauseList>{})))
12391239

1240-
// 14.1 Interop construct
1240+
// OMP 5.2 14.1 Interop construct
12411241
TYPE_PARSER(sourced(construct<OpenMPInteropConstruct>(
12421242
verbatim("INTEROP"_tok), sourced(Parser<OmpClauseList>{}))))
12431243

flang/lib/Parser/unparse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,7 @@ class UnparseVisitor {
21832183
void Unparse(const OmpInitClause &x) {
21842184
using Modifier = OmpInitClause::Modifier;
21852185
auto &modifiers{std::get<std::optional<std::list<Modifier>>>(x.t)};
2186-
bool isTypeStart = true;
2186+
bool isTypeStart{true};
21872187
for (const Modifier &m : *modifiers) {
21882188
if (auto *interopPreferenceMod{
21892189
std::get_if<parser::OmpInteropPreference>(&m.u)}) {

flang/lib/Semantics/check-omp-structure.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5671,7 +5671,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
56715671
if (llvm::is_contained(objectSymbolList, objectSymbol)) {
56725672
context_.Say(
56735673
GetContext().directiveSource,
5674-
"Each interop-var may be specified for at most one action-clause of each interop construct."_err_en_US);
5674+
"Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
56755675
} else {
56765676
objectSymbolList.insert(objectSymbol);
56775677
}
@@ -5687,7 +5687,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
56875687
if (llvm::is_contained(objectSymbolList, objectSymbol)) {
56885688
context_.Say(
56895689
GetContext().directiveSource,
5690-
"Each interop-var may be specified for at most one action-clause of each interop construct."_err_en_US);
5690+
"Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
56915691
} else {
56925692
objectSymbolList.insert(objectSymbol);
56935693
}
@@ -5700,7 +5700,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
57005700
if (llvm::is_contained(objectSymbolList, objectSymbol)) {
57015701
context_.Say(
57025702
GetContext().directiveSource,
5703-
"Each interop-var may be specified for at most one action-clause of each interop construct."_err_en_US);
5703+
"Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
57045704
} else {
57055705
objectSymbolList.insert(objectSymbol);
57065706
}
@@ -5716,7 +5716,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
57165716
if (isDependClauseOccured && !targetSyncCount) {
57175717
context_.Say(
57185718
GetContext().directiveSource,
5719-
"A depend clause can only appear on the directive if the interop-type includes targetsync"_err_en_US);
5719+
"A DEPEND clause can only appear on the directive if the interop-type includes TARGETSYNC"_err_en_US);
57205720
}
57215721
}
57225722

flang/test/Semantics/OpenMP/interop-construct.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
SUBROUTINE test_interop_01()
99
USE omp_lib
1010
INTEGER(OMP_INTEROP_KIND) :: obj
11-
!ERROR: Each interop-var may be specified for at most one action-clause of each interop construct.
11+
!ERROR: Each interop-var may be specified for at most one action-clause of each INTEROP construct.
1212
!$OMP INTEROP INIT(TARGETSYNC,TARGET: obj) USE(obj)
1313
PRINT *, 'pass'
1414
END SUBROUTINE test_interop_01
@@ -24,7 +24,7 @@ END SUBROUTINE test_interop_02
2424
SUBROUTINE test_interop_03()
2525
USE omp_lib
2626
INTEGER(OMP_INTEROP_KIND) :: obj
27-
!ERROR: A depend clause can only appear on the directive if the interop-type includes targetsync
27+
!ERROR: A DEPEND clause can only appear on the directive if the interop-type includes TARGETSYNC
2828
!$OMP INTEROP INIT(TARGET: obj) DEPEND(INOUT: obj)
2929
PRINT *, 'pass'
3030
END SUBROUTINE test_interop_03

0 commit comments

Comments
 (0)