Skip to content

Commit 48e2b18

Browse files
kparzyszLukacma
authored andcommitted
[flang][OpenMP] Remember to set source in OmpBlockConstruct (llvm#164131)
Add "sourced" in a few places where OmpBlockConstruct was created.
1 parent 5f03957 commit 48e2b18

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,8 +1835,8 @@ TYPE_PARSER(sourced(construct<OpenMPDeclareMapperConstruct>(
18351835
TYPE_PARSER(construct<OmpReductionCombiner>(Parser<AssignmentStmt>{}) ||
18361836
construct<OmpReductionCombiner>(Parser<FunctionReference>{}))
18371837

1838-
TYPE_PARSER(construct<OpenMPCriticalConstruct>(
1839-
OmpBlockConstructParser{llvm::omp::Directive::OMPD_critical}))
1838+
TYPE_PARSER(sourced(construct<OpenMPCriticalConstruct>(
1839+
OmpBlockConstructParser{llvm::omp::Directive::OMPD_critical})))
18401840

18411841
// 2.11.3 Executable Allocate directive
18421842
TYPE_PARSER(
@@ -1911,12 +1911,12 @@ TYPE_PARSER(
19111911
Parser<OmpMetadirectiveDirective>{})) /
19121912
endOmpLine))
19131913

1914-
TYPE_PARSER(construct<OpenMPAssumeConstruct>(
1915-
sourced(OmpBlockConstructParser{llvm::omp::Directive::OMPD_assume})))
1914+
TYPE_PARSER(sourced(construct<OpenMPAssumeConstruct>(
1915+
OmpBlockConstructParser{llvm::omp::Directive::OMPD_assume})))
19161916

19171917
// Block Construct
19181918
#define MakeBlockConstruct(dir) \
1919-
construct<OmpBlockConstruct>(OmpBlockConstructParser{dir})
1919+
sourced(construct<OmpBlockConstruct>(OmpBlockConstructParser{dir}))
19201920
TYPE_PARSER( //
19211921
MakeBlockConstruct(llvm::omp::Directive::OMPD_masked) ||
19221922
MakeBlockConstruct(llvm::omp::Directive::OMPD_master) ||

0 commit comments

Comments
 (0)