[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

Yingwei Zheng via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 21 03:16:41 PDT 2025


================
@@ -42,6 +42,11 @@ Potentially Breaking Changes
 C/C++ Language Potentially Breaking Changes
 -------------------------------------------
 
+- Some old-style offsetof idioms like ``((int)(&(((struct S *)0)->field)))`` are treated
----------------
dtcxzyw wrote:

I think it is just a hint for downstream users. They will check this section when they encounter a regression caused by https://github.com/llvm/llvm-project/pull/130742.


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


More information about the cfe-commits mailing list