Skip to content

Commit 73681a4

Browse files
Hubert Tonghubert-reinterpretcast
authored andcommitted
NFC: Use range-based for loop in test
1 parent f624384 commit 73681a4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

libcxxabi/test/test_demangle.pass.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30407,13 +30407,15 @@ void test_xfail_cases()
3040730407
{
3040830408
std::size_t len = 0;
3040930409
char* buf = nullptr;
30410-
for (const char* const* it = xfail_cases; *it; ++it)
30410+
for (auto c_str : xfail_cases)
3041130411
{
30412+
if (!c_str)
30413+
break;
3041230414
int status;
30413-
char* demang = __cxxabiv1::__cxa_demangle(*it, buf, &len, &status);
30415+
char* demang = __cxxabiv1::__cxa_demangle(c_str, buf, &len, &status);
3041430416
if (status != -2)
3041530417
{
30416-
std::printf("%s was documented as xfail but passed\n", *it);
30418+
std::printf("%s was documented as xfail but passed\n", c_str);
3041730419
std::printf("Got status = %d\n", status);
3041830420
assert(status == -2);
3041930421
}

0 commit comments

Comments
 (0)