diff options
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 6bd9d738738..7e2380ea7b8 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -1044,7 +1044,7 @@ bool CursorVisitor::VisitObjCContainerDecl(ObjCContainerDecl *D) { } // Now sort the Decls so that they appear in lexical order. - llvm::sort(DeclsInContainer.begin(), DeclsInContainer.end(), + llvm::sort(DeclsInContainer, [&SM](Decl *A, Decl *B) { SourceLocation L_A = A->getBeginLoc(); SourceLocation L_B = B->getBeginLoc(); @@ -7803,11 +7803,11 @@ static void getCursorPlatformAvailabilityForDecl( if (AvailabilityAttrs.empty()) return; - llvm::sort(AvailabilityAttrs.begin(), AvailabilityAttrs.end(), + llvm::sort(AvailabilityAttrs, [](AvailabilityAttr *LHS, AvailabilityAttr *RHS) { return LHS->getPlatform()->getName() < RHS->getPlatform()->getName(); - }); + }); ASTContext &Ctx = D->getASTContext(); auto It = std::unique( AvailabilityAttrs.begin(), AvailabilityAttrs.end(), |