[flang-commits] [flang] 71ae021 - [flang] Few minor formatting changes, NFC
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Wed Nov 13 11:02:25 PST 2024
Author: Krzysztof Parzyszek
Date: 2024-11-13T13:02:07-06:00
New Revision: 71ae021359b6f0fbf241021d2246e7acb66f4837
URL: https://github.com/llvm/llvm-project/commit/71ae021359b6f0fbf241021d2246e7acb66f4837
DIFF: https://github.com/llvm/llvm-project/commit/71ae021359b6f0fbf241021d2246e7acb66f4837.diff
LOG: [flang] Few minor formatting changes, NFC
This makes these files be invariant with respect to clang-format.
Added:
Modified:
flang/include/flang/Parser/parse-tree.h
flang/lib/Parser/openmp-parsers.cpp
flang/lib/Semantics/check-omp-structure.cpp
Removed:
################################################################################
diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index ce0b6167de9fc8..c5963e92065148 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -1783,8 +1783,8 @@ struct PartRef {
BOILERPLATE(PartRef);
PartRef(Name &&n, std::list<SectionSubscript> &&ss,
std::optional<ImageSelector> &&is)
- : name{std::move(n)},
- subscripts(std::move(ss)), imageSelector{std::move(is)} {}
+ : name{std::move(n)}, subscripts(std::move(ss)),
+ imageSelector{std::move(is)} {}
Name name;
std::list<SectionSubscript> subscripts;
std::optional<ImageSelector> imageSelector;
diff --git a/flang/lib/Parser/openmp-parsers.cpp b/flang/lib/Parser/openmp-parsers.cpp
index a46b06dce001f9..ee6f8feb6657a1 100644
--- a/flang/lib/Parser/openmp-parsers.cpp
+++ b/flang/lib/Parser/openmp-parsers.cpp
@@ -482,12 +482,11 @@ TYPE_PARSER(construct<OmpUpdateClause>(
// 2.9.5 ORDER ([order-modifier :]concurrent)
TYPE_PARSER(construct<OmpOrderModifier>(
- "REPRODUCIBLE" >> pure(OmpOrderModifier::Kind::Reproducible)) ||
+ "REPRODUCIBLE" >> pure(OmpOrderModifier::Kind::Reproducible)) ||
construct<OmpOrderModifier>(
- "UNCONSTRAINED" >> pure(OmpOrderModifier::Kind::Unconstrained)))
+ "UNCONSTRAINED" >> pure(OmpOrderModifier::Kind::Unconstrained)))
-TYPE_PARSER(construct<OmpOrderClause>(
- maybe(Parser<OmpOrderModifier>{} / ":"),
+TYPE_PARSER(construct<OmpOrderClause>(maybe(Parser<OmpOrderModifier>{} / ":"),
"CONCURRENT" >> pure(OmpOrderClause::Type::Concurrent)))
// OMP 5.2 12.6.1 grainsize([ prescriptiveness :] scalar-integer-expression)
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index db7c15a0e0ec9c..5fe72e6fd4fd25 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -405,7 +405,7 @@ void OmpStructureChecker::HasInvalidDistributeNesting(
} else {
// `distribute` region has to be strictly nested inside `teams`
if (!OmpDirectiveSet{llvm::omp::OMPD_teams, llvm::omp::OMPD_target_teams}
- .test(GetContextParent().directive)) {
+ .test(GetContextParent().directive)) {
violation = true;
}
}
@@ -517,8 +517,7 @@ void OmpStructureChecker::CheckHintClause(
const Fortran::parser::OmpClauseList>) {
ompClause = &clause;
}
- if (const Fortran::parser::OmpClause::Hint *
- hintClause{
+ if (const Fortran::parser::OmpClause::Hint *hintClause{
std::get_if<Fortran::parser::OmpClause::Hint>(&ompClause->u)}) {
std::optional<std::int64_t> hintValue = GetIntValue(hintClause->v);
if (hintValue && *hintValue >= 0) {
@@ -2643,7 +2642,7 @@ void OmpStructureChecker::Enter(const parser::OmpClause &x) {
break;
}
- if (const parser::OmpObjectList * objList{GetOmpObjectList(x)}) {
+ if (const parser::OmpObjectList *objList{GetOmpObjectList(x)}) {
SymbolSourceMap symbols;
GetSymbolsInObjectList(*objList, symbols);
for (const auto &[sym, source] : symbols) {
@@ -3228,7 +3227,7 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Firstprivate &x) {
void OmpStructureChecker::CheckIsLoopIvPartOfClause(
llvmOmpClause clause, const parser::OmpObjectList &ompObjectList) {
for (const auto &ompObject : ompObjectList.v) {
- if (const parser::Name * name{parser::Unwrap<parser::Name>(ompObject)}) {
+ if (const parser::Name *name{parser::Unwrap<parser::Name>(ompObject)}) {
if (name->symbol == GetContext().loopIV) {
context_.Say(name->source,
"DO iteration variable %s is not allowed in %s clause."_err_en_US,
@@ -4189,7 +4188,7 @@ void OmpStructureChecker::CheckPrivateSymbolsInOuterCxt(
auto enclosingClauseSet{dirIter->second.second};
if (auto *enclosingContext{GetEnclosingContextWithDir(enclosingDir)}) {
for (auto it{enclosingContext->clauseInfo.begin()};
- it != enclosingContext->clauseInfo.end(); ++it) {
+ it != enclosingContext->clauseInfo.end(); ++it) {
if (enclosingClauseSet.test(it->first)) {
if (const auto *ompObjectList{GetOmpObjectList(*it->second)}) {
GetSymbolsInObjectList(*ompObjectList, enclosingSymbols);
More information about the flang-commits
mailing list