Skip to content

Commit 591e1d6

Browse files
committed
format
1 parent 1b352f6 commit 591e1d6

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

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

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3142,9 +3142,8 @@ void OmpStructureChecker::ErrorShouldBeVariable(
31423142
/// function references with scalar data pointer result of non-character
31433143
/// intrinsic type or variables that are non-polymorphic scalar pointers
31443144
/// and any length type parameter must be constant.
3145-
void OmpStructureChecker::CheckAtomicType(SymbolRef sym,
3146-
parser::CharBlock source,
3147-
std::string_view name) {
3145+
void OmpStructureChecker::CheckAtomicType(
3146+
SymbolRef sym, parser::CharBlock source, std::string_view name) {
31483147
const DeclTypeSpec *typeSpec{sym->GetType()};
31493148
if (!typeSpec) {
31503149
return;
@@ -3155,20 +3154,17 @@ void OmpStructureChecker::CheckAtomicType(SymbolRef sym,
31553154
Category cat{typeSpec->category()};
31563155
if (cat == Category::Character) {
31573156
context_.Say(source,
3158-
"Atomic variable %s cannot have CHARACTER type"_err_en_US,
3159-
name);
3157+
"Atomic variable %s cannot have CHARACTER type"_err_en_US, name);
31603158
} else if (cat != Category::Numeric && cat != Category::Logical) {
31613159
context_.Say(source,
3162-
"Atomic variable %s should have an intrinsic type"_err_en_US,
3163-
name);
3160+
"Atomic variable %s should have an intrinsic type"_err_en_US, name);
31643161
}
31653162
return;
31663163
}
31673164

31683165
// Variable is a pointer.
31693166
if (typeSpec->IsPolymorphic()) {
3170-
context_.Say(
3171-
source,
3167+
context_.Say(source,
31723168
"Atomic variable %s cannot be a pointer to a polymorphic type"_err_en_US,
31733169
name);
31743170
return;
@@ -3181,19 +3177,18 @@ void OmpStructureChecker::CheckAtomicType(SymbolRef sym,
31813177
// "entry" is a map entry
31823178
return entry.second.isLen() && !entry.second.isExplicit();
31833179
})) {
3184-
context_.Say(
3185-
source,
3180+
context_.Say(source,
31863181
"Atomic variable %s is a pointer to a type with non-constant length parameter"_err_en_US,
31873182
name);
31883183
}
31893184
}
31903185
}
31913186

3192-
void OmpStructureChecker::CheckAtomicVariable(const SomeExpr &atom,
3193-
parser::CharBlock source) {
3187+
void OmpStructureChecker::CheckAtomicVariable(
3188+
const SomeExpr &atom, parser::CharBlock source) {
31943189
if (atom.Rank() != 0) {
31953190
context_.Say(source, "Atomic variable %s should be a scalar"_err_en_US,
3196-
atom.AsFortran());
3191+
atom.AsFortran());
31973192
}
31983193

31993194
std::vector<SomeExpr> dsgs{atomic::DesignatorCollector{}(atom)};
@@ -3204,7 +3199,7 @@ void OmpStructureChecker::CheckAtomicVariable(const SomeExpr &atom,
32043199

32053200
if (IsAllocatable(syms.back()) && !IsArrayElement(atom)) {
32063201
context_.Say(source, "Atomic variable %s cannot be ALLOCATABLE"_err_en_US,
3207-
atom.AsFortran());
3202+
atom.AsFortran());
32083203
}
32093204
}
32103205

0 commit comments

Comments
 (0)