[clang-tidy] Warn on functional C-style casts
The google-readability-casting check is meant to be on par with cpplint's readability/casting check, according to the documentation. However it currently does not diagnose functional casts, like: float x = 1.5F; int y = int(x); This is detected by cpplint, however, and the guidelines are clear that such a cast is only allowed when the type is a class type (constructor call): > You may use cast formats like `T(x)` only when `T` is a class type. Therefore, update the clang-tidy check to check this case. Differential Revision: https://reviews.llvm.org/D114427
Loading
Please register or sign in to comment