r331713 - [C++2a] operator<=>: Fix incorrect use of Twine.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Mon May 7 19:28:47 PDT 2018


Author: ericwf
Date: Mon May  7 19:28:47 2018
New Revision: 331713

URL: http://llvm.org/viewvc/llvm-project?rev=331713&view=rev
Log:
[C++2a] operator<=>: Fix incorrect use of Twine.

Modified:
    cfe/trunk/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=331713&r1=331712&r2=331713&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Mon May  7 19:28:47 2018
@@ -8938,10 +8938,10 @@ QualType Sema::CheckComparisonCategoryTy
 
   // 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();
   }
 




More information about the cfe-commits mailing list