From 47b9a9a2869532b41bd45d36dbca7d7d457e20ac Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Tue, 10 Feb 2015 17:32:49 +0000 Subject: [PATCH] Add pragma system header to some experimental headers and add newlines to files. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228712 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/experimental/__config | 4 ++++ include/experimental/chrono | 4 ++++ include/experimental/system_error | 4 ++++ include/experimental/type_traits | 4 ++++ include/experimental/utility | 7 +++++-- .../string.view/string.view.ops/substr.pass.cpp | 2 +- test/support/constexpr_char_traits.hpp | 2 +- 7 files changed, 23 insertions(+), 4 deletions(-) diff --git a/include/experimental/__config b/include/experimental/__config index 774198be..f64a3a90 100644 --- a/include/experimental/__config +++ b/include/experimental/__config @@ -13,6 +13,10 @@ #include <__config> +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + #define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace std { namespace experimental { #define _LIBCPP_END_NAMESPACE_EXPERIMENTAL } } #define _VSTD_EXPERIMENTAL std::experimental diff --git a/include/experimental/chrono b/include/experimental/chrono index 53b56b2e..738ded88 100644 --- a/include/experimental/chrono +++ b/include/experimental/chrono @@ -37,6 +37,10 @@ inline namespace fundamentals_v1 { #include #include +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + #if _LIBCPP_STD_VER > 11 _LIBCPP_BEGIN_NAMESPACE_CHRONO_LFTS diff --git a/include/experimental/system_error b/include/experimental/system_error index 2a278b54..9b9ab333 100644 --- a/include/experimental/system_error +++ b/include/experimental/system_error @@ -40,6 +40,10 @@ inline namespace fundamentals_v1 { #include +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + _LIBCPP_BEGIN_NAMESPACE_LFTS #if __has_feature(cxx_variable_templates) diff --git a/include/experimental/type_traits b/include/experimental/type_traits index ab2c8cdf..35cdada1 100644 --- a/include/experimental/type_traits +++ b/include/experimental/type_traits @@ -184,6 +184,10 @@ inline namespace fundamentals_v1 { #include +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + _LIBCPP_BEGIN_NAMESPACE_LFTS #if __has_feature(cxx_variable_templates) diff --git a/include/experimental/utility b/include/experimental/utility index 84e461af..b5fca6c7 100644 --- a/include/experimental/utility +++ b/include/experimental/utility @@ -31,9 +31,12 @@ inline namespace fundamentals_v1 { */ -# include +#include +#include -# include +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif _LIBCPP_BEGIN_NAMESPACE_LFTS diff --git a/test/std/experimental/string.view/string.view.ops/substr.pass.cpp b/test/std/experimental/string.view/string.view.ops/substr.pass.cpp index 2b134ea2..12364624 100644 --- a/test/std/experimental/string.view/string.view.ops/substr.pass.cpp +++ b/test/std/experimental/string.view/string.view.ops/substr.pass.cpp @@ -104,4 +104,4 @@ int main () { } } #endif -} \ No newline at end of file +} diff --git a/test/support/constexpr_char_traits.hpp b/test/support/constexpr_char_traits.hpp index a2a690e9..b069c900 100644 --- a/test/support/constexpr_char_traits.hpp +++ b/test/support/constexpr_char_traits.hpp @@ -135,4 +135,4 @@ constexpr_char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a) return __r; } -#endif // _CONSTEXPR_CHAR_TRAITS \ No newline at end of file +#endif // _CONSTEXPR_CHAR_TRAITS