[clang-tools-extra] [clang-tidy][NFC] Fix miscellaneous clang-tidy warnings over codebase (PR #164096)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 18 11:00:18 PDT 2025
================
@@ -288,8 +288,8 @@ static bool applyDiceHeuristic(StringRef Arg, StringRef Param,
std::size_t Intersection = 0;
// Find the intersection between the two sets.
- for (auto IT = ParamBigrams.begin(); IT != ParamBigrams.end(); ++IT)
- Intersection += ArgBigrams.count((IT->getKey()));
+ for (const auto &[Key, Value] : ParamBigrams)
----------------
localspook wrote:
How do you feel about:
```suggestion
for (const auto &[Key, _] : ParamBigrams)
```
There's a readability benefit (it communicates that `Value` isn't used) but possibly also a downside (it becomes unclear what this second variable is).
https://github.com/llvm/llvm-project/pull/164096
More information about the cfe-commits
mailing list