-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[llvm] Add "override" where appropriate (NFC) #165168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[llvm] Add "override" where appropriate (NFC) #165168
Conversation
Note that "override" makes "virtual" redundant. Identified with modernize-use-override.
|
@llvm/pr-subscribers-llvm-analysis @llvm/pr-subscribers-llvm-support Author: Kazu Hirata (kazutakahirata) ChangesNote that "override" makes "virtual" redundant. Identified with modernize-use-override. Patch is 37.04 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/165168.diff 47 Files Affected:
diff --git a/llvm/include/llvm/Analysis/DDG.h b/llvm/include/llvm/Analysis/DDG.h
index eb977fbca1895..1c5329181ddb1 100644
--- a/llvm/include/llvm/Analysis/DDG.h
+++ b/llvm/include/llvm/Analysis/DDG.h
@@ -96,7 +96,7 @@ class RootDDGNode : public DDGNode {
RootDDGNode() : DDGNode(NodeKind::Root) {}
RootDDGNode(const RootDDGNode &N) = delete;
RootDDGNode(RootDDGNode &&N) : DDGNode(std::move(N)) {}
- ~RootDDGNode() = default;
+ ~RootDDGNode() override = default;
/// Define classof to be able to use isa<>, cast<>, dyn_cast<>, etc.
static bool classof(const DDGNode *N) {
@@ -114,7 +114,7 @@ class LLVM_ABI SimpleDDGNode : public DDGNode {
SimpleDDGNode(Instruction &I);
SimpleDDGNode(const SimpleDDGNode &N);
SimpleDDGNode(SimpleDDGNode &&N);
- ~SimpleDDGNode();
+ ~SimpleDDGNode() override;
SimpleDDGNode &operator=(const SimpleDDGNode &N) = default;
@@ -176,7 +176,7 @@ class LLVM_ABI PiBlockDDGNode : public DDGNode {
PiBlockDDGNode(const PiNodeList &List);
PiBlockDDGNode(const PiBlockDDGNode &N);
PiBlockDDGNode(PiBlockDDGNode &&N);
- ~PiBlockDDGNode();
+ ~PiBlockDDGNode() override;
PiBlockDDGNode &operator=(const PiBlockDDGNode &N) = default;
@@ -318,7 +318,7 @@ class LLVM_ABI DataDependenceGraph : public DDGBase, public DDGInfo {
: DDGBase(std::move(G)), DDGInfo(std::move(G)) {}
DataDependenceGraph(Function &F, DependenceInfo &DI);
DataDependenceGraph(Loop &L, LoopInfo &LI, DependenceInfo &DI);
- ~DataDependenceGraph();
+ ~DataDependenceGraph() override;
/// If node \p N belongs to a pi-block return a pointer to the pi-block,
/// otherwise return null.
diff --git a/llvm/include/llvm/Analysis/InteractiveModelRunner.h b/llvm/include/llvm/Analysis/InteractiveModelRunner.h
index 66473ae64ad23..cfa0506d71ec1 100644
--- a/llvm/include/llvm/Analysis/InteractiveModelRunner.h
+++ b/llvm/include/llvm/Analysis/InteractiveModelRunner.h
@@ -51,7 +51,7 @@ class LLVM_ABI InteractiveModelRunner : public MLModelRunner {
Log->flush();
}
- virtual ~InteractiveModelRunner();
+ ~InteractiveModelRunner() override;
private:
void *evaluateUntyped() override;
diff --git a/llvm/include/llvm/Analysis/MLInlineAdvisor.h b/llvm/include/llvm/Analysis/MLInlineAdvisor.h
index cc4c482b379e3..d71fa55487e69 100644
--- a/llvm/include/llvm/Analysis/MLInlineAdvisor.h
+++ b/llvm/include/llvm/Analysis/MLInlineAdvisor.h
@@ -33,7 +33,7 @@ class MLInlineAdvisor : public InlineAdvisor {
GetModelRunner,
std::function<bool(CallBase &)> GetDefaultAdvice);
- virtual ~MLInlineAdvisor() = default;
+ ~MLInlineAdvisor() override = default;
void onPassEntry(LazyCallGraph::SCC *SCC) override;
void onPassExit(LazyCallGraph::SCC *SCC) override;
@@ -105,7 +105,7 @@ class MLInlineAdvice : public InlineAdvice {
public:
MLInlineAdvice(MLInlineAdvisor *Advisor, CallBase &CB,
OptimizationRemarkEmitter &ORE, bool Recommendation);
- virtual ~MLInlineAdvice() = default;
+ ~MLInlineAdvice() override = default;
void recordInliningImpl() override;
void recordInliningWithCalleeDeletedImpl() override;
diff --git a/llvm/include/llvm/Analysis/ReleaseModeModelRunner.h b/llvm/include/llvm/Analysis/ReleaseModeModelRunner.h
index 641036d8fdb4e..ff423a9155b14 100644
--- a/llvm/include/llvm/Analysis/ReleaseModeModelRunner.h
+++ b/llvm/include/llvm/Analysis/ReleaseModeModelRunner.h
@@ -106,7 +106,7 @@ class ReleaseModeModelRunner final : public MLModelRunner {
assert(ResultIndex >= 0 && "Cannot find DecisionName in inlining model");
}
- virtual ~ReleaseModeModelRunner() = default;
+ ~ReleaseModeModelRunner() override = default;
static bool classof(const MLModelRunner *R) {
return R->getKind() == MLModelRunner::Kind::Release;
diff --git a/llvm/include/llvm/Analysis/StackSafetyAnalysis.h b/llvm/include/llvm/Analysis/StackSafetyAnalysis.h
index 2966f0c7e1610..b7b816fa4021e 100644
--- a/llvm/include/llvm/Analysis/StackSafetyAnalysis.h
+++ b/llvm/include/llvm/Analysis/StackSafetyAnalysis.h
@@ -156,7 +156,7 @@ class StackSafetyGlobalInfoWrapperPass : public ModulePass {
static char ID;
StackSafetyGlobalInfoWrapperPass();
- ~StackSafetyGlobalInfoWrapperPass();
+ ~StackSafetyGlobalInfoWrapperPass() override;
const StackSafetyGlobalInfo &getResult() const { return SSGI; }
diff --git a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameAnalyzer.h b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameAnalyzer.h
index 03e93ded1f538..3895da2a9d383 100644
--- a/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameAnalyzer.h
+++ b/llvm/include/llvm/DWARFCFIChecker/DWARFCFIFunctionFrameAnalyzer.h
@@ -32,7 +32,7 @@ class LLVM_ABI CFIFunctionFrameAnalyzer : public CFIFunctionFrameReceiver {
public:
CFIFunctionFrameAnalyzer(MCContext &Context, const MCInstrInfo &MCII)
: CFIFunctionFrameReceiver(Context), MCII(MCII) {}
- ~CFIFunctionFrameAnalyzer();
+ ~CFIFunctionFrameAnalyzer() override;
void startFunctionFrame(bool IsEH,
ArrayRef<MCCFIInstruction> Prologue) override;
diff --git a/llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h b/llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h
index 03fc7290aacca..4ffef9009e0d1 100644
--- a/llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h
+++ b/llvm/include/llvm/DWARFLinker/Classic/DWARFStreamer.h
@@ -48,7 +48,7 @@ class LLVM_ABI DwarfStreamer : public DwarfEmitter {
raw_pwrite_stream &OutFile,
DWARFLinkerBase::MessageHandlerTy Warning)
: OutFile(OutFile), OutFileType(OutFileType), WarningHandler(Warning) {}
- virtual ~DwarfStreamer() = default;
+ ~DwarfStreamer() override = default;
static Expected<std::unique_ptr<DwarfStreamer>> createStreamer(
const Triple &TheTriple, DWARFLinkerBase::OutputFileType FileType,
diff --git a/llvm/include/llvm/DWARFLinker/Parallel/DWARFLinker.h b/llvm/include/llvm/DWARFLinker/Parallel/DWARFLinker.h
index 80465136dd286..db606957e6359 100644
--- a/llvm/include/llvm/DWARFLinker/Parallel/DWARFLinker.h
+++ b/llvm/include/llvm/DWARFLinker/Parallel/DWARFLinker.h
@@ -120,7 +120,7 @@ using SectionHandlerTy =
class DWARFLinker : public DWARFLinkerBase {
public:
- virtual ~DWARFLinker() = default;
+ ~DWARFLinker() override = default;
/// Creates dwarf linker instance.
LLVM_ABI static std::unique_ptr<DWARFLinker>
diff --git a/llvm/include/llvm/Debuginfod/BuildIDFetcher.h b/llvm/include/llvm/Debuginfod/BuildIDFetcher.h
index f0ecea1821257..8f9c2aa8722ad 100644
--- a/llvm/include/llvm/Debuginfod/BuildIDFetcher.h
+++ b/llvm/include/llvm/Debuginfod/BuildIDFetcher.h
@@ -24,7 +24,7 @@ class DebuginfodFetcher : public object::BuildIDFetcher {
public:
DebuginfodFetcher(std::vector<std::string> DebugFileDirectories)
: BuildIDFetcher(std::move(DebugFileDirectories)) {}
- virtual ~DebuginfodFetcher() = default;
+ ~DebuginfodFetcher() override = default;
/// Fetches the given Build ID using debuginfod and returns a local path to
/// the resulting file.
diff --git a/llvm/include/llvm/IR/DroppedVariableStatsIR.h b/llvm/include/llvm/IR/DroppedVariableStatsIR.h
index 3e182566f8cc0..9fc231999eb4f 100644
--- a/llvm/include/llvm/IR/DroppedVariableStatsIR.h
+++ b/llvm/include/llvm/IR/DroppedVariableStatsIR.h
@@ -71,13 +71,12 @@ class LLVM_ABI DroppedVariableStatsIR : public DroppedVariableStats {
StringRef PassLevel);
/// Override base class method to run on an llvm::Function specifically.
- virtual void
- visitEveryInstruction(unsigned &DroppedCount,
- DenseMap<VarID, DILocation *> &InlinedAtsMap,
- VarID Var) override;
+ void visitEveryInstruction(unsigned &DroppedCount,
+ DenseMap<VarID, DILocation *> &InlinedAtsMap,
+ VarID Var) override;
/// Override base class method to run on #dbg_values specifically.
- virtual void visitEveryDebugRecord(
+ void visitEveryDebugRecord(
DenseSet<VarID> &VarIDSet,
DenseMap<StringRef, DenseMap<VarID, DILocation *>> &InlinedAtsMap,
StringRef FuncName, bool Before) override;
diff --git a/llvm/include/llvm/IR/OptBisect.h b/llvm/include/llvm/IR/OptBisect.h
index d813ae933d65e..a8cd56f0b4b0d 100644
--- a/llvm/include/llvm/IR/OptBisect.h
+++ b/llvm/include/llvm/IR/OptBisect.h
@@ -51,7 +51,7 @@ class LLVM_ABI OptBisect : public OptPassGate {
/// through LLVMContext.
OptBisect() = default;
- virtual ~OptBisect() = default;
+ ~OptBisect() override = default;
/// Checks the bisect limit to determine if the specified pass should run.
///
diff --git a/llvm/include/llvm/MCA/HardwareUnits/LSUnit.h b/llvm/include/llvm/MCA/HardwareUnits/LSUnit.h
index 3700901d723cc..296a19c5f4138 100644
--- a/llvm/include/llvm/MCA/HardwareUnits/LSUnit.h
+++ b/llvm/include/llvm/MCA/HardwareUnits/LSUnit.h
@@ -57,7 +57,7 @@ class LLVM_ABI LSUnitBase : public HardwareUnit {
LSUnitBase(const MCSchedModel &SM, unsigned LoadQueueSize,
unsigned StoreQueueSize, bool AssumeNoAlias);
- virtual ~LSUnitBase();
+ ~LSUnitBase() override;
/// Returns the total number of entries in the load queue.
unsigned getLoadQueueSize() const { return LQSize; }
@@ -465,19 +465,19 @@ class LLVM_ABI LSUnit : public LSUnitBase {
/// 6. A store has to wait until an older store barrier is fully executed.
unsigned dispatch(const InstRef &IR) override;
- virtual void onInstructionIssued(const InstRef &IR) override {
+ void onInstructionIssued(const InstRef &IR) override {
unsigned GroupID = IR.getInstruction()->getLSUTokenID();
Groups[GroupID]->onInstructionIssued(IR);
}
- virtual void onInstructionRetired(const InstRef &IR) override;
+ void onInstructionRetired(const InstRef &IR) override;
- virtual void onInstructionExecuted(const InstRef &IR) override;
+ void onInstructionExecuted(const InstRef &IR) override;
- virtual void cycleEvent() override;
+ void cycleEvent() override;
#ifndef NDEBUG
- virtual void dump() const override;
+ void dump() const override;
#endif
private:
diff --git a/llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h b/llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h
index d88ee7cbb9580..958911d2c0f27 100644
--- a/llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h
+++ b/llvm/include/llvm/MCA/HardwareUnits/ResourceManager.h
@@ -121,7 +121,7 @@ class LLVM_ABI DefaultResourceStrategy final : public ResourceStrategy {
DefaultResourceStrategy(uint64_t UnitMask)
: ResourceUnitMask(UnitMask), NextInSequenceMask(UnitMask),
RemovedFromNextInSequence(0) {}
- virtual ~DefaultResourceStrategy() = default;
+ ~DefaultResourceStrategy() override = default;
uint64_t select(uint64_t ReadyMask) override;
void used(uint64_t Mask) override;
diff --git a/llvm/include/llvm/MCA/HardwareUnits/Scheduler.h b/llvm/include/llvm/MCA/HardwareUnits/Scheduler.h
index 0372600e99637..34ff1552782c0 100644
--- a/llvm/include/llvm/MCA/HardwareUnits/Scheduler.h
+++ b/llvm/include/llvm/MCA/HardwareUnits/Scheduler.h
@@ -47,7 +47,7 @@ class LLVM_ABI DefaultSchedulerStrategy : public SchedulerStrategy {
public:
DefaultSchedulerStrategy() = default;
- virtual ~DefaultSchedulerStrategy();
+ ~DefaultSchedulerStrategy() override;
bool compare(const InstRef &Lhs, const InstRef &Rhs) const override {
int LhsRank = computeRank(Lhs);
diff --git a/llvm/include/llvm/MCA/View.h b/llvm/include/llvm/MCA/View.h
index 4d6f930663207..5b2e546d8eda5 100644
--- a/llvm/include/llvm/MCA/View.h
+++ b/llvm/include/llvm/MCA/View.h
@@ -26,7 +26,7 @@ namespace mca {
class LLVM_ABI View : public HWEventListener {
public:
- virtual ~View() = default;
+ ~View() override = default;
virtual void printView(llvm::raw_ostream &OS) const = 0;
virtual StringRef getNameAsString() const = 0;
diff --git a/llvm/include/llvm/ObjCopy/ConfigManager.h b/llvm/include/llvm/ObjCopy/ConfigManager.h
index 27fbd96fc486c..15687998820c5 100644
--- a/llvm/include/llvm/ObjCopy/ConfigManager.h
+++ b/llvm/include/llvm/ObjCopy/ConfigManager.h
@@ -23,7 +23,7 @@ namespace llvm {
namespace objcopy {
struct LLVM_ABI ConfigManager : public MultiFormatConfig {
- virtual ~ConfigManager() {}
+ ~ConfigManager() override {}
const CommonConfig &getCommonConfig() const override { return Common; }
diff --git a/llvm/include/llvm/Object/GOFFObjectFile.h b/llvm/include/llvm/Object/GOFFObjectFile.h
index b6b22ee7226f2..80da64ed3730d 100644
--- a/llvm/include/llvm/Object/GOFFObjectFile.h
+++ b/llvm/include/llvm/Object/GOFFObjectFile.h
@@ -91,10 +91,10 @@ class LLVM_ABI GOFFObjectFile : public ObjectFile {
// SectionRef.
void moveSectionNext(DataRefImpl &Sec) const override;
- virtual Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
+ Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
uint64_t getSectionAddress(DataRefImpl Sec) const override;
uint64_t getSectionSize(DataRefImpl Sec) const override;
- virtual Expected<ArrayRef<uint8_t>>
+ Expected<ArrayRef<uint8_t>>
getSectionContents(DataRefImpl Sec) const override;
uint64_t getSectionIndex(DataRefImpl Sec) const override { return Sec.d.a; }
uint64_t getSectionAlignment(DataRefImpl Sec) const override;
diff --git a/llvm/include/llvm/ProfileData/MemProfReader.h b/llvm/include/llvm/ProfileData/MemProfReader.h
index 25578ecd06f12..8fdae7a472d5f 100644
--- a/llvm/include/llvm/ProfileData/MemProfReader.h
+++ b/llvm/include/llvm/ProfileData/MemProfReader.h
@@ -110,7 +110,7 @@ class LLVM_ABI RawMemProfReader final : public MemProfReader {
public:
RawMemProfReader(const RawMemProfReader &) = delete;
RawMemProfReader &operator=(const RawMemProfReader &) = delete;
- virtual ~RawMemProfReader() override;
+ ~RawMemProfReader() override;
// Prints the contents of the profile in YAML format.
void printYAML(raw_ostream &OS);
diff --git a/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h b/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
index 7031728c1e34b..6733e1c6b93f3 100644
--- a/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
+++ b/llvm/include/llvm/ProfileData/PGOCtxProfWriter.h
@@ -92,7 +92,7 @@ class LLVM_ABI PGOCtxProfileWriter final : public ctx_profile::ProfileWriter {
PGOCtxProfileWriter(raw_ostream &Out,
std::optional<unsigned> VersionOverride = std::nullopt,
bool IncludeEmpty = false);
- ~PGOCtxProfileWriter() { Writer.ExitBlock(); }
+ ~PGOCtxProfileWriter() override { Writer.ExitBlock(); }
void startContextSection() override;
void writeContextual(const ctx_profile::ContextNode &RootNode,
diff --git a/llvm/include/llvm/SandboxIR/BasicBlock.h b/llvm/include/llvm/SandboxIR/BasicBlock.h
index 25bbb6c058faa..a8dd5085e809a 100644
--- a/llvm/include/llvm/SandboxIR/BasicBlock.h
+++ b/llvm/include/llvm/SandboxIR/BasicBlock.h
@@ -78,7 +78,7 @@ class BasicBlock : public Value {
}
public:
- ~BasicBlock() = default;
+ ~BasicBlock() override = default;
/// For isa/dyn_cast.
static bool classof(const Value *From) {
return From->getSubclassID() == Value::ClassID::Block;
diff --git a/llvm/include/llvm/SandboxIR/PassManager.h b/llvm/include/llvm/SandboxIR/PassManager.h
index 6fccaf04b270a..93ca710805dd4 100644
--- a/llvm/include/llvm/SandboxIR/PassManager.h
+++ b/llvm/include/llvm/SandboxIR/PassManager.h
@@ -49,7 +49,7 @@ class PassManager : public ParentPass {
}
PassManager(const PassManager &) = delete;
PassManager(PassManager &&) = default;
- virtual ~PassManager() = default;
+ ~PassManager() override = default;
PassManager &operator=(const PassManager &) = delete;
public:
diff --git a/llvm/include/llvm/Target/TargetLoweringObjectFile.h b/llvm/include/llvm/Target/TargetLoweringObjectFile.h
index 4d6cbc5540131..06508bf4d50af 100644
--- a/llvm/include/llvm/Target/TargetLoweringObjectFile.h
+++ b/llvm/include/llvm/Target/TargetLoweringObjectFile.h
@@ -74,7 +74,7 @@ class LLVM_ABI TargetLoweringObjectFile : public MCObjectFileInfo {
TargetLoweringObjectFile(const TargetLoweringObjectFile &) = delete;
TargetLoweringObjectFile &
operator=(const TargetLoweringObjectFile &) = delete;
- virtual ~TargetLoweringObjectFile();
+ ~TargetLoweringObjectFile() override;
Mangler &getMangler() const { return *Mang; }
diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index e57032a6c5b3c..a013f27766051 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -3325,7 +3325,7 @@ struct LLVM_ABI AbstractAttribute : public IRPosition, public AADepGraphNode {
AbstractAttribute(const IRPosition &IRP) : IRPosition(IRP) {}
/// Virtual destructor.
- virtual ~AbstractAttribute() = default;
+ ~AbstractAttribute() override = default;
/// Compile time access to the IR attribute kind.
static constexpr Attribute::AttrKind IRAttributeKind = Attribute::None;
@@ -5588,7 +5588,7 @@ struct AACallEdges : public StateWrapper<BooleanState, AbstractAttribute>,
// Synthetic root node for the Attributor's internal call graph.
struct AttributorCallGraph : public AACallGraphNode {
AttributorCallGraph(Attributor &A) : AACallGraphNode(A) {}
- virtual ~AttributorCallGraph() = default;
+ ~AttributorCallGraph() override = default;
AACallEdgeIterator optimisticEdgesBegin() const override {
return AACallEdgeIterator(A, A.Functions.begin());
diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
index 7d02d9a683100..588a6eb298470 100644
--- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
+++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/DependencyGraph.h
@@ -305,7 +305,7 @@ class MemDGNode final : public DGNode {
return make_range(MemSuccs.begin(), MemSuccs.end());
}
#ifndef NDEBUG
- virtual void print(raw_ostream &OS, bool PrintDeps = true) const override;
+ void print(raw_ostream &OS, bool PrintDeps = true) const override;
#endif // NDEBUG
};
diff --git a/llvm/include/llvm/XRay/FDRRecords.h b/llvm/include/llvm/XRay/FDRRecords.h
index 91689cae935b1..8a12e336ff803 100644
--- a/llvm/include/llvm/XRay/FDRRecords.h
+++ b/llvm/include/llvm/XRay/FDRRecords.h
@@ -101,7 +101,7 @@ class MetadataRecord : public Record {
MetadataType metadataType() const { return MT; }
- virtual ~MetadataRecord() = default;
+ ~MetadataRecord() override = default;
};
// What follows are specific Metadata record types which encapsulate the
diff --git a/llvm/include/llvm/XRay/FDRTraceWriter.h b/llvm/include/llvm/XRay/FDRTraceWriter.h
index 957039d478f3f..dc68c7f1ae6c9 100644
--- a/llvm/include/llvm/XRay/FDRTraceWriter.h
+++ b/llvm/include/llvm/XRay/FDRTraceWriter.h
@@ -30,7 +30,7 @@ class LLVM_ABI FDRTraceWriter : public RecordVisitor {
public:
// Construct an FDRTraceWriter associated with an output stream.
explicit FDRTraceWriter(raw_ostream &O, const XRayFileHeader &H);
- ~FDRTraceWriter();
+ ~FDRTraceWriter() override;
Error visit(BufferExtents &) override;
Error visit(WallclockRecord &) override;
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index c4fee39cc0766..5169b43834edc 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -1242,7 +1242,7 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
return std::nullopt;
}
- virtual ~InlineCostCallAnalyzer() = default;
+ ~InlineCostCallAnalyzer() override = default;
int getThreshold() const { return Threshold; }
int getCost() const { return Cost; }
int getStaticBonusApplied() const { return StaticBonusApplied; }
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 1096e57632d97..3c222f54fd406 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -843,7 +843,7 @@ class SlotTracker : public AbstractSlotTrackerStorage {
SlotTracker(const SlotTracker &) = delete;
SlotTracker &operator=(const SlotTracker &) = delete;
- ~SlotTracker() = default;
+ ~SlotTracker() override = default;
void setProcessHook(
std::function<void(AbstractSlotTrackerStorage *, const Module *, bool)>)...
[truncated]
|
Note that "override" makes "virtual" redundant. Identified with modernize-use-override.
Note that "override" makes "virtual" redundant. Identified with modernize-use-override.
Note that "override" makes "virtual" redundant. Identified with modernize-use-override.
Note that "override" makes "virtual" redundant. Identified with modernize-use-override.
Note that "override" makes "virtual" redundant.
Identified with modernize-use-override.