rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land.
Changes LGTM on the Clang side. In D76572#1935791 <https://reviews.llvm.org/D76572#1935791>, @lebedev.ri wrote: > Passing-by remark: > > > I wrote a Clang warning [not pictured] to diagnose any use of `T(x)` which > > was not equivalent to `static_cast<T>(x)`. > > I'm not sure whether or not this will pass the bar for a clang diagnostic I'd like to try it out on a larger codebase, but it sounds at least potentially good to me. There's a simple syntactic workaround (use `(T)x` instead of `T(x)`), and there's a high likelihood that the code doesn't mean what the programmer intended. Does the warning catch the cases where the code is equivalent to `static_cast<T>(x)` except that it ignores access? That seems like a really good thing to warn on regardless of whether we warn on the general case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76572/new/ https://reviews.llvm.org/D76572 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits