================
@@ -156,19 +156,17 @@ void CXXArrayDeleteChecker::checkTypedDeleteExpr(
if (!N)
return;
- SmallString<256> Buf;
- llvm::raw_svector_ostream OS(Buf);
-
QualType SourceType = BaseClassRegion->getValueType();
QualType TargetType =
DerivedClassRegion->getSymbol()->getType()->getPointeeType();
- OS << "Deleting an array of '" << TargetType.getAsString()
- << "' objects as their base class '"
- << SourceType.getAsString(C.getASTContext().getPrintingPolicy())
- << "' is undefined";
-
- auto R = std::make_unique<PathSensitiveBugReport>(BT, OS.str(), N);
+ auto R = std::make_unique<PathSensitiveBugReport>(
+ BT,
+ "Deleting an array of '" + TargetType.getAsString() +
----------------
Xazax-hun wrote:
Wouldn't you still need to convert the first string literal to `Twine` to make
sure we use the `Twine`'s overloaded operators? Same for other places.
https://github.com/llvm/llvm-project/pull/205527
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits