File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -470,7 +470,7 @@ static bool HaveCompatibleLengths(
470470 }
471471}
472472
473- bool IsSameAllocation (const SomeExpr *root, const SomeExpr *path) {
473+ bool AreSameAllocation (const SomeExpr *root, const SomeExpr *path) {
474474 if (root && path) {
475475 // For now we just use equality of expressions. If we implement a more
476476 // sophisticated alias analysis we should use it here.
@@ -712,11 +712,11 @@ bool AllocationCheckerHelper::RunChecks(SemanticsContext &context) {
712712 }
713713
714714 if (const SomeExpr *allocObj{GetExpr (context, allocateObject_)}) {
715- if (IsSameAllocation (allocObj, allocateInfo_.statVar )) {
715+ if (AreSameAllocation (allocObj, allocateInfo_.statVar )) {
716716 context.Say (allocateInfo_.statSource .value_or (name_.source ),
717717 " STAT variable in ALLOCATE must not be the variable being allocated" _err_en_US);
718718 }
719- if (IsSameAllocation (allocObj, allocateInfo_.msgVar )) {
719+ if (AreSameAllocation (allocObj, allocateInfo_.msgVar )) {
720720 context.Say (allocateInfo_.msgSource .value_or (name_.source ),
721721 " ERRMSG variable in ALLOCATE must not be the variable being allocated" _err_en_US);
722722 }
Original file line number Diff line number Diff line change @@ -24,6 +24,6 @@ class AllocateChecker : public virtual BaseChecker {
2424private:
2525 SemanticsContext &context_;
2626};
27- bool IsSameAllocation (const SomeExpr *root, const SomeExpr *path);
27+ bool AreSameAllocation (const SomeExpr *root, const SomeExpr *path);
2828} // namespace Fortran::semantics
2929#endif // FORTRAN_SEMANTICS_CHECK_ALLOCATE_H_
Original file line number Diff line number Diff line change @@ -135,11 +135,11 @@ void DeallocateChecker::Leave(const parser::DeallocateStmt &deallocateStmt) {
135135 },
136136 allocateObject.u );
137137 if (const SomeExpr *allocObj{GetExpr (context_, allocateObject)}) {
138- if (IsSameAllocation (allocObj, statVar)) {
138+ if (AreSameAllocation (allocObj, statVar)) {
139139 context_.Say (statSource.value_or (source),
140140 " STAT variable in DEALLOCATE must not be the variable being deallocated" _err_en_US);
141141 }
142- if (IsSameAllocation (allocObj, msgVar)) {
142+ if (AreSameAllocation (allocObj, msgVar)) {
143143 context_.Say (msgSource.value_or (source),
144144 " ERRMSG variable in DEALLOCATE must not be the variable being deallocated" _err_en_US);
145145 }
You can’t perform that action at this time.
0 commit comments