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

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 20 03:15:10 PDT 2025


================
@@ -215,6 +221,8 @@ class CGBuilderTy : public CGBuilderBaseTy {
   ///
   /// This API assumes that drilling into a struct like this is always an
   /// inbounds and nuw operation.
+  /// Specifically, inbounds flag will not be set if \p IsBaseConstantNull is
+  /// true.
----------------
nikic wrote:

Outdated comment.

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


More information about the cfe-commits mailing list