ahatanak created this revision. ahatanak added a subscriber: cfe-commits. This patch fixes a warning that is issued when -Wpadded is on clang's command line. The following warning is from the build log of http://lab.llvm.org:8080/green/view/Libcxx/job/libcxx_abi/554/consoleText (note that I see this warning issued only from builders that use lib/buildit):
In file included from ../src/stdexcept.cpp:10: ../include/__refstring:30:12: warning: padding size of 'std::__1::__libcpp_refstring::_Rep_base' with 4 bytes to alignment boundary [-Wpadded] struct _Rep_base ^ 1 warning generated. http://reviews.llvm.org/D15897 Files: include/__refstring Index: include/__refstring =================================================================== --- include/__refstring +++ include/__refstring @@ -27,13 +27,21 @@ typedef int count_t; +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif struct _Rep_base { std::size_t len; std::size_t cap; count_t count; }; +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + static _Rep_base* rep_from_data(const char *data_) _NOEXCEPT
Index: include/__refstring =================================================================== --- include/__refstring +++ include/__refstring @@ -27,13 +27,21 @@ typedef int count_t; +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif struct _Rep_base { std::size_t len; std::size_t cap; count_t count; }; +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + static _Rep_base* rep_from_data(const char *data_) _NOEXCEPT
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits