================
@@ -2927,6 +2927,17 @@ class LifetimeSafetyReporterImpl : public
LifetimeSafetyReporter {
<< EscapeExpr->getSourceRange();
}
+ void reportNoescapeViolation(const ParmVarDecl *ParmWithNoescape,
+ const Expr *EscapeExpr) override {
+ S.Diag(ParmWithNoescape->getBeginLoc(),
----------------
vbvictor wrote:
> Does this work when the attribute is behind a macro?
Currently no, `FIX-IT unable to apply suggested code changes in a macro`
> Also, what about other spellings of the attribute like __attribute__((....))?
It only removes `noescape` part, which makes `__attribute__(())`. It compiles
but clearly this isn't good code. So we need to adjust for this spelling too.
If I try to make robust fixes, I think the patch will bloat too much with just
fixit logic, maybe its is better to handle in a follow-up patch, WDYT? If that
is the case, I will undo all fixits for now.
https://github.com/llvm/llvm-project/pull/177260
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits