zaks.anna added a comment. Thanks! A couple of minor comments below.
================ Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:699 + // We cannot place diagnostics on autosynthesized code. + // Put them onto the call site through which we jumped into autosynthesized + // code for the first time. ---------------- Nit: You could probably factor this into a nicely named helper function. ================ Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:704 + const LocationContext *ParentLC = LC->getParent(); + while (ParentLC->getAnalysisDeclContext()->isBodyAutosynthesized()) { + LC = ParentLC; ---------------- Is ParentLC guaranteed never to be null? I would prefer checking for it inside the while. Even if it is not likely to happen now, the code could evolve to handle more cases.. ================ Comment at: lib/StaticAnalyzer/Core/PathDiagnostic.cpp:932 + MD->isPropertyAccessor() && + CalleeCtx->getAnalysisDeclContext()->isBodyAutosynthesized()); } ---------------- There was a case where we wanted to produce events for auto synthesized code, could you add a comment on what they were? (Otherwise, it's not clear why we need the isPropertyAccessor check.) https://reviews.llvm.org/D32437 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits