From: Jan Korous Date: Thu, 28 Feb 2019 01:12:27 +0000 (+0000) Subject: [clang][index-while-building][NFC] Comment about implementation detail in FileIndexRecord X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=868d5cc1e7ae0c2b8295e1781ca58eba2bc251f8;p=clang [clang][index-while-building][NFC] Comment about implementation detail in FileIndexRecord git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355061 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Index/FileIndexRecord.cpp b/lib/Index/FileIndexRecord.cpp index f968700f50..dd5ad71771 100644 --- a/lib/Index/FileIndexRecord.cpp +++ b/lib/Index/FileIndexRecord.cpp @@ -35,6 +35,7 @@ void FileIndexRecord::addDeclOccurence(SymbolRoleSet Roles, unsigned Offset, } DeclOccurrence NewInfo(Roles, Offset, D, Relations); + // We keep Decls in order as we need to access them in this order in all cases. auto It = std::upper_bound(Decls.begin(), Decls.end(), NewInfo); Decls.insert(It, std::move(NewInfo)); }