Skip to content

Commit 71ae021

Browse files
committed
[flang] Few minor formatting changes, NFC
This makes these files be invariant with respect to clang-format.
1 parent 929cbe7 commit 71ae021

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,8 +1783,8 @@ struct PartRef {
17831783
BOILERPLATE(PartRef);
17841784
PartRef(Name &&n, std::list<SectionSubscript> &&ss,
17851785
std::optional<ImageSelector> &&is)
1786-
: name{std::move(n)},
1787-
subscripts(std::move(ss)), imageSelector{std::move(is)} {}
1786+
: name{std::move(n)}, subscripts(std::move(ss)),
1787+
imageSelector{std::move(is)} {}
17881788
Name name;
17891789
std::list<SectionSubscript> subscripts;
17901790
std::optional<ImageSelector> imageSelector;

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,11 @@ TYPE_PARSER(construct<OmpUpdateClause>(
482482

483483
// 2.9.5 ORDER ([order-modifier :]concurrent)
484484
TYPE_PARSER(construct<OmpOrderModifier>(
485-
"REPRODUCIBLE" >> pure(OmpOrderModifier::Kind::Reproducible)) ||
485+
"REPRODUCIBLE" >> pure(OmpOrderModifier::Kind::Reproducible)) ||
486486
construct<OmpOrderModifier>(
487-
"UNCONSTRAINED" >> pure(OmpOrderModifier::Kind::Unconstrained)))
487+
"UNCONSTRAINED" >> pure(OmpOrderModifier::Kind::Unconstrained)))
488488

489-
TYPE_PARSER(construct<OmpOrderClause>(
490-
maybe(Parser<OmpOrderModifier>{} / ":"),
489+
TYPE_PARSER(construct<OmpOrderClause>(maybe(Parser<OmpOrderModifier>{} / ":"),
491490
"CONCURRENT" >> pure(OmpOrderClause::Type::Concurrent)))
492491

493492
// OMP 5.2 12.6.1 grainsize([ prescriptiveness :] scalar-integer-expression)

flang/lib/Semantics/check-omp-structure.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ void OmpStructureChecker::HasInvalidDistributeNesting(
405405
} else {
406406
// `distribute` region has to be strictly nested inside `teams`
407407
if (!OmpDirectiveSet{llvm::omp::OMPD_teams, llvm::omp::OMPD_target_teams}
408-
.test(GetContextParent().directive)) {
408+
.test(GetContextParent().directive)) {
409409
violation = true;
410410
}
411411
}
@@ -517,8 +517,7 @@ void OmpStructureChecker::CheckHintClause(
517517
const Fortran::parser::OmpClauseList>) {
518518
ompClause = &clause;
519519
}
520-
if (const Fortran::parser::OmpClause::Hint *
521-
hintClause{
520+
if (const Fortran::parser::OmpClause::Hint *hintClause{
522521
std::get_if<Fortran::parser::OmpClause::Hint>(&ompClause->u)}) {
523522
std::optional<std::int64_t> hintValue = GetIntValue(hintClause->v);
524523
if (hintValue && *hintValue >= 0) {
@@ -2643,7 +2642,7 @@ void OmpStructureChecker::Enter(const parser::OmpClause &x) {
26432642
break;
26442643
}
26452644

2646-
if (const parser::OmpObjectList * objList{GetOmpObjectList(x)}) {
2645+
if (const parser::OmpObjectList *objList{GetOmpObjectList(x)}) {
26472646
SymbolSourceMap symbols;
26482647
GetSymbolsInObjectList(*objList, symbols);
26492648
for (const auto &[sym, source] : symbols) {
@@ -3228,7 +3227,7 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Firstprivate &x) {
32283227
void OmpStructureChecker::CheckIsLoopIvPartOfClause(
32293228
llvmOmpClause clause, const parser::OmpObjectList &ompObjectList) {
32303229
for (const auto &ompObject : ompObjectList.v) {
3231-
if (const parser::Name * name{parser::Unwrap<parser::Name>(ompObject)}) {
3230+
if (const parser::Name *name{parser::Unwrap<parser::Name>(ompObject)}) {
32323231
if (name->symbol == GetContext().loopIV) {
32333232
context_.Say(name->source,
32343233
"DO iteration variable %s is not allowed in %s clause."_err_en_US,
@@ -4189,7 +4188,7 @@ void OmpStructureChecker::CheckPrivateSymbolsInOuterCxt(
41894188
auto enclosingClauseSet{dirIter->second.second};
41904189
if (auto *enclosingContext{GetEnclosingContextWithDir(enclosingDir)}) {
41914190
for (auto it{enclosingContext->clauseInfo.begin()};
4192-
it != enclosingContext->clauseInfo.end(); ++it) {
4191+
it != enclosingContext->clauseInfo.end(); ++it) {
41934192
if (enclosingClauseSet.test(it->first)) {
41944193
if (const auto *ompObjectList{GetOmpObjectList(*it->second)}) {
41954194
GetSymbolsInObjectList(*ompObjectList, enclosingSymbols);

0 commit comments

Comments
 (0)