mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 10:07:41 +08:00
[libcxx] [test] Fix Clang -Wunused-local-typedef, part 2/3.
These typedefs were completely unused. Fixes D29136. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294155 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -29,7 +29,6 @@ test(It first, It last)
|
||||
{
|
||||
typedef typename std::iterator_traits<It>::value_type charT;
|
||||
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
|
||||
typedef typename S::traits_type T;
|
||||
typedef typename S::allocator_type A;
|
||||
S s2(first, last);
|
||||
LIBCPP_ASSERT(s2.__invariants());
|
||||
@@ -47,7 +46,6 @@ test(It first, It last, const A& a)
|
||||
{
|
||||
typedef typename std::iterator_traits<It>::value_type charT;
|
||||
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
|
||||
typedef typename S::traits_type T;
|
||||
S s2(first, last, a);
|
||||
LIBCPP_ASSERT(s2.__invariants());
|
||||
assert(s2.size() == static_cast<std::size_t>(std::distance(first, last)));
|
||||
|
@@ -56,7 +56,6 @@ int main()
|
||||
{
|
||||
{
|
||||
typedef test_allocator<char> A;
|
||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
||||
|
||||
test("");
|
||||
test("", A(2));
|
||||
@@ -73,7 +72,6 @@ int main()
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef min_allocator<char> A;
|
||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
||||
|
||||
test("");
|
||||
test("", A());
|
||||
|
@@ -53,7 +53,6 @@ int main()
|
||||
{
|
||||
{
|
||||
typedef test_allocator<char> A;
|
||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
||||
|
||||
test("", 0);
|
||||
test("", 0, A(2));
|
||||
@@ -70,7 +69,6 @@ int main()
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef min_allocator<char> A;
|
||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
||||
|
||||
test("", 0);
|
||||
test("", 0, A());
|
||||
|
@@ -26,7 +26,6 @@ void
|
||||
test(unsigned n, charT c)
|
||||
{
|
||||
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
|
||||
typedef typename S::traits_type T;
|
||||
typedef typename S::allocator_type A;
|
||||
S s2(n, c);
|
||||
LIBCPP_ASSERT(s2.__invariants());
|
||||
@@ -42,7 +41,6 @@ void
|
||||
test(unsigned n, charT c, const A& a)
|
||||
{
|
||||
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
|
||||
typedef typename S::traits_type T;
|
||||
S s2(n, c, a);
|
||||
LIBCPP_ASSERT(s2.__invariants());
|
||||
assert(s2.size() == n);
|
||||
@@ -58,7 +56,6 @@ test(Tp n, Tp c)
|
||||
{
|
||||
typedef char charT;
|
||||
typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
|
||||
typedef typename S::traits_type T;
|
||||
typedef typename S::allocator_type A;
|
||||
S s2(n, c);
|
||||
LIBCPP_ASSERT(s2.__invariants());
|
||||
@@ -75,7 +72,6 @@ test(Tp n, Tp c, const A& a)
|
||||
{
|
||||
typedef char charT;
|
||||
typedef std::basic_string<charT, std::char_traits<charT>, A> S;
|
||||
typedef typename S::traits_type T;
|
||||
S s2(n, c, a);
|
||||
LIBCPP_ASSERT(s2.__invariants());
|
||||
assert(s2.size() == static_cast<std::size_t>(n));
|
||||
@@ -89,7 +85,6 @@ int main()
|
||||
{
|
||||
{
|
||||
typedef test_allocator<char> A;
|
||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
||||
|
||||
test(0, 'a');
|
||||
test(0, 'a', A(2));
|
||||
@@ -109,7 +104,6 @@ int main()
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef min_allocator<char> A;
|
||||
typedef std::basic_string<char, std::char_traits<char>, A> S;
|
||||
|
||||
test(0, 'a');
|
||||
test(0, 'a', A());
|
||||
|
@@ -98,7 +98,6 @@ void
|
||||
test(S str, unsigned pos, unsigned n, const typename S::allocator_type& a)
|
||||
{
|
||||
typedef typename S::traits_type T;
|
||||
typedef typename S::allocator_type A;
|
||||
|
||||
if (pos <= str.size())
|
||||
{
|
||||
|
Reference in New Issue
Block a user