diff options
author | Ben Wagner <bungeman@google.com> | 2018-04-24 16:29:16 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-24 20:58:06 +0000 |
commit | ff134f20aeeac3394d2e92d08a6eb495f87d2f1a (patch) | |
tree | fe6519a22ad4251efe534868cab00ac82d8f3a7a /tests | |
parent | a11f7d0a5991bd991698ec5375850e9c69e2692b (diff) |
Compile with latest clang 7.
Changes to warnings in clang introduced by https://reviews.llvm.org/D43322
and https://reviews.llvm.org/D44883 cause warning as error failures when
building Skia. In particular this addresses return-std-move-in-c++11 and
self-assign-overloaded.
Change-Id: I680318098d8af1b64fba464585c7cdfcfcf39d66
Reviewed-on: https://skia-review.googlesource.com/123582
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PathOpsDVectorTest.cpp | 2 | ||||
-rw-r--r-- | tests/TArrayTest.cpp | 2 | ||||
-rw-r--r-- | tests/VkBackendSurfaceTest.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/PathOpsDVectorTest.cpp b/tests/PathOpsDVectorTest.cpp index 583a868149..5eced8f5e7 100644 --- a/tests/PathOpsDVectorTest.cpp +++ b/tests/PathOpsDVectorTest.cpp @@ -28,7 +28,7 @@ DEF_TEST(PathOpsDVector, reporter) { SkASSERT(ValidVector(v2)); v1 += v2; REPORTER_ASSERT(reporter, v1.fX == 0 && v1.fY == 0); - v2 -= v2; + v2 -= static_cast<decltype(v2)&>(v2); REPORTER_ASSERT(reporter, v2.fX == 0 && v2.fY == 0); v1 = tests[index + 1] - tests[index]; v1 /= 2; diff --git a/tests/TArrayTest.cpp b/tests/TArrayTest.cpp index 1b376e4d4b..5845b61f93 100644 --- a/tests/TArrayTest.cpp +++ b/tests/TArrayTest.cpp @@ -289,7 +289,7 @@ static void test_self_assignment(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, a.count() == 1); REPORTER_ASSERT(reporter, a[0] == 1); - a = a; + a = static_cast<decltype(a)&>(a); REPORTER_ASSERT(reporter, !a.empty()); REPORTER_ASSERT(reporter, a.count() == 1); REPORTER_ASSERT(reporter, a[0] == 1); diff --git a/tests/VkBackendSurfaceTest.cpp b/tests/VkBackendSurfaceTest.cpp index fc0464d981..6b442a9725 100644 --- a/tests/VkBackendSurfaceTest.cpp +++ b/tests/VkBackendSurfaceTest.cpp @@ -125,7 +125,7 @@ DEF_GPUTEST_FOR_VULKAN_CONTEXT(VkImageLayoutTest, reporter, ctxInfo) { REPORTER_ASSERT(reporter, invalidTexture.isValid()); REPORTER_ASSERT(reporter, GrBackendTexture::TestingOnly_Equals(invalidTexture, backendTex)); - invalidTexture = invalidTexture; + invalidTexture = static_cast<decltype(invalidTexture)&>(invalidTexture); REPORTER_ASSERT(reporter, invalidTexture.isValid()); REPORTER_ASSERT(reporter, GrBackendTexture::TestingOnly_Equals(invalidTexture, invalidTexture)); |