From 868d5cc1e7ae0c2b8295e1781ca58eba2bc251f8 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 28 Feb 2019 01:12:27 +0000 Subject: [PATCH] [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 --- lib/Index/FileIndexRecord.cpp | 1 + 1 file changed, 1 insertion(+) 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)); } -- 2.50.1