File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -302,22 +302,26 @@ struct ContiguousHelper {
302
302
};
303
303
} // namespace
304
304
305
+ // Return values:
306
+ // - std::optional<bool>{true} if the object is known to be contiguous
307
+ // - std::optional<bool>{false} if the object is known not to be contiguous
308
+ // - std::nullopt if the object contiguity cannot be determined
305
309
std::optional<bool > OmpStructureChecker::IsContiguous (
306
310
const parser::OmpObject &object) {
307
- return common::visit (common::visitors{
308
- [&]( const parser::Name &x) {
309
- // Any member of a common block must be contiguous.
310
- return std::optional< bool >{ true };
311
- },
312
- [&]( const parser::Designator &x) {
313
- evaluate::ExpressionAnalyzer ea{context_};
314
- if (MaybeExpr maybeExpr{ea. Analyze (x)}) {
315
- return ContiguousHelper{context_}. Visit (
316
- *maybeExpr);
317
- }
318
- return std::optional<bool >{};
319
- },
320
- },
311
+ return common::visit ( //
312
+ common::visitors {
313
+ [&]( const parser::Name &x) {
314
+ // Any member of a common block must be contiguous.
315
+ return std::optional< bool >{ true };
316
+ },
317
+ [&]( const parser::Designator &x) {
318
+ evaluate::ExpressionAnalyzer ea{context_};
319
+ if (MaybeExpr maybeExpr{ea. Analyze (x)}) {
320
+ return ContiguousHelper{context_}. Visit ( *maybeExpr);
321
+ }
322
+ return std::optional<bool >{};
323
+ },
324
+ },
321
325
object.u );
322
326
}
323
327
You can’t perform that action at this time.
0 commit comments