Skip to content

Commit d6ca30b

Browse files
committed
Try clause first when parsing trait
1 parent c4b9007 commit d6ca30b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ TYPE_PARSER(sourced(construct<OmpTraitPropertyExtension>( //
176176
Parser<OmpTraitPropertyExtension::ExtensionValue>{}, ","_tok)))))
177177

178178
TYPE_PARSER(sourced(construct<OmpTraitProperty>(
179-
// Try extension first, before OmpTraitPropertyName.
179+
// Try clause first, then extension before OmpTraitPropertyName.
180+
construct<OmpTraitProperty>(indirect(Parser<OmpClause>{})) ||
180181
construct<OmpTraitProperty>(Parser<OmpTraitPropertyExtension>{}) ||
181182
construct<OmpTraitProperty>(Parser<OmpTraitPropertyName>{}) ||
182-
construct<OmpTraitProperty>(indirect(Parser<OmpClause>{})) ||
183183
construct<OmpTraitProperty>(scalarExpr))))
184184

185185
TYPE_PARSER(construct<OmpTraitSelectorName::Value>(

0 commit comments

Comments
 (0)