[clang] [Clang][CodeGen] Respect -fwrapv-pointer when emitting struct GEPs (PR #134269)

Yingwei Zheng via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 4 05:29:55 PDT 2025


dtcxzyw wrote:

> Usually we'd want to also insert `-fsanitize=pointer-overflow` instrumentation in places where we respect `-fwrapv-pointer`. I'm not entirely sure whether we want to do this here, as it will probably blow up the amount of inserted instrumentation for little benefit...

A struct GEP is unlikely to overflow. But a null check should be useful.


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


More information about the cfe-commits mailing list