[clang] b5eafda - Revert "EHScopeStack::Cleanup has virtual functions so the destructor should be too."
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 21 21:18:22 PDT 2020
Author: David Blaikie
Date: 2020-03-21T21:17:33-07:00
New Revision: b5eafda8d3ef02f9f78e090725564dd28e573322
URL: https://github.com/llvm/llvm-project/commit/b5eafda8d3ef02f9f78e090725564dd28e573322
DIFF: https://github.com/llvm/llvm-project/commit/b5eafda8d3ef02f9f78e090725564dd28e573322.diff
LOG: Revert "EHScopeStack::Cleanup has virtual functions so the destructor should be too."
This type was already well designed - having a protected destructor, and
derived classes being final/public non-virtual destructors, the type
couldn't be destroyed polymorphically & accidentally cause slicing.
This reverts commit 736385c0b49d42f398ffa1458883f0d182178ef4.
Added:
Modified:
clang/lib/CodeGen/EHScopeStack.h
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/EHScopeStack.h b/clang/lib/CodeGen/EHScopeStack.h
index 4dd3da3e90e7..0ed67aabcd62 100644
--- a/clang/lib/CodeGen/EHScopeStack.h
+++ b/clang/lib/CodeGen/EHScopeStack.h
@@ -148,7 +148,7 @@ class EHScopeStack {
virtual void anchor();
protected:
- virtual ~Cleanup() = default;
+ ~Cleanup() = default;
public:
Cleanup(const Cleanup &) = default;
More information about the cfe-commits
mailing list