[PATCH] D57523: Fix uninitialized value in ABIArgInfo

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 20 20:55:43 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL354546: [NFC] Always initialize all members in ABIArgInfo (authored by serge_sans_paille, committed by ).
Herald added a project: LLVM.

Changed prior to commit:
  https://reviews.llvm.org/D57523?vs=184529&id=187724#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57523/new/

https://reviews.llvm.org/D57523

Files:
  cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h


Index: cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h
===================================================================
--- cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h
+++ cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h
@@ -111,14 +111,15 @@
   }
 
   ABIArgInfo(Kind K)
-      : TheKind(K), PaddingInReg(false), InReg(false), SuppressSRet(false) {
-  }
-
-public:
-  ABIArgInfo()
-      : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0),
-        TheKind(Direct), PaddingInReg(false), InReg(false),
-        SuppressSRet(false) {}
+      : TypeData(nullptr), PaddingType(nullptr), DirectOffset(0), TheKind(K),
+        PaddingInReg(false), InAllocaSRet(false), IndirectByVal(false),
+        IndirectRealign(false), SRetAfterThis(false), InReg(false),
+        CanBeFlattened(false), SignExt(false), SuppressSRet(false) {}
+}
+
+public : ABIArgInfo()
+    : ABIArgInfo(Direct) {
+}
 
   static ABIArgInfo getDirect(llvm::Type *T = nullptr, unsigned Offset = 0,
                               llvm::Type *Padding = nullptr,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57523.187724.patch
Type: text/x-patch
Size: 1043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190221/e97fc1d8/attachment.bin>


More information about the cfe-commits mailing list