[PATCH] D114427: [clang-tidy] Warn on functional C-style casts

Salman Javed via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 29 02:12:02 PST 2021


salman-javed-nz added a comment.

I think the primary goal is satisfied - in all cases the cast is identified and a warning is generated.

For the `Widget&` case, a warning is generated but no fixit is offered, but that isn't any worse than the existing C-style cast fixits.
It does sound like a case where offering no fix is better than offering a fix that makes things worse.

What would be the right fixit for that anyway?
`Widget u = U(i);   -->   Widget u = T(i);` ?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114427/new/

https://reviews.llvm.org/D114427



More information about the cfe-commits mailing list