@@ -3142,9 +3142,8 @@ void OmpStructureChecker::ErrorShouldBeVariable(
3142
3142
// / function references with scalar data pointer result of non-character
3143
3143
// / intrinsic type or variables that are non-polymorphic scalar pointers
3144
3144
// / 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) {
3148
3147
const DeclTypeSpec *typeSpec{sym->GetType ()};
3149
3148
if (!typeSpec) {
3150
3149
return ;
@@ -3155,20 +3154,17 @@ void OmpStructureChecker::CheckAtomicType(SymbolRef sym,
3155
3154
Category cat{typeSpec->category ()};
3156
3155
if (cat == Category::Character) {
3157
3156
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);
3160
3158
} else if (cat != Category::Numeric && cat != Category::Logical) {
3161
3159
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);
3164
3161
}
3165
3162
return ;
3166
3163
}
3167
3164
3168
3165
// Variable is a pointer.
3169
3166
if (typeSpec->IsPolymorphic ()) {
3170
- context_.Say (
3171
- source,
3167
+ context_.Say (source,
3172
3168
" Atomic variable %s cannot be a pointer to a polymorphic type" _err_en_US,
3173
3169
name);
3174
3170
return ;
@@ -3181,19 +3177,18 @@ void OmpStructureChecker::CheckAtomicType(SymbolRef sym,
3181
3177
// "entry" is a map entry
3182
3178
return entry.second .isLen () && !entry.second .isExplicit ();
3183
3179
})) {
3184
- context_.Say (
3185
- source,
3180
+ context_.Say (source,
3186
3181
" Atomic variable %s is a pointer to a type with non-constant length parameter" _err_en_US,
3187
3182
name);
3188
3183
}
3189
3184
}
3190
3185
}
3191
3186
3192
- void OmpStructureChecker::CheckAtomicVariable (const SomeExpr &atom,
3193
- parser::CharBlock source) {
3187
+ void OmpStructureChecker::CheckAtomicVariable (
3188
+ const SomeExpr &atom, parser::CharBlock source) {
3194
3189
if (atom.Rank () != 0 ) {
3195
3190
context_.Say (source, " Atomic variable %s should be a scalar" _err_en_US,
3196
- atom.AsFortran ());
3191
+ atom.AsFortran ());
3197
3192
}
3198
3193
3199
3194
std::vector<SomeExpr> dsgs{atomic::DesignatorCollector{}(atom)};
@@ -3204,7 +3199,7 @@ void OmpStructureChecker::CheckAtomicVariable(const SomeExpr &atom,
3204
3199
3205
3200
if (IsAllocatable (syms.back ()) && !IsArrayElement (atom)) {
3206
3201
context_.Say (source, " Atomic variable %s cannot be ALLOCATABLE" _err_en_US,
3207
- atom.AsFortran ());
3202
+ atom.AsFortran ());
3208
3203
}
3209
3204
}
3210
3205
0 commit comments