[flang-commits] [flang] [flang][OpenMP] Make parsing of trait properties more context-sensitive (PR #122900)
via flang-commits
flang-commits at lists.llvm.org
Tue Jan 14 05:32:30 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 0fe8469e08cfe5bbd4cd7ee42a8b931560ca041c 3bfe74e70673bb74cfed0a86ce66c8c37095352b --extensions h,cpp -- flang/include/flang/Parser/dump-parse-tree.h flang/include/flang/Parser/parse-tree.h flang/lib/Parser/openmp-parsers.cpp flang/lib/Parser/unparse.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index f8175ea1de..88ce141d17 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -3512,7 +3512,7 @@ struct OmpTraitScore {
struct OmpTraitPropertyExtension {
CharBlock source;
UNION_CLASS_BOILERPLATE(OmpTraitPropertyExtension);
- struct Complex { // name (prop-ext, prop-ext, ...)
+ struct Complex { // name (prop-ext, prop-ext, ...)
CharBlock source;
TUPLE_CLASS_BOILERPLATE(Complex);
std::tuple<OmpTraitPropertyName,
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index a7b3986845..4e93d3c726 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -240,7 +240,7 @@ struct TraitSelectorParser {
// name-list properties
case OmpTraitSelectorName::Value::Arch: // [6.0:319:18]
case OmpTraitSelectorName::Value::Extension: // [6.0:319:30]
- case OmpTraitSelectorName::Value::Isa: // [6.0:319:15]
+ case OmpTraitSelectorName::Value::Isa: // [6.0:319:15]
case OmpTraitSelectorName::Value::Kind: // [6.0:319:10]
case OmpTraitSelectorName::Value::Uid: // [6.0:319:23](*)
case OmpTraitSelectorName::Value::Vendor: { // [6.0:319:27]
@@ -261,8 +261,8 @@ struct TraitSelectorParser {
auto pp{propertyListParser(scalarExpr, extParser)};
return OmpTraitSelector(std::move(*name), std::move(*pp.Parse(state)));
}
- // (*) The spec doesn't assign any list-type to these traits, but for
- // convenience they can be treated as if they were.
+ // (*) The spec doesn't assign any list-type to these traits, but for
+ // convenience they can be treated as if they were.
} // switch
} else {
// The other alternatives are `llvm::omp::Directive`, and `std::string`.
``````````
</details>
https://github.com/llvm/llvm-project/pull/122900
More information about the flang-commits
mailing list