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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310138
91177308-0d34-0410-b5e6-
96231b3b80d8
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(