Skip to content

Commit 909b251

Browse files
authored
Merge branch 'users/kparzysz/spr/m02-context-parse' into users/kparzysz/spr/m03-meta-simple
2 parents fe3ec47 + c44051d commit 909b251

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

flang/include/flang/Parser/parse-tree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3520,7 +3520,7 @@ struct OmpTraitScore {
35203520
struct OmpTraitPropertyExtension {
35213521
CharBlock source;
35223522
UNION_CLASS_BOILERPLATE(OmpTraitPropertyExtension);
3523-
struct Complex { // name (prop-ext, prop-ext, ...)
3523+
struct Complex { // name (prop-ext, prop-ext, ...)
35243524
CharBlock source;
35253525
TUPLE_CLASS_BOILERPLATE(Complex);
35263526
std::tuple<OmpTraitPropertyName,

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,15 @@ struct TraitSelectorParser {
239239
auto extParser{Parser<OmpTraitPropertyExtension>{}};
240240

241241
if (auto *v{std::get_if<OmpTraitSelectorName::Value>(&name->u)}) {
242+
// (*) The comments below show the sections of the OpenMP spec that
243+
// describe given trait. The cases marked with a (*) are those where
244+
// the spec doesn't assign any list-type to these traits, but for
245+
// convenience they can be treated as if they were.
242246
switch (*v) {
243247
// name-list properties
244248
case OmpTraitSelectorName::Value::Arch: // [6.0:319:18]
245249
case OmpTraitSelectorName::Value::Extension: // [6.0:319:30]
246-
case OmpTraitSelectorName::Value::Isa: // [6.0:319:15]
250+
case OmpTraitSelectorName::Value::Isa: // [6.0:319:15]
247251
case OmpTraitSelectorName::Value::Kind: // [6.0:319:10]
248252
case OmpTraitSelectorName::Value::Uid: // [6.0:319:23](*)
249253
case OmpTraitSelectorName::Value::Vendor: { // [6.0:319:27]
@@ -264,8 +268,6 @@ struct TraitSelectorParser {
264268
auto pp{propertyListParser(scalarExpr, extParser)};
265269
return OmpTraitSelector(std::move(*name), std::move(*pp.Parse(state)));
266270
}
267-
// (*) The spec doesn't assign any list-type to these traits, but for
268-
// convenience they can be treated as if they were.
269271
} // switch
270272
} else {
271273
// The other alternatives are `llvm::omp::Directive`, and `std::string`.

0 commit comments

Comments
 (0)