[all-commits] [llvm/llvm-project] 04c389: [Clang][CodeGen] Do not set inbounds flag in `Emit...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Thu Apr 10 19:51:29 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 04c38981a9ce3e6225669c0e41cab947e3e7989f
https://github.com/llvm/llvm-project/commit/04c38981a9ce3e6225669c0e41cab947e3e7989f
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2025-04-11 (Fri, 11 Apr 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/CodeGen/CGCXXABI.cpp
M clang/lib/CodeGen/CGCXXABI.h
M clang/lib/CodeGen/CGClass.cpp
M clang/lib/CodeGen/CGExpr.cpp
M clang/lib/CodeGen/CodeGenFunction.h
M clang/lib/CodeGen/ItaniumCXXABI.cpp
M clang/lib/CodeGen/MicrosoftCXXABI.cpp
M clang/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
M clang/test/CodeGenCXX/pointers-to-data-members.cpp
Log Message:
-----------
[Clang][CodeGen] Do not set inbounds flag in `EmitMemberDataPointerAddress` when the base pointer is null (#130952)
See also https://github.com/llvm/llvm-project/pull/130734 for the
original motivation.
This pattern (`container_of`) is also widely used by real-world
programs.
Examples:
https://github.com/llvm/llvm-project/blob/1d89d7d5d76e391b035f50343e2a4890506c6f2b/llvm/include/llvm/IR/SymbolTableListTraits.h#L77-L87
https://github.com/nodejs/node/blob/a2a53cb728ec5f776ac16879ce0f480a8e838320/src/util-inl.h#L134-L137
https://github.com/search?q=*%29nullptr-%3E*&type=code
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list