[clang] 1b731bd - [clang][Interp][NFC] Zero-initialize Function::FrameSize

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 14 04:39:27 PDT 2022


Author: Timm Bäder
Date: 2022-10-14T13:32:55+02:00
New Revision: 1b731bd8724c2f56550f87d3c4f0fa820b8b4527

URL: https://github.com/llvm/llvm-project/commit/1b731bd8724c2f56550f87d3c4f0fa820b8b4527
DIFF: https://github.com/llvm/llvm-project/commit/1b731bd8724c2f56550f87d3c4f0fa820b8b4527.diff

LOG: [clang][Interp][NFC] Zero-initialize Function::FrameSize

It's never going to be used since it's only uninitialized if the
function is invalid, but let's zero it for readbility of
Function::dump().

Added: 
    

Modified: 
    clang/lib/AST/Interp/Function.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/AST/Interp/Function.h b/clang/lib/AST/Interp/Function.h
index bb99ea72a442..67a4e27b3753 100644
--- a/clang/lib/AST/Interp/Function.h
+++ b/clang/lib/AST/Interp/Function.h
@@ -167,7 +167,7 @@ class Function final {
   /// Declaration this function was compiled from.
   const FunctionDecl *F;
   /// Local area size: storage + metadata.
-  unsigned FrameSize;
+  unsigned FrameSize = 0;
   /// Size of the argument stack.
   unsigned ArgSize;
   /// Program code.


        


More information about the cfe-commits mailing list