NoQ added inline comments. ================ Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:3866 @@ -3865,3 +3865,3 @@ if (LCtx->getAnalysisDeclContext()->isBodyAutosynthesized()) { - assert(LCtx->getParent()); + assert(LCtx->inTopFrame() || LCtx->getParent()); return; ---------------- Hmm. This assert is trivially true and can be omitted.
However, the assert here has a reason: we clearly shouldn't be trying to analyze synthesized bodies as top-level functions. Because any errors we find this way would never have any tiniest thing to do with the code we've been asked to analyze by the user. So i think this problem could use a little bit more attention. Also, i think the correct way to write this assert would be `!LCtx->inTopFrame()` (which would be compatible with `ScopeContext` whenever we have it). Repository: rL LLVM https://reviews.llvm.org/D24792 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits