CrashRecoveryContextCleanup - fix uninitialized variable warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 8 Nov 2019 16:19:21 +0000 (16:19 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 8 Nov 2019 16:26:20 +0000 (16:26 +0000)
Remove default values from constructor.

llvm/include/llvm/Support/CrashRecoveryContext.h

index feb449e..96e5c5c 100644 (file)
@@ -111,12 +111,12 @@ public:
 /// a crash recovery context.
 class CrashRecoveryContextCleanup {
 protected:
-  CrashRecoveryContext *context;
+  CrashRecoveryContext *context = nullptr;
   CrashRecoveryContextCleanup(CrashRecoveryContext *context)
-      : context(context), cleanupFired(false) {}
+      : context(context) {}
 
 public:
-  bool cleanupFired;
+  bool cleanupFired = false;
 
   virtual ~CrashRecoveryContextCleanup();
   virtual void recoverResources() = 0;
@@ -127,7 +127,7 @@ public:
 
 private:
   friend class CrashRecoveryContext;
-  CrashRecoveryContextCleanup *prev, *next;
+  CrashRecoveryContextCleanup *prev = nullptr, *next = nullptr;
 };
 
 /// Base class of cleanup handler that controls recovery of resources of the