[clang-tools-extra] [clang-tidy] Extend `performance-prefer-single-char-overloads` to handle ternary operator arguments (PR #187069)
Yanzuo Liu via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 17 00:47:19 PDT 2026
================
@@ -55,8 +52,7 @@ void PreferSingleCharOverloadsCheck::storeOptions(
}
void PreferSingleCharOverloadsCheck::registerMatchers(MatchFinder *Finder) {
- const auto SingleChar =
- ignoringParenCasts(stringLiteral(hasSize(1)).bind("literal"));
+ const auto SingleChar = expr().bind("literal");
----------------
zwuis wrote:
```
expr(hasType(...))
```
What about this perf improvement?
https://github.com/llvm/llvm-project/pull/187069
More information about the cfe-commits
mailing list