From b2099f351eef072d41912b301a1d62219fbf22af Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 19 Dec 2018 21:18:46 +0000 Subject: [PATCH] Bug 1515434 - Only activate the deactivation of -Wc++2a-compat from clang 6 r=botond Differential Revision: https://phabricator.services.mozilla.com/D15012 --HG-- extra : moz-landing-system : lando --- mfbt/tests/TestUtf8.cpp | 4 ++-- xpcom/tests/gtest/TestStrings.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mfbt/tests/TestUtf8.cpp b/mfbt/tests/TestUtf8.cpp index 03236abf0a60..29654c037fd3 100644 --- a/mfbt/tests/TestUtf8.cpp +++ b/mfbt/tests/TestUtf8.cpp @@ -21,7 +21,7 @@ using mozilla::IsValidUtf8; using mozilla::Utf8Unit; // Disable the C++ 2a warning. See bug #1509926 -#if defined(__clang__) +#if defined(__clang__) && (__clang_major__ >= 6) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc++2a-compat" #endif @@ -742,6 +742,6 @@ int main() { return 0; } -#if defined(__clang__) +#if defined(__clang__) && (__clang_major__ >= 6) #pragma clang diagnostic pop #endif diff --git a/xpcom/tests/gtest/TestStrings.cpp b/xpcom/tests/gtest/TestStrings.cpp index bf23a6fa640c..ea49dd3cb6f2 100644 --- a/xpcom/tests/gtest/TestStrings.cpp +++ b/xpcom/tests/gtest/TestStrings.cpp @@ -30,7 +30,7 @@ }); // Disable the C++ 2a warning. See bug #1509926 -#if defined(__clang__) +#if defined(__clang__) && (__clang_major__ >= 6) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wc++2a-compat" #endif @@ -2345,6 +2345,6 @@ CONVERSION_BENCH(PerfUTF8toUTF16VIThousand, CopyUTF8toUTF16, mViThousandUtf8, } // namespace TestStrings -#if defined(__clang__) +#if defined(__clang__) && (__clang_major__ >= 6) #pragma clang diagnostic pop #endif