[clang-tools-extra] [clang-tidy] `use-ranges`: preserve used `unique` results (PR #196035)
Daniil Dudkin via cfe-commits
cfe-commits at lists.llvm.org
Sat May 30 14:28:51 PDT 2026
================
@@ -191,6 +192,33 @@ static void removeFunctionArgs(DiagnosticBuilder &Diag, const CallExpr &Call,
}
}
+static bool isResultUsed(const DynTypedNode &Node,
+ const ast_matchers::MatchFinder::MatchResult &Result) {
+ const DynTypedNodeList Parents = Result.Context->getParents(Node);
+ if (Parents.size() != 1)
+ return true;
----------------
unterumarmung wrote:
It shoudl've been an assert. And I converted it into one. Thanks!
https://github.com/llvm/llvm-project/pull/196035
More information about the cfe-commits
mailing list