================ @@ -89,7 +182,25 @@ class UncountedLambdaCapturesChecker } printQuotedQualifiedName(Os, Capture.getCapturedVar()); - Os << " to uncounted type is unsafe."; + Os << " to ref-counted / CheckedPtr capable type is unsafe."; + + PathDiagnosticLocation BSLoc(Capture.getLocation(), BR->getSourceManager()); + auto Report = std::make_unique<BasicBugReport>(Bug, Os.str(), BSLoc); + BR->emitReport(std::move(Report)); + } + + void reportBugOnThisPtr(const LambdaCapture &Capture) const { + SmallString<100> Buf; + llvm::raw_svector_ostream Os(Buf); + + if (Capture.isExplicit()) { + Os << "Captured "; + } else { + Os << "Implicitly captured "; + } + + Os << "raw-pointer 'this' to ref-counted / CheckedPtr capable type is " ---------------- rniwa wrote:
Rephrased to say "ref-counted type or CheckedPtr-capable type" https://github.com/llvm/llvm-project/pull/114897 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits