diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index caa0b7464398..1ad8ee3469b1 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -8938,10 +8938,10 @@ QualType Sema::CheckComparisonCategoryType(ComparisonCategoryType Kind, // If lookup failed if (!Info) { - auto NameForDiags = - llvm::Twine("std::") + ComparisonCategories::getCategoryString(Kind); + std::string NameForDiags = "std::"; + NameForDiags += ComparisonCategories::getCategoryString(Kind); Diag(Loc, diag::err_implied_comparison_category_type_not_found) - << NameForDiags.str(); + << NameForDiags; return QualType(); }