disable_missing_braces_warning.h 812 B

12345678910111213141516171819
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #ifndef SUPPORT_DISABLE_MISSING_BRACES_WARNING_H
  9. #define SUPPORT_DISABLE_MISSING_BRACES_WARNING_H
  10. // std::array is explicitly allowed to be initialized with A a = { init-list };.
  11. // Disable the missing braces warning for this reason.
  12. #if defined(__GNUC__)
  13. #pragma GCC diagnostic ignored "-Wmissing-braces"
  14. #elif defined(__clang__)
  15. #pragma clang diagnostic ignored "-Wmissing-braces"
  16. #endif
  17. #endif // SUPPORT_DISABLE_MISSING_BRACES_WARNING_H