[clang] [Clang] Overflow Pattern Exclusions (PR #100272)

Justin Stitt via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 14 13:53:29 PDT 2024


JustinStitt wrote:

> I think serialization is missing for the new bit on BinaryOperator. 

How do I add this?



> I'm not sure why we're storing it in the first place, though; it's queried in exactly one place, so there isn't really any benefit to precomputing it.

It's queried when we check if we can elide the overflow sanitizer check, at this point we're dealing with the BO responsible for the addition (or subtraction) and not with the BO responsible for comparison. To properly check for the entire pattern I am trying to exclude I am pretty sure I need that comparison BO; so I can either precompute comparison BOs and store a bit on its child BO or I navigate up the parent map from the child during the overflow ellision check.

Which is the better approach?

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


More information about the cfe-commits mailing list