[PATCH] D16008: [clang-tidy] Add calling virtual functions in constructors/destructors check.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 12 06:34:13 PST 2016

hokein added a comment.

In http://reviews.llvm.org/D16008#322811, @Eugene.Zelenko wrote:

> This check is duplicate of clang-analyzer-alpha.cplusplus.VirtualCall.

Oops... Didn't notice there is an implementation already.

> From my point of view, Clang-tidy is better place, since such calls doesn't depend of run-time paths.


> I think will be good idea to try to establish better functionality separation between Clang/Clang-tidy/Clang Static Analyzer. Current situation looks like different teams try to take everything coming to them without considering big picture. This my impression based on including padding check in Clang Static Analyzer.


> I may be wrong, but Clang seems even better place for such warnings.

However clang-tidy has a ' clang-analyzer-*' check option to run the clang static analyzer check. I'm not sure whether it's worthwhile to move `VirtualCall` check to the module in clang-tidy.



More information about the cfe-commits mailing list