From bdc000ea50e30651f86bff31b440dfdc9ec1c24b Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Thu, 28 Feb 2019 01:12:27 +0000 Subject: [clang][index-while-building][NFC] Comment about implementation detail in FileIndexRecord llvm-svn: 355061 --- clang/lib/Index/FileIndexRecord.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Index/FileIndexRecord.cpp') diff --git a/clang/lib/Index/FileIndexRecord.cpp b/clang/lib/Index/FileIndexRecord.cpp index f968700f503..dd5ad71771d 100644 --- a/clang/lib/Index/FileIndexRecord.cpp +++ b/clang/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)); } -- cgit v1.2.3