Skip to content

Commit ebe9848

Browse files
committed
Addressed NIT comments.
1 parent 2370fb7 commit ebe9848

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
@@ -1190,7 +1190,7 @@ TYPE_PARSER(sourced(construct<OmpSimpleStandaloneDirective>(first(
11901190
TYPE_PARSER(sourced(construct<OpenMPSimpleStandaloneConstruct>(
11911191
Parser<OmpSimpleStandaloneDirective>{}, Parser<OmpClauseList>{})))
11921192

1193-
// 14.1 Interop construct
1193+
// OMP 5.2 14.1 Interop construct
11941194
TYPE_PARSER(sourced(construct<OpenMPInteropConstruct>(
11951195
verbatim("INTEROP"_tok), sourced(Parser<OmpClauseList>{}))))
11961196

flang/lib/Parser/unparse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2167,7 +2167,7 @@ class UnparseVisitor {
21672167
void Unparse(const OmpInitClause &x) {
21682168
using Modifier = OmpInitClause::Modifier;
21692169
auto &modifiers{std::get<std::optional<std::list<Modifier>>>(x.t)};
2170-
bool isTypeStart = true;
2170+
bool isTypeStart{true};
21712171
for (const Modifier &m : *modifiers) {
21722172
if (auto *interopPreferenceMod{
21732173
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
@@ -5611,7 +5611,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
56115611
if (llvm::is_contained(objectSymbolList, objectSymbol)) {
56125612
context_.Say(
56135613
GetContext().directiveSource,
5614-
"Each interop-var may be specified for at most one action-clause of each interop construct."_err_en_US);
5614+
"Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
56155615
} else {
56165616
objectSymbolList.insert(objectSymbol);
56175617
}
@@ -5627,7 +5627,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
56275627
if (llvm::is_contained(objectSymbolList, objectSymbol)) {
56285628
context_.Say(
56295629
GetContext().directiveSource,
5630-
"Each interop-var may be specified for at most one action-clause of each interop construct."_err_en_US);
5630+
"Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
56315631
} else {
56325632
objectSymbolList.insert(objectSymbol);
56335633
}
@@ -5640,7 +5640,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
56405640
if (llvm::is_contained(objectSymbolList, objectSymbol)) {
56415641
context_.Say(
56425642
GetContext().directiveSource,
5643-
"Each interop-var may be specified for at most one action-clause of each interop construct."_err_en_US);
5643+
"Each interop-var may be specified for at most one action-clause of each INTEROP construct."_err_en_US);
56445644
} else {
56455645
objectSymbolList.insert(objectSymbol);
56465646
}
@@ -5656,7 +5656,7 @@ void OmpStructureChecker::Enter(const parser::OpenMPInteropConstruct &x) {
56565656
if (isDependClauseOccured && !targetSyncCount) {
56575657
context_.Say(
56585658
GetContext().directiveSource,
5659-
"A depend clause can only appear on the directive if the interop-type includes targetsync"_err_en_US);
5659+
"A DEPEND clause can only appear on the directive if the interop-type includes TARGETSYNC"_err_en_US);
56605660
}
56615661
}
56625662

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)