]> granicus.if.org Git - clang/commitdiff
[clang][index-while-building][NFC] Comment about implementation detail in FileIndexRecord
authorJan Korous <jkorous@apple.com>
Thu, 28 Feb 2019 01:12:27 +0000 (01:12 +0000)
committerJan Korous <jkorous@apple.com>
Thu, 28 Feb 2019 01:12:27 +0000 (01:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@355061 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Index/FileIndexRecord.cpp

index f968700f503bc4abbf451504650d54e0db535c02..dd5ad71771dfe4eb25d75dd7d86e8e86743fb252 100644 (file)
@@ -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));
 }