[PATCH] D45601: Warn on bool* to bool conversion
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 17 11:17:47 PDT 2018
efriedma added a comment.
The thing about the bool*-only version is that bool pointers are rare in C++, so I'm not sure we're gaining much. But if we can't do something more general, there's still some benefit.
I see your point about false positives for the more general version. I was sort of considering an attribute to allow implicit conversions to bool for a specific function (like an assertion), and then we could ban implicit conversions to bool for parameters to other functions. But that's probably overkill.
https://reviews.llvm.org/D45601
More information about the cfe-commits
mailing list