[clang-tools-extra] [clang-tidy] Extend `performance-faster-string-find` to handle ternary operator arguments (PR #187069)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 22 11:31:53 PDT 2026
================
@@ -42,6 +38,16 @@ makeCharacterLiteral(const StringLiteral *Literal) {
return Result;
}
+template <typename T>
+static bool forAllLeavesOfTernaryTree(const Expr *Node, const T &HandleLeaf) {
----------------
localspook wrote:
That sounds right: https://github.com/llvm/llvm-project/blob/ca3d04561ba8686bb6dd094190a1f49f59ace652/clang-tools-extra/test/clang-tidy/checkers/modernize/use-string-view.cpp#L138-L141
Moved it into `ASTUtils.h`.
https://github.com/llvm/llvm-project/pull/187069
More information about the cfe-commits
mailing list