[libc++][test] Remove disable_missing_braces_warning.h from tests
authorJoe Loser <joeloser93@gmail.com>
Wed, 22 Sep 2021 20:00:16 +0000 (16:00 -0400)
committerJoe Loser <joeloser93@gmail.com>
Wed, 22 Sep 2021 20:00:16 +0000 (16:00 -0400)
Several tests include `disable_missing_braces_warning.h` but do not need
to. Remove the include.

Inspired from discussion at https://reviews.llvm.org/D109668

Reviewed By: ldionne, #libc, Mordante

Differential Revision: https://reviews.llvm.org/D109711

32 files changed:
libcxx/test/std/containers/sequences/array/array.cons/deduct.fail.cpp
libcxx/test/std/containers/sequences/array/array.cons/deduct.pass.cpp
libcxx/test/std/containers/sequences/array/array.cons/implicit_copy.pass.cpp
libcxx/test/std/containers/sequences/array/array.data/data.pass.cpp
libcxx/test/std/containers/sequences/array/array.data/data_const.pass.cpp
libcxx/test/std/containers/sequences/array/array.fill/fill.fail.cpp
libcxx/test/std/containers/sequences/array/array.fill/fill.pass.cpp
libcxx/test/std/containers/sequences/array/array.size/size.pass.cpp
libcxx/test/std/containers/sequences/array/array.special/swap.pass.cpp
libcxx/test/std/containers/sequences/array/array.swap/swap.fail.cpp
libcxx/test/std/containers/sequences/array/array.swap/swap.pass.cpp
libcxx/test/std/containers/sequences/array/array.tuple/get.fail.cpp
libcxx/test/std/containers/sequences/array/array.tuple/get.pass.cpp
libcxx/test/std/containers/sequences/array/array.tuple/get_const.pass.cpp
libcxx/test/std/containers/sequences/array/array.tuple/get_const_rv.pass.cpp
libcxx/test/std/containers/sequences/array/array.tuple/get_rv.pass.cpp
libcxx/test/std/containers/sequences/array/array.tuple/tuple_element.fail.cpp
libcxx/test/std/containers/sequences/array/at.pass.cpp
libcxx/test/std/containers/sequences/array/at_const.pass.cpp
libcxx/test/std/containers/sequences/array/compare.fail.cpp
libcxx/test/std/containers/sequences/array/compare.pass.cpp
libcxx/test/std/containers/sequences/array/front_back.pass.cpp
libcxx/test/std/containers/sequences/array/front_back_const.pass.cpp
libcxx/test/std/containers/sequences/array/indexing.pass.cpp
libcxx/test/std/containers/sequences/array/indexing_const.pass.cpp
libcxx/test/std/containers/sequences/array/iterators.pass.cpp
libcxx/test/std/containers/views/span.cons/stdarray.pass.cpp
libcxx/test/std/iterators/iterator.range/begin-end.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply_extended_types.pass.cpp
libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
libcxx/test/support/disable_missing_braces_warning.h [deleted file]

index 37b4cc0..1a654e1 100644 (file)
 #include <cassert>
 #include <cstddef>
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
-
 #include "test_macros.h"
 
 int main(int, char**)
index 9fea6b1..30dd48e 100644 (file)
 #include <cassert>
 #include <cstddef>
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 #include "test_macros.h"
 
 constexpr bool tests()
index 814d1df..0e1e77f 100644 (file)
 #include <cassert>
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 // In C++03 the copy assignment operator is not deleted when the implicitly
 // generated operator would be ill-formed; like in the case of a struct with a
 // const member.
index 3493659..4e8b1ab 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 struct NoDefault {
     TEST_CONSTEXPR NoDefault(int) { }
 };
index cce6e63..cc18079 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 struct NoDefault {
     TEST_CONSTEXPR NoDefault(int) { }
 };
