[libcxx-commits] [libc] [llvm] [compiler-rt] [libcxx] [flang] [clang] [Clang] Use correct base expression for counted_by field (#73168) (PR #73465)
    Aaron Ballman via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Mon Nov 27 06:46:58 PST 2023
    
    
  
================
@@ -916,7 +916,7 @@ CodeGenFunction::emitFlexibleArrayMemberSize(const Expr *E, unsigned Type,
 
   // Build a load of the counted_by field.
   bool IsSigned = CountedByFD->getType()->isSignedIntegerType();
-  const Expr *CountedByExpr = BuildCountedByFieldExpr(Base, CountedByFD);
+  Expr *CountedByExpr = BuildCountedByFieldExpr(Base, CountedByFD);
----------------
AaronBallman wrote:
Why did we need to drop the `const` here?
https://github.com/llvm/llvm-project/pull/73465
    
    
More information about the libcxx-commits
mailing list