================ @@ -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 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