index 9f560da..e0f7a6f 100644 (file)
 #include <array>
 #include <cassert>
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 int main(int, char**) {
   {
     typedef double T;
index 3a18511..b2d7c4a 100644 (file)
 #include <array>
 #include <cassert>
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
 #include "test_macros.h"
-#include "disable_missing_braces_warning.h"
 
 TEST_CONSTEXPR_CXX20 bool tests()
 {
index e550300..d39edd1 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 int main(int, char**)
 {
     {
index 788f0ed..617641d 100644 (file)
@@ -14,9 +14,6 @@
 #include <cassert>
 
 #include "test_macros.h"
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
 
 struct NonSwappable {
     TEST_CONSTEXPR NonSwappable() { }
index 90c1496..4c51d24 100644 (file)
 #include <array>
 #include <cassert>
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 int main(int, char**) {
   {
     typedef double T;
index 1f2d8e7..e0133ba 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 struct NonSwappable {
     TEST_CONSTEXPR NonSwappable() { }
 private:
index 7bfe670..868b7d0 100644 (file)
 #include <array>
 #include <cassert>
 
-
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 int main(int, char**)
 {
     {
index 1b13d77..04bb131 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
-
 template <typename ...T>
 TEST_CONSTEXPR std::array<int, sizeof...(T)> tempArray(T ...args)
 {
index 3c1941c..5fc080b 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 TEST_CONSTEXPR_CXX14 bool tests()
 {
     {
index 9d92e4b..a512100 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 int main(int, char**)
 {
 
index 1c3b69a..2ab8acb 100644 (file)
 #include <utility>
 #include <cassert>
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
 #include "test_macros.h"
-#include "disable_missing_braces_warning.h"
 
 int main(int, char**)
 {
-
     {
         typedef std::unique_ptr<double> T;
         typedef std::array<T, 1> C;
index cde4ba7..21d99c6 100644 (file)
 #include <array>
 #include <cassert>
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 int main(int, char**)
 {
     {
index 77474d6..90b5684 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
-
 TEST_CONSTEXPR_CXX17 bool tests()
 {
     {
index b8d6b4c..2ddd5a0 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
-
 TEST_CONSTEXPR_CXX14 bool tests()
 {
     {
index b634ce3..1fe4c70 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 template <class Array>
 void test_compare(const Array& LHS, const Array& RHS) {
   typedef std::vector<typename Array::value_type> Vector;
index c89216c..a04d558 100644 (file)
 #include "test_macros.h"
 #include "test_comparisons.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 TEST_CONSTEXPR_CXX20 bool tests()
 {
     {
index 18985e9..c37acd0 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
-
 TEST_CONSTEXPR_CXX17 bool tests()
 {
     {
index af51912..9204663 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
-
 TEST_CONSTEXPR_CXX14 bool tests()
 {
     {
index 6b5d848..48a2be0 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
-
 TEST_CONSTEXPR_CXX17 bool tests()
 {
     {
index 3f34dfe..ce6f8bb 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
-
 TEST_CONSTEXPR_CXX14 bool tests()
 {
     {
index 60b01df..8d15cf8 100644 (file)
 
 #include "test_macros.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 struct NoDefault {
     TEST_CONSTEXPR NoDefault(int) { }
 };
index 31beb2f..78ce049 100644 (file)
 #include <string>
 
 #include "test_macros.h"
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 
 void checkCV()
 {
index ff2301f..0e65421 100644 (file)
 #include <list>
 #include <initializer_list>
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 template<typename C>
 void test_const_container( const C & c, typename C::value_type val ) {
     assert ( std::begin(c)   == c.begin());
index 5ac13f1..6ca3f20 100644 (file)
 #include "test_macros.h"
 #include "type_id.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
-
 constexpr int constexpr_sum_fn() { return 0; }
 
 template <class ...Ints>
index b0546e9..9b19efd 100644 (file)
 #include <utility>
 #include <cassert>
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
 #include "test_macros.h"
-#include "disable_missing_braces_warning.h"
 
 int count = 0;
 
index bb9f39a..957bb67 100644 (file)
 #include "test_macros.h"
 #include "type_id.h"
 
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#include "disable_missing_braces_warning.h"
-
 template <class Tuple>
 struct ConstexprConstructibleFromTuple {
   template <class ...Args>
diff --git a/libcxx/test/support/disable_missing_braces_warning.h b/libcxx/test/support/disable_missing_braces_warning.h
deleted file mode 100644 (file)
index 9e115f8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#ifndef SUPPORT_DISABLE_MISSING_BRACES_WARNING_H
-#define SUPPORT_DISABLE_MISSING_BRACES_WARNING_H
-
-// std::array is explicitly allowed to be initialized with A a = { init-list };.
-// Disable the missing braces warning for this reason.
-#if defined(__GNUC__)
-#pragma GCC diagnostic ignored "-Wmissing-braces"
-#elif defined(__clang__)
-#pragma clang diagnostic ignored "-Wmissing-braces"
-#endif
-
-#endif // SUPPORT_DISABLE_MISSING_BRACES_WARNING_H