[clang] [analyzer] Match dangling subobjects by their base region in DanglingPtrDeref (PR #211552)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 23 06:55:43 PDT 2026
================
@@ -99,7 +107,7 @@ DanglingPtrDerefBRVisitor::VisitNode(const ExplodedNode *N,
S, BRC.getSourceManager(), N->getStackFrame());
return std::make_shared<PathDiagnosticEventPiece>(
Pos,
- (llvm::Twine("'") + SourceRegion->getString() + "' is destroyed here")
+ (llvm::Twine() + getRegionName(SourceRegion) + " is destroyed here")
----------------
steakhal wrote:
If you wanted, you could move the Twine to the string literal on the RHS, and wrap that. It might make the line fit nicely - including `str()`.
https://github.com/llvm/llvm-project/pull/211552
More information about the cfe-commits
mailing list