[clang-tools-extra] [clang-tidy] Fix invalid avoid-c-style-cast fix-it after keywords (PR #206239)

Zeyi Xu via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 27 04:19:20 PDT 2026


================
@@ -69,6 +69,28 @@ static CharSourceRange getReplaceRange(const ExplicitCastExpr *Expr) {
   llvm_unreachable("Unsupported CastExpr");
 }
 
+static bool needsLeadingSpace(CharSourceRange Range, StringRef ReplacementText,
----------------
zeyi2 wrote:

This basically mimics https://github.com/llvm/llvm-project/pull/202365. I plan to move these helpers into a shared clang-tidy utility in a follow-up PR, so future checks can reuse the token-boundary handling logic (if needed).

https://github.com/llvm/llvm-project/pull/206239


More information about the cfe-commits mailing list