Skip to content

Commit c44051d

Browse files
committed
format/comment
1 parent 3bfe74e commit c44051d

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
@@ -3512,7 +3512,7 @@ struct OmpTraitScore {
35123512
struct OmpTraitPropertyExtension {
35133513
CharBlock source;
35143514
UNION_CLASS_BOILERPLATE(OmpTraitPropertyExtension);
3515-
struct Complex { // name (prop-ext, prop-ext, ...)
3515+
struct Complex { // name (prop-ext, prop-ext, ...)
35163516
CharBlock source;
35173517
TUPLE_CLASS_BOILERPLATE(Complex);
35183518
std::tuple<OmpTraitPropertyName,

flang/lib/Parser/openmp-parsers.cpp

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

238238
if (auto *v{std::get_if<OmpTraitSelectorName::Value>(&name->u)}) {
239+
// (*) The comments below show the sections of the OpenMP spec that
240+
// describe given trait. The cases marked with a (*) are those where
241+
// the spec doesn't assign any list-type to these traits, but for
242+
// convenience they can be treated as if they were.
239243
switch (*v) {
240244
// name-list properties
241245
case OmpTraitSelectorName::Value::Arch: // [6.0:319:18]
242246
case OmpTraitSelectorName::Value::Extension: // [6.0:319:30]
243-
case OmpTraitSelectorName::Value::Isa: // [6.0:319:15]
247+
case OmpTraitSelectorName::Value::Isa: // [6.0:319:15]
244248
case OmpTraitSelectorName::Value::Kind: // [6.0:319:10]
245249
case OmpTraitSelectorName::Value::Uid: // [6.0:319:23](*)
246250
case OmpTraitSelectorName::Value::Vendor: { // [6.0:319:27]
@@ -261,8 +265,6 @@ struct TraitSelectorParser {
261265
auto pp{propertyListParser(scalarExpr, extParser)};
262266
return OmpTraitSelector(std::move(*name), std::move(*pp.Parse(state)));
263267
}
264-
// (*) The spec doesn't assign any list-type to these traits, but for
265-
// convenience they can be treated as if they were.
266268
} // switch
267269
} else {
268270
// The other alternatives are `llvm::omp::Directive`, and `std::string`.

0 commit comments

Comments
 (0)