NoQ added inline comments.
================ Comment at: lib/StaticAnalyzer/Checkers/MagentaHandleChecker.cpp:483-498 +void MagentaHandleChecker::checkPreStmt(const ReturnStmt *RS, + CheckerContext &Ctx) const { + ProgramStateRef State = Ctx.getState(); + const StackFrameContext *SFCtx = Ctx.getStackFrame(); + if (!SFCtx || !SFCtx->inTopFrame()) + return; + const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(SFCtx->getDecl()); ---------------- I think the analyzer core should do this. This code already has a global effect on the analysis - it's enough for one checker to generate the sink. Additionally, there's also the CFG-based variant of suppress-on-sink, which would need to be extended to support this as well - this other variant kicks in when the analysis was interrupted before reaching the sink (see D35673 and D35674). https://reviews.llvm.org/D36251 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits