Skip to content

Commit 84bdf9e

Browse files
committed
More code simplification
1 parent ffc769a commit 84bdf9e

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
@@ -11157,25 +11157,25 @@ void OverloadCandidateSet::PerfectViableFunction(
1115711157

1115811158
Best = end();
1115911159
for (auto It = begin(); It != end(); ++It) {
11160-
if (It->isPerfectMatch(S.getASTContext())) {
11161-
if (Best == end()) {
11162-
Best = It;
11163-
} else {
11164-
if (Best->Function && It->Function) {
11165-
FunctionDecl *D =
11166-
S.getMoreConstrainedFunction(Best->Function, It->Function);
11167-
if (D == nullptr) {
11168-
Best = end();
11169-
break;
11170-
}
11171-
if (D == It->Function)
11172-
Best = It;
11173-
continue;
11174-
}
11160+
if (!It->isPerfectMatch(S.getASTContext()))
11161+
continue;
11162+
if (Best == end()) {
11163+
Best = It;
11164+
continue;
11165+
}
11166+
if (Best->Function && It->Function) {
11167+
FunctionDecl *D =
11168+
S.getMoreConstrainedFunction(Best->Function, It->Function);
11169+
if (D == nullptr) {
1117511170
Best = end();
1117611171
break;
1117711172
}
11173+
if (D == It->Function)
11174+
Best = It;
11175+
continue;
1117811176
}
11177+
Best = end();
11178+
break;
1117911179
}
1118011180
}
1118111181

0 commit comments

Comments
 (0)