Modernise code to use override specifier
Generated by clang-tidy, with IgnoreDestructors option enabled.
Test: m checkbuild
Bug: 116509795
Change-Id: I5dafa10c2cf605165581b8cf7dd2633ed101ed65
diff --git a/compiler/optimizing/codegen_test_utils.h b/compiler/optimizing/codegen_test_utils.h
index 0289e9c..dde39d4 100644
--- a/compiler/optimizing/codegen_test_utils.h
+++ b/compiler/optimizing/codegen_test_utils.h
@@ -176,7 +176,7 @@
public:
InternalCodeAllocator() : size_(0) { }
- virtual uint8_t* Allocate(size_t size) {
+ uint8_t* Allocate(size_t size) override {
size_ = size;
memory_.reset(new uint8_t[size]);
return memory_.get();
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 4670b3f..fedad0c 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -2934,7 +2934,7 @@
size_t ComputeHashCode() const override { return 0; }
// The null constant representation is a 0-bit pattern.
- virtual bool IsZeroBitPattern() const { return true; }
+ bool IsZeroBitPattern() const override { return true; }
DECLARE_INSTRUCTION(NullConstant);
@@ -6316,7 +6316,7 @@
bool CanBeMoved() const override { return true; }
- bool InstructionDataEquals(const HInstruction* other) const;
+ bool InstructionDataEquals(const HInstruction* other) const override;
size_t ComputeHashCode() const override { return type_index_.index_; }
diff --git a/compiler/optimizing/register_allocator_graph_color.h b/compiler/optimizing/register_allocator_graph_color.h
index 16131e1..f0e7e55 100644
--- a/compiler/optimizing/register_allocator_graph_color.h
+++ b/compiler/optimizing/register_allocator_graph_color.h
@@ -94,7 +94,7 @@
void AllocateRegisters() override;
- bool Validate(bool log_fatal_on_failure);
+ bool Validate(bool log_fatal_on_failure) override;
private:
// Collect all intervals and prepare for register allocation.
diff --git a/compiler/optimizing/scheduler_arm.h b/compiler/optimizing/scheduler_arm.h
index 875593b..4c7a3bb 100644
--- a/compiler/optimizing/scheduler_arm.h
+++ b/compiler/optimizing/scheduler_arm.h
@@ -55,7 +55,7 @@
: codegen_(down_cast<CodeGeneratorARMType*>(codegen)) {}
// Default visitor for instructions not handled specifically below.
- void VisitInstruction(HInstruction* ATTRIBUTE_UNUSED) {
+ void VisitInstruction(HInstruction* ATTRIBUTE_UNUSED) override {
last_visited_latency_ = kArmIntegerOpLatency;
}
diff --git a/compiler/optimizing/scheduler_arm64.h b/compiler/optimizing/scheduler_arm64.h
index 7f6549d..ba5a743 100644
--- a/compiler/optimizing/scheduler_arm64.h
+++ b/compiler/optimizing/scheduler_arm64.h
@@ -58,7 +58,7 @@
class SchedulingLatencyVisitorARM64 : public SchedulingLatencyVisitor {
public:
// Default visitor for instructions not handled specifically below.
- void VisitInstruction(HInstruction* ATTRIBUTE_UNUSED) {
+ void VisitInstruction(HInstruction* ATTRIBUTE_UNUSED) override {
last_visited_latency_ = kArm64IntegerOpLatency;
}