use of org.checkerframework.dataflow.cfg.node.CaseNode in project checker-framework by typetools.
the class UpperBoundTransfer method visitCase.
@Override
public TransferResult<CFValue, CFStore> visitCase(CaseNode n, TransferInput<CFValue, CFStore> in) {
TransferResult<CFValue, CFStore> result = super.visitCase(n, in);
// Refines subtrahend in the switch expression
// TODO: this cannot be done in strengthenAnnotationOfEqualTo, because that does not provide transfer input
Node caseNode = n.getCaseOperand();
AssignmentNode assign = (AssignmentNode) n.getSwitchOperand();
Node switchNode = assign.getExpression();
refineSubtrahendWithOffset(switchNode, caseNode, false, in, result.getThenStore());
return result;
}
Aggregations