Skip to content
Commit a0d61051 authored by Shafik Yaghmour's avatar Shafik Yaghmour
Browse files

[Clang] Fix handling of Max from getValueRange(...) in IntExprEvaluator::VisitCastExpr(...)

This is a follow-up to D130058 to fix how we handle the Max value we obtain from
getValueRange(...) in IntExprEvaluator::VisitCastExpr(...) which in the case of
an enum that contains an enumerator with the max integer value will overflow by
one.

The fix is to decrement the value of Max and use slt and ult for comparison Vs
sle and ule.`

Differential Revision: https://reviews.llvm.org/D130811
parent afb4efd3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment