diff --git a/testing/file_test/file_test_base.cpp b/testing/file_test/file_test_base.cpp index 5153e288472f8..2d71544209442 100644 --- a/testing/file_test/file_test_base.cpp +++ b/testing/file_test/file_test_base.cpp @@ -486,8 +486,9 @@ static auto ReplaceContentKeywords(llvm::StringRef filename, if (auto ext_dot = test_name.find("."); ext_dot != llvm::StringRef::npos) { test_name = test_name.substr(0, ext_dot); } - while (test_name.consume_front("fail_") || test_name.consume_front("todo_")) { - } + test_name.consume_front("todo_"); + test_name.consume_front("fail_"); + test_name.consume_front("todo_"); while (keyword_pos != std::string::npos) { static constexpr llvm::StringLiteral TestName = "[[@TEST_NAME]]";