george.karpenkov added inline comments.
================ Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:527 private: + bool shouldSuppressOnAtomicReferenceCountingPointers( + const Stmt *S, const LocationContext *CurrentLC); ---------------- Docstring. ================ Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2847 + + AtomicExpr::AtomicOp Op = AE->getOp(); + if (Op != AtomicExpr::AO__c11_atomic_fetch_add && ---------------- IMO would be slightly easier to read with logic reversed, e.g. ``` if (AE == dyn_cast<>(...)) if (Op == add || Op == sub) for (...) if (...) return true return false ``` But this is a preference and can be ignored. ================ Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2899 + // to find out if a likely-false-positive suppression should kick in. + for (const LocationContext *LC = CurrentLC; LC; LC = LC->getParent()) { + if (isa<CXXDestructorDecl>(LC->getDecl())) { ---------------- I'm not sure what is going on here. We are just traversing the stack frame, finding the first destructor in the `isReleased` branch? Repository: rC Clang https://reviews.llvm.org/D43791 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits