[llvm] 6872c8b - [NFC] Mark derived destructors as `override`
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 24 03:44:40 PDT 2022
Author: Antonio Frighetto
Date: 2022-03-24T11:42:47+01:00
New Revision: 6872c8bdc428093c48462a1ed79f25a4d3c44d08
URL: https://github.com/llvm/llvm-project/commit/6872c8bdc428093c48462a1ed79f25a4d3c44d08
DIFF: https://github.com/llvm/llvm-project/commit/6872c8bdc428093c48462a1ed79f25a4d3c44d08.diff
LOG: [NFC] Mark derived destructors as `override`
Derived destructors can be marked as override, in order to prevent
possible compilation failures of projects depending on those
headers (when compiled with flags -Wall, -Wsuggest-destructor-override,
-Winconsistent-missing-destructor-override).
Differential Revision: https://reviews.llvm.org/D121993
Added:
Modified:
llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
llvm/include/llvm/IR/IRBuilder.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
index c4e04f362114e..9749cb9cd059a 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h
@@ -118,7 +118,7 @@ class DWARFContext : public DIContext {
WithColor::defaultErrorHandler,
std::function<void(Error)> WarningHandler =
WithColor::defaultWarningHandler);
- ~DWARFContext();
+ ~DWARFContext() override;
DWARFContext(DWARFContext &) = delete;
DWARFContext &operator=(DWARFContext &) = delete;
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index c28ccaa789a85..7e26d3504e053 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -77,7 +77,7 @@ class IRBuilderCallbackInserter : public IRBuilderDefaultInserter {
std::function<void(Instruction *)> Callback;
public:
- virtual ~IRBuilderCallbackInserter();
+ ~IRBuilderCallbackInserter() override;
IRBuilderCallbackInserter(std::function<void(Instruction *)> Callback)
: Callback(std::move(Callback)) {}
More information about the llvm-commits
mailing list