[libclang] Determinize order of platform availability attrs
Previously this code was doing std::sort on IdentifierInfo pointers. Now it sorts alphabetically by platform name. This should de-flake clang/test/Index/availability.c, which was failing non-deterministically for me. llvm-svn: 310138
This commit is contained in:
parent
cefb333582
commit
e6cde14416
|
@ -7303,7 +7303,8 @@ static void getCursorPlatformAvailabilityForDecl(
|
|||
|
||||
std::sort(AvailabilityAttrs.begin(), AvailabilityAttrs.end(),
|
||||
[](AvailabilityAttr *LHS, AvailabilityAttr *RHS) {
|
||||
return LHS->getPlatform() > RHS->getPlatform();
|
||||
return LHS->getPlatform()->getName() <
|
||||
RHS->getPlatform()->getName();
|
||||
});
|
||||
ASTContext &Ctx = D->getASTContext();
|
||||
auto It = std::unique(
|
||||
|
|
Loading…
Reference in New Issue