[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 13 22:41:01 PDT 2024


https://github.com/Sirraide approved this pull request.

LGTM after addressing one issue.

Looking at the rest of the constant evaluator (and the comments on the issue as well), everything else seems to use `EvaluateInteger`, which makes sure the result of the evaluation is an integer, so this seems like it is the only place where we can wind up with an `AddrLabelDiff`, so rejecting it here makes sense.

https://github.com/llvm/llvm-project/pull/95479


More information about the cfe-commits mailing list