From fa6a1b0a1d9d186a0ad9bb413a4e49f1ffd187d8 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Fri, 7 Sep 2018 08:11:55 -0700 Subject: 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 --- runtime/monitor_test.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'runtime/monitor_test.cc') diff --git a/runtime/monitor_test.cc b/runtime/monitor_test.cc index c88748ffb8..0b168f86f4 100644 --- a/runtime/monitor_test.cc +++ b/runtime/monitor_test.cc @@ -62,7 +62,7 @@ class CreateTask : public Task { 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 @@ class CreateTask : public Task { } } - void Finalize() { + void Finalize() override { delete this; } @@ -136,7 +136,7 @@ class UseTask : public Task { 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 @@ class UseTask : public Task { monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. } - void Finalize() { + void Finalize() override { delete this; } @@ -174,7 +174,7 @@ class InterruptTask : public Task { 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 @@ class InterruptTask : public Task { monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. } - void Finalize() { + void Finalize() override { delete this; } @@ -216,7 +216,7 @@ class WatchdogTask : public Task { 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 @@ class WatchdogTask : public Task { } } - void Finalize() { + void Finalize() override { delete this; } @@ -326,14 +326,14 @@ class TryLockTask : public Task { public: explicit TryLockTask(Handle 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 lock(self, obj_); EXPECT_FALSE(lock.Acquired()); } - void Finalize() { + void Finalize() override { delete this; } -- cgit v1.2.3-59-g8ed1b