Skip to content

Commit 15ada54

Browse files
committed
formatting§
1 parent d25a6d5 commit 15ada54

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

flang/lib/Evaluate/tools.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,8 @@ bool HasConstant(const Expr<SomeType> &expr) {
12111211
}
12121212

12131213
// HasStructureComponent()
1214-
struct HasStructureComponentHelper : public AnyTraverse<HasStructureComponentHelper, bool, false> {
1214+
struct HasStructureComponentHelper
1215+
: public AnyTraverse<HasStructureComponentHelper, bool, false> {
12151216
using Base = AnyTraverse<HasStructureComponentHelper, bool, false>;
12161217
HasStructureComponentHelper() : Base(*this) {}
12171218
using Base::operator();
@@ -1222,9 +1223,7 @@ struct HasStructureComponentHelper : public AnyTraverse<HasStructureComponentHel
12221223
bool operator()(const NamedEntity &NamedEntity) const {
12231224
return NamedEntity.UnwrapComponent() != nullptr;
12241225
}
1225-
bool operator()(const Component &) const {
1226-
return true;
1227-
}
1226+
bool operator()(const Component &) const { return true; }
12281227
};
12291228

12301229
bool HasStructureComponent(const Expr<SomeType> &expr) {

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4673,13 +4673,14 @@ void OmpStructureChecker::Enter(const parser::OmpClause::Copyin &x) {
46734673
void OmpStructureChecker::CheckStructureComponent(
46744674
const parser::OmpObjectList &objects, llvm::omp::Clause clauseId) {
46754675
auto CheckComponent{[&](const parser::Designator &designator) {
4676-
if (const parser::DataRef *dataRef{std::get_if<parser::DataRef>(&designator.u)}) {
4676+
if (const parser::DataRef *dataRef{
4677+
std::get_if<parser::DataRef>(&designator.u)}) {
46774678
if (!IsDataRefTypeParamInquiry(dataRef)) {
46784679
const auto expr = AnalyzeExpr(context_, designator);
46794680
if (expr.has_value() && evaluate::HasStructureComponent(expr.value())) {
46804681
context_.Say(designator.source,
4681-
"A variable that is part of another variable cannot appear on the %s clause"_err_en_US,
4682-
parser::ToUpperCaseLetters(getClauseName(clauseId).str()));
4682+
"A variable that is part of another variable cannot appear on the %s clause"_err_en_US,
4683+
parser::ToUpperCaseLetters(getClauseName(clauseId).str()));
46834684
}
46844685
}
46854686
}

0 commit comments

Comments
 (0)