diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-02-05 22:47:54 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-02-05 22:47:54 +0000 |
commit | 8bb0ffb072dfec0a62639f6ba41f455cf452e817 (patch) | |
tree | 2eacb02bcdeafedbad123268d96d7e6a65012f59 /libcxx/test/std/strings | |
parent | 50bd9576f0e736bafa0aa8d082e6bd8a538b68f4 (diff) | |
download | bcm5719-llvm-8bb0ffb072dfec0a62639f6ba41f455cf452e817.tar.gz bcm5719-llvm-8bb0ffb072dfec0a62639f6ba41f455cf452e817.zip |
[libcxx] [test] Fix Clang -Wunused-local-typedef, part 3/3.
test/std/strings/string.classes/typedefs.pass.cpp
Actually test what basic_string's typedefs stand for.
test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
NotDerived and ND were completely unused.
test/std/utilities/utility/pairs/pairs.pair/default.pass.cpp
P2 was mistakenly not being used. Yes, that's
right: -Wunused-local-typedef CAUGHT A MISTAKE! AMAZING!
Fixes D29137.
llvm-svn: 294156
Diffstat (limited to 'libcxx/test/std/strings')
-rw-r--r-- | libcxx/test/std/strings/string.classes/typedefs.pass.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libcxx/test/std/strings/string.classes/typedefs.pass.cpp b/libcxx/test/std/strings/string.classes/typedefs.pass.cpp index 11ee6c8a121..3aba1c3f15d 100644 --- a/libcxx/test/std/strings/string.classes/typedefs.pass.cpp +++ b/libcxx/test/std/strings/string.classes/typedefs.pass.cpp @@ -18,13 +18,14 @@ // typedef basic_string<wchar_t> wstring; #include <string> +#include <type_traits> int main() { - typedef std::string test1; - typedef std::wstring test2; + static_assert((std::is_same<std::string, std::basic_string<char> >::value), ""); + static_assert((std::is_same<std::wstring, std::basic_string<wchar_t> >::value), ""); #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS - typedef std::u16string test3; - typedef std::u32string test4; + static_assert((std::is_same<std::u16string, std::basic_string<char16_t> >::value), ""); + static_assert((std::is_same<std::u32string, std::basic_string<char32_t> >::value), ""); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS } |