[llvm] 24d507f - CrashRecoveryContextCleanup - fix uninitialized variable warnings. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 08:51:30 PST 2019
Author: Simon Pilgrim
Date: 2019-11-08T16:26:20Z
New Revision: 24d507f4468a361ced298f1880485cebef8424a8
URL: https://github.com/llvm/llvm-project/commit/24d507f4468a361ced298f1880485cebef8424a8
DIFF: https://github.com/llvm/llvm-project/commit/24d507f4468a361ced298f1880485cebef8424a8.diff
LOG: CrashRecoveryContextCleanup - fix uninitialized variable warnings. NFCI.
Remove default values from constructor.
Added:
Modified:
llvm/include/llvm/Support/CrashRecoveryContext.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/CrashRecoveryContext.h b/llvm/include/llvm/Support/CrashRecoveryContext.h
index feb449e2899c..96e5c5ccdd01 100644
--- a/llvm/include/llvm/Support/CrashRecoveryContext.h
+++ b/llvm/include/llvm/Support/CrashRecoveryContext.h
@@ -111,12 +111,12 @@ class CrashRecoveryContext {
/// 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 @@ class CrashRecoveryContextCleanup {
private:
friend class CrashRecoveryContext;
- CrashRecoveryContextCleanup *prev, *next;
+ CrashRecoveryContextCleanup *prev = nullptr, *next = nullptr;
};
/// Base class of cleanup handler that controls recovery of resources of the
More information about the llvm-commits
mailing list