diff options
author | Yi Kong <yikong@google.com> | 2019-03-29 19:42:35 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-03-29 19:42:35 -0700 |
commit | d116f8d23ba15dc6f21c4c89bd07d39c0cf62839 (patch) | |
tree | 66001508e25de99aee50f4d9ecae9f16a08211f6 | |
parent | fce26268c6316d16ea648dff2322dca80e1886e7 (diff) | |
parent | d3a825fe61dcf39fabc771259724b3f0e0897fec (diff) | |
download | bionic-d116f8d23ba15dc6f21c4c89bd07d39c0cf62839.tar.gz |
Merge "Modernise code to use override specifier" am: 4699cf6174 am: 2e3a19d5b4
am: d3a825fe61
Change-Id: Ia5e05fd2fdf4d6a003fe6960bca1bd41487ecc05
-rw-r--r-- | benchmarks/semaphore_benchmark.cpp | 4 | ||||
-rw-r--r-- | tests/dlext_test.cpp | 8 | ||||
-rw-r--r-- | tests/sys_ptrace_test.cpp | 2 | ||||
-rw-r--r-- | tests/sys_resource_test.cpp | 2 | ||||
-rw-r--r-- | tools/versioner/src/Driver.cpp | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/benchmarks/semaphore_benchmark.cpp b/benchmarks/semaphore_benchmark.cpp index ba891370b..cf5148983 100644 --- a/benchmarks/semaphore_benchmark.cpp +++ b/benchmarks/semaphore_benchmark.cpp @@ -80,7 +80,7 @@ static void* BM_semaphore_sem_post_start_thread(void* arg) { class SemaphoreFixture : public benchmark::Fixture { public: - void SetUp(const benchmark::State&) { + void SetUp(const benchmark::State&) override { sem_init(&semaphore, 0, 0); pthread_attr_t attr; @@ -100,7 +100,7 @@ class SemaphoreFixture : public benchmark::Fixture { setup = true; } - ~SemaphoreFixture() { + ~SemaphoreFixture() override { if (setup) { // Only do this if the test was actually run. sched_setscheduler(0, SCHED_OTHER, ¶m); diff --git a/tests/dlext_test.cpp b/tests/dlext_test.cpp index 7949d0f15..1bc503061 100644 --- a/tests/dlext_test.cpp +++ b/tests/dlext_test.cpp @@ -67,7 +67,7 @@ constexpr auto kLibSize = 1024 * 1024; // how much address space to reserve for class DlExtTest : public ::testing::Test { protected: - virtual void SetUp() { + void SetUp() override { handle_ = nullptr; // verify that we don't have the library loaded already void* h = dlopen(kLibName, RTLD_NOW | RTLD_NOLOAD); @@ -78,7 +78,7 @@ protected: ASSERT_EQ(std::string("dlopen failed: library \"") + kLibNameNoRelro + "\" wasn't loaded and RTLD_NOLOAD prevented it", dlerror()); } - virtual void TearDown() { + void TearDown() override { if (handle_ != nullptr) { ASSERT_DL_ZERO(dlclose(handle_)); } @@ -418,7 +418,7 @@ TEST_F(DlExtTest, ReservedHintTooSmall) { class DlExtRelroSharingTest : public DlExtTest { protected: - virtual void SetUp() { + void SetUp() override { DlExtTest::SetUp(); void* start = mmap(nullptr, kLibSize, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); ASSERT_TRUE(start != MAP_FAILED); @@ -428,7 +428,7 @@ protected: extinfo_.relro_fd = -1; } - virtual void TearDown() { + void TearDown() override { DlExtTest::TearDown(); } diff --git a/tests/sys_ptrace_test.cpp b/tests/sys_ptrace_test.cpp index 9b3dba0f6..90539fe8c 100644 --- a/tests/sys_ptrace_test.cpp +++ b/tests/sys_ptrace_test.cpp @@ -402,7 +402,7 @@ class PtraceResumptionTest : public ::testing::Test { } } - ~PtraceResumptionTest() { + ~PtraceResumptionTest() override { } void AssertDeath(int signo); diff --git a/tests/sys_resource_test.cpp b/tests/sys_resource_test.cpp index 0b6b6ef6b..b1e8b1ae0 100644 --- a/tests/sys_resource_test.cpp +++ b/tests/sys_resource_test.cpp @@ -30,7 +30,7 @@ TEST(sys_resource, rlimit_struct_size) { class SysResourceTest : public ::testing::Test { protected: - virtual void SetUp() { + void SetUp() override { ASSERT_EQ(0, getrlimit(RLIMIT_CORE, &l32_)); ASSERT_EQ(0, getrlimit64(RLIMIT_CORE, &l64_)); ASSERT_EQ(0, prlimit(0, RLIMIT_CORE, nullptr, &pr_l32_)); diff --git a/tools/versioner/src/Driver.cpp b/tools/versioner/src/Driver.cpp index 606224067..3927480c9 100644 --- a/tools/versioner/src/Driver.cpp +++ b/tools/versioner/src/Driver.cpp @@ -62,7 +62,7 @@ class VersionerASTConsumer : public clang::ASTConsumer { : header_database(header_database), type(type) { } - virtual void HandleTranslationUnit(ASTContext& ctx) override { + void HandleTranslationUnit(ASTContext& ctx) override { header_database->parseAST(type, ctx); } }; |