[PATCH] D114427: [clang-tidy] Warn on functional C-style casts
Carlos Galvez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 27 09:02:57 PST 2021
carlosgalvezp added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp:122
+ ? getReplaceRange(dyn_cast<const CStyleCastExpr>(CastExpr))
+ : getReplaceRange(dyn_cast<const CXXFunctionalCastExpr>(CastExpr));
----------------
One problem I see here is in the future someone adds a 3rd class of casts - then this should become an if-else. That's why I had it like that before, but perhaps it's too "defensive" at this point.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114427/new/
https://reviews.llvm.org/D114427
More information about the cfe-commits
mailing list