Get rid of a bunch of 'unused variable' warnings in test when run with debug_level set. NFC

llvm-svn: 359672
This commit is contained in:
Marshall Clow 2019-05-01 11:25:58 +00:00
parent 7244437050
commit ccbe567f46
5 changed files with 8 additions and 4 deletions

View File

@ -52,7 +52,7 @@ int main(int, char**)
#ifdef _LIBCPP_DEBUG
{
std::string s;
char c = s.back();
(void) s.back();
assert(false);
}
#endif

View File

@ -52,7 +52,7 @@ int main(int, char**)
#ifdef _LIBCPP_DEBUG
{
std::string s;
char c = s.front();
(void) s.front();
assert(false);
}
#endif

View File

@ -29,6 +29,7 @@ int main(int, char**)
S s1;
S s2;
bool b = s1.begin() < s2.begin();
(void) b;
assert(false);
}
#if TEST_STD_VER >= 11
@ -37,6 +38,7 @@ int main(int, char**)
S s1;
S s2;
bool b = s1.begin() < s2.begin();
(void) b;
assert(false);
}
#endif

View File

@ -29,6 +29,7 @@ int main(int, char**)
S s1;
S s2;
int i = s1.begin() - s2.begin();
(void) i;
assert(false);
}
#if TEST_STD_VER >= 11
@ -37,6 +38,7 @@ int main(int, char**)
S s1;
S s2;
int i = s1.begin() - s2.begin();
(void) i;
assert(false);
}
#endif

View File

@ -28,7 +28,7 @@ int main(int, char**)
typedef std::string C;
C c(1, '\0');
C::iterator i = c.end();
char j = *i;
(void) *i;
assert(false);
}
#if TEST_STD_VER >= 11
@ -36,7 +36,7 @@ int main(int, char**)
typedef std::basic_string<char, std::char_traits<char>, min_allocator<char>> C;
C c(1, '\0');
C::iterator i = c.end();
char j = *i;
(void) *i;
assert(false);
}
#endif