Skip to content

Commit 6803352

Browse files
committed
More code simplification
1 parent cc44e0d commit 6803352

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

clang/lib/Sema/SemaOverload.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11165,25 +11165,25 @@ void OverloadCandidateSet::PerfectViableFunction(
1116511165

1116611166
Best = end();
1116711167
for (auto It = begin(); It != end(); ++It) {
11168-
if (It->isPerfectMatch(S.getASTContext())) {
11169-
if (Best == end()) {
11170-
Best = It;
11171-
} else {
11172-
if (Best->Function && It->Function) {
11173-
FunctionDecl *D =
11174-
S.getMoreConstrainedFunction(Best->Function, It->Function);
11175-
if (D == nullptr) {
11176-
Best = end();
11177-
break;
11178-
}
11179-
if (D == It->Function)
11180-
Best = It;
11181-
continue;
11182-
}
11168+
if (!It->isPerfectMatch(S.getASTContext()))
11169+
continue;
11170+
if (Best == end()) {
11171+
Best = It;
11172+
continue;
11173+
}
11174+
if (Best->Function && It->Function) {
11175+
FunctionDecl *D =
11176+
S.getMoreConstrainedFunction(Best->Function, It->Function);
11177+
if (D == nullptr) {
1118311178
Best = end();
1118411179
break;
1118511180
}
11181+
if (D == It->Function)
11182+
Best = It;
11183+
continue;
1118611184
}
11185+
Best = end();
11186+
break;
1118711187
}
1118811188
}
1118911189

0 commit comments

Comments
 (0)