[clang-tools-extra] [clang-tidy] Temp fix for assert in performance-string-view-conversions (PR #179027)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 31 08:00:13 PST 2026


================
@@ -92,7 +92,8 @@ void StringViewConversionsCheck::check(const MatchFinder::MatchResult &Result) {
   // Sanity check. Verify that the redundant expression is the direct source of
   // the argument, not part of a larger expression (e.g., std::string(sv) +
   // "bar").
-  assert(ParamExpr->getSourceRange() == RedundantExpr->getSourceRange());
+  if (ParamExpr->getSourceRange() != RedundantExpr->getSourceRange())
+    return;
----------------
vbvictor wrote:

If it's a temporary fix, can we leave a FIXME?

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


More information about the cfe-commits mailing list