We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
countDistinctOverloads
1 parent 878066b commit 84b212cCopy full SHA for 84b212c
lib/Sema/ConstraintSystem.cpp
@@ -5302,12 +5302,10 @@ bool ConstraintSystem::diagnoseAmbiguityWithFixes(
5302
/// provided set.
5303
static unsigned countDistinctOverloads(ArrayRef<OverloadChoice> choices) {
5304
llvm::SmallPtrSet<void *, 4> uniqueChoices;
5305
- unsigned result = 0;
5306
for (auto choice : choices) {
5307
- if (uniqueChoices.insert(choice.getOpaqueChoiceSimple()).second)
5308
- ++result;
+ uniqueChoices.insert(choice.getOpaqueChoiceSimple());
5309
}
5310
- return result;
+ return uniqueChoices.size();
5311
5312
5313
/// Determine the name of the overload in a set of overload choices.
0 commit comments