Skip to content

Commit 24d507f

Browse files
committed
CrashRecoveryContextCleanup - fix uninitialized variable warnings. NFCI.
Remove default values from constructor.
1 parent 2073dd2 commit 24d507f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/include/llvm/Support/CrashRecoveryContext.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ class CrashRecoveryContext {
111111
/// a crash recovery context.
112112
class CrashRecoveryContextCleanup {
113113
protected:
114-
CrashRecoveryContext *context;
114+
CrashRecoveryContext *context = nullptr;
115115
CrashRecoveryContextCleanup(CrashRecoveryContext *context)
116-
: context(context), cleanupFired(false) {}
116+
: context(context) {}
117117

118118
public:
119-
bool cleanupFired;
119+
bool cleanupFired = false;
120120

121121
virtual ~CrashRecoveryContextCleanup();
122122
virtual void recoverResources() = 0;
@@ -127,7 +127,7 @@ class CrashRecoveryContextCleanup {
127127

128128
private:
129129
friend class CrashRecoveryContext;
130-
CrashRecoveryContextCleanup *prev, *next;
130+
CrashRecoveryContextCleanup *prev = nullptr, *next = nullptr;
131131
};
132132

133133
/// Base class of cleanup handler that controls recovery of resources of the

0 commit comments

Comments
 (0)