summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-01-14 09:46:21 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-01-14 09:46:21 +0000
commit1aafb843c86bd930f777c1581b34ab1ef464de08 (patch)
treecf29765ae8218dbdf30a58a0a172f5666b8d5df9 /libs
parent3e059193b132351daa7c180e46e1d336bac5559a (diff)
parent96f471e0224e6e19dc05af18d178f1eb0fc858ae (diff)
downloadnative-1aafb843c86bd930f777c1581b34ab1ef464de08.tar.gz
Merge "Silence bogus unused-lambda-capture warning"
Diffstat (limited to 'libs')
-rw-r--r--libs/vr/libpdx/private/pdx/rpc/variant.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/vr/libpdx/private/pdx/rpc/variant.h b/libs/vr/libpdx/private/pdx/rpc/variant.h
index 80b17694ce..2cc96645e2 100644
--- a/libs/vr/libpdx/private/pdx/rpc/variant.h
+++ b/libs/vr/libpdx/private/pdx/rpc/variant.h
@@ -450,12 +450,19 @@ class Variant {
Variant(Variant&& other)
: index_{other.index_}, value_{std::move(other.value_), other.index_} {}
+// Recent Clang versions has a regression that produces bogus
+// unused-lambda-capture warning. Suppress the warning as a temporary
+// workaround. http://b/71356631
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-lambda-capture"
// Copy and move construction from Variant types. Each element of OtherTypes
// must be convertible to an element of Types.
template <typename... OtherTypes>
explicit Variant(const Variant<OtherTypes...>& other) {
other.Visit([this](const auto& value) { Construct(value); });
}
+#pragma clang diagnostic pop
+
template <typename... OtherTypes>
explicit Variant(Variant<OtherTypes...>&& other) {
other.Visit([this](auto&& value) { Construct(std::move(value)); });