steakhal wrote:

> Nice cleanups!
> 
> Do we have clang-tidy checks for these? It would be nice for tooling to take 
> care of all this.

There is a Static Analyzer checker, but I'm not exactly sure if it would catch 
this of the top of my head.
See 
[alpha.llvm.Conventions](https://clang.llvm.org/docs/analyzer/checkers.html#id178)

I think the Static Analyzer is anyway overkill for checking this, probably an 
easy clang-tidy check would be better for looking for implicit conversions to 
bool of a CallExpr of `dyn_cast`. One could implement it in a matter of hours.

https://github.com/llvm/llvm-project/pull/137393
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to