[clang] [LifetimeSafety] Add report on misuse of clang::noescape (PR #177260)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 25 12:54:09 PST 2026
================
@@ -2927,6 +2927,17 @@ class LifetimeSafetyReporterImpl : public LifetimeSafetyReporter {
<< EscapeExpr->getSourceRange();
}
+ void reportNoescapeViolation(const ParmVarDecl *ParmWithNoescape,
+ const Expr *EscapeExpr) override {
+ S.Diag(ParmWithNoescape->getBeginLoc(),
----------------
usx95 wrote:
\+1 to doing this in another patch or even reconsidering this.
I highly doubt that this is going to be useful in practice without support of MACROS (which I believe is not worth the complexity).
https://github.com/llvm/llvm-project/pull/177260
More information about the cfe-commits
mailing list