salman-javed-nz added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp:63-73 +static clang::CharSourceRange getReplaceRange(const ExplicitCastExpr *Expr) { + if (const auto *CastExpr = dyn_cast<CStyleCastExpr>(Expr)) { + return CharSourceRange::getCharRange( + CastExpr->getLParenLoc(), + CastExpr->getSubExprAsWritten()->getBeginLoc()); + } else if (const auto *CastExpr = dyn_cast<CXXFunctionalCastExpr>(Expr)) { + return CharSourceRange::getCharRange(CastExpr->getBeginLoc(), ---------------- Looks much better than my suggested change. Good stuff. ================ Comment at: clang-tools-extra/docs/ReleaseNotes.rst:139 +- Updated ``google-readability-casting`` to diagnose and fix functional casts, to achieve feature + parity with the corresponding ``cpplint.py`` check. ---------------- Should this be like the ``` :doc:`bugprone-suspicious-memory-comparison <clang-tidy/checks/bugprone-suspicious-memory-comparison>` ``` a few lines above. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114427/new/ https://reviews.llvm.org/D114427 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits