lebedev.ri added a comment. In https://reviews.llvm.org/D33365#775860, @alexfh wrote:
> I guess, this check should go to `readability` or elsewhere, but definitely > not to `misc`. Hmm, `misc` may be a bad place for this, but i think `readability` is even worse fit. The best guess would be something like `hardening` / `security`, but there is no such category. > Another big question is whether it's reasonable to set up specific ratio > limits on the density of asserts. I think, density of asserts strongly > depends on the nature of the code, and there is no single answer to how much > asserts should be used. IIUC, neither of the recommendations you mentioned > contain any quantitative measures, they just delegate the decision to the > developer. No, it is not reasonable to set up **default** ratio limits on the density of asserts. That is exactly why the default params are NOP, and i even made sure that if the params are NOP, this check will not add any overhead (no PPCallback, no matchers). Did that answer your question? > I'm not saying it's impossible to find good formalization of these rules, but > I'd expect some sort of analysis of existing codebases with regard to how > asserts are used (not just the density of asserts, but also positioning of > asserts and what is being checked by the asserts) in different types of code. Repository: rL LLVM https://reviews.llvm.org/D33365 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits