dcoughlin added inline comments.
================ Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:3960-3971 + for (unsigned idx = 0, e = FD->getNumParams(); idx != e; ++idx) { + const ParmVarDecl *Param = FD->getParamDecl(idx); + SymbolRef Sym = state->getSVal(state->getRegion(Param, LCtx)).getAsSymbol(); + + QualType Ty = Param->getType(); + if (hasRCAnnotation(Param, "rc_ownership_consumed")) + state = setRefBinding(state, Sym, ---------------- malhar1995 wrote: > Getting function summary and checking for `ArgEffects` doesn't seem like an > option to me as currently there is no way to differentiate between Core > Foundation and Generalized objects just by looking at their ArgEffects. > > However, this loop results in `check-clang-analysis` failure in > `retain-release.m` on lines `1140` and `2237`. You can differentiate based on the Type of the parameter and use ArgEffects to determine what the initial ref binding should be. I'd like there to be a single point of truth about what it means for a parameter to annotated. Repository: rL LLVM https://reviews.llvm.org/D36441 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits