Skip to content

Commit 5f074ec

Browse files
committed
[rust] Fix ICE on GCC 5.4
1 parent 487598f commit 5f074ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Support/UnicodeNameToCodepoint.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ nearestMatchesForCodepointName(StringRef Pattern, std::size_t MaxMatchesCount) {
499499
// Filling (and overriding) the matrix for the name fragment of each node
500500
// iteratively. CompleteName is used to collect the actual name of potential
501501
// match, respecting case and spacing.
502-
auto VisitNode = [&](const Node &N, std::size_t Row,
503-
auto &VisitNode) -> void {
502+
std::function<void(const Node &, std::size_t)> VisitNode;
503+
VisitNode = [&](const Node &N, std::size_t Row) -> void {
504504
std::size_t J = 0;
505505
for (; J < N.Name.size(); J++) {
506506
if (!isAlnum(N.Name[J]))
@@ -533,15 +533,15 @@ nearestMatchesForCodepointName(StringRef Pattern, std::size_t MaxMatchesCount) {
533533
ChildOffset += C.Size;
534534
if (!C.isValid())
535535
break;
536-
VisitNode(C, Row, VisitNode);
536+
VisitNode(C, Row);
537537
if (!C.HasSibling)
538538
break;
539539
}
540540
}
541541
};
542542

543543
Node Root = createRoot();
544-
VisitNode(Root, 1, VisitNode);
544+
VisitNode(Root, 1);
545545
return Matches;
546546
}
547547

0 commit comments

Comments
 (0)