ART: Continue adding override annotations
Use Clang-tidy's modernize-use-override to add more annotations. Ignore
inferred annotations on destructors.
Bug: 32619234
Test: mmma art
Change-Id: Ic432c928e398d44df9171e42db04ee19946e6887
diff --git a/runtime/monitor_test.cc b/runtime/monitor_test.cc
index c88748f..0b168f8 100644
--- a/runtime/monitor_test.cc
+++ b/runtime/monitor_test.cc
@@ -62,7 +62,7 @@
monitor_test_(monitor_test), initial_sleep_(initial_sleep), millis_(millis),
expected_(expected) {}
- void Run(Thread* self) {
+ void Run(Thread* self) override {
{
ScopedObjectAccess soa(self);
@@ -118,7 +118,7 @@
}
}
- void Finalize() {
+ void Finalize() override {
delete this;
}
@@ -136,7 +136,7 @@
monitor_test_(monitor_test), initial_sleep_(initial_sleep), millis_(millis),
expected_(expected) {}
- void Run(Thread* self) {
+ void Run(Thread* self) override {
monitor_test_->barrier_->Wait(self); // Wait for the other thread to set up the monitor.
{
@@ -158,7 +158,7 @@
monitor_test_->complete_barrier_->Wait(self); // Wait for test completion.
}
- void Finalize() {
+ void Finalize() override {
delete this;
}
@@ -174,7 +174,7 @@
InterruptTask(MonitorTest* monitor_test, uint64_t initial_sleep, uint64_t millis) :
monitor_test_(monitor_test), initial_sleep_(initial_sleep), millis_(millis) {}
- void Run(Thread* self) {
+ void Run(Thread* self) override {
monitor_test_->barrier_->Wait(self); // Wait for the other thread to set up the monitor.
{
@@ -202,7 +202,7 @@
monitor_test_->complete_barrier_->Wait(self); // Wait for test completion.
}
- void Finalize() {
+ void Finalize() override {
delete this;
}
@@ -216,7 +216,7 @@
public:
explicit WatchdogTask(MonitorTest* monitor_test) : monitor_test_(monitor_test) {}
- void Run(Thread* self) {
+ void Run(Thread* self) override {
ScopedObjectAccess soa(self);
monitor_test_->watchdog_object_.Get()->MonitorEnter(self); // Lock the object.
@@ -231,7 +231,7 @@
}
}
- void Finalize() {
+ void Finalize() override {
delete this;
}
@@ -326,14 +326,14 @@
public:
explicit TryLockTask(Handle<mirror::Object> obj) : obj_(obj) {}
- void Run(Thread* self) {
+ void Run(Thread* self) override {
ScopedObjectAccess soa(self);
// Lock is held by other thread, try lock should fail.
ObjectTryLock<mirror::Object> lock(self, obj_);
EXPECT_FALSE(lock.Acquired());
}
- void Finalize() {
+ void Finalize() override {
delete this;
}