diff options
author | 2018-09-07 08:11:55 -0700 | |
---|---|---|
committer | 2018-09-07 09:13:50 -0700 | |
commit | fa6a1b0a1d9d186a0ad9bb413a4e49f1ffd187d8 (patch) | |
tree | 6d3bef945030868d7e78162dc3f4f35a07ce410a /runtime/monitor_test.cc | |
parent | a0878aa9f4f4102e56a6381b28a8d7c38dec80b9 (diff) |
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
Diffstat (limited to 'runtime/monitor_test.cc')
-rw-r--r-- | runtime/monitor_test.cc | 20 |
1 files changed, 10 insertions, 10 deletions
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<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; } |