[flang] Rework line of code to dodge clang 16 warning

Recode a non-short-circuiting conjunction of two Boolean function calls
into separate statements to avoid a warning from clang 16.
This commit is contained in:
Peter Klausler
2022-10-31 14:17:02 -07:00
parent 179978d7b8
commit ad8f22c3fd

View File

@@ -429,7 +429,9 @@ bool CheckPointerAssignment(evaluate::FoldingContext &context,
}
PointerAssignmentChecker checker{context, scope, *pointer};
checker.set_isBoundsRemapping(isBoundsRemapping);
return checker.CheckLeftHandSide(lhs) & checker.Check(rhs);
bool lhsOk{checker.CheckLeftHandSide(lhs)};
bool rhsOk{checker.Check(rhs)};
return lhsOk && rhsOk; // don't short-circuit
}
bool CheckStructConstructorPointerComponent(evaluate::FoldingContext &context,