r355061 - [clang][index-while-building][NFC] Comment about implementation detail in FileIndexRecord

Jan Korous via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 27 17:12:27 PST 2019


Author: jkorous
Date: Wed Feb 27 17:12:27 2019
New Revision: 355061

URL: http://llvm.org/viewvc/llvm-project?rev=355061&view=rev
Log:
[clang][index-while-building][NFC] Comment about implementation detail in FileIndexRecord

Modified:
    cfe/trunk/lib/Index/FileIndexRecord.cpp

Modified: cfe/trunk/lib/Index/FileIndexRecord.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/FileIndexRecord.cpp?rev=355061&r1=355060&r2=355061&view=diff
==============================================================================
--- cfe/trunk/lib/Index/FileIndexRecord.cpp (original)
+++ cfe/trunk/lib/Index/FileIndexRecord.cpp Wed Feb 27 17:12:27 2019
@@ -35,6 +35,7 @@ void FileIndexRecord::addDeclOccurence(S
   }
 
   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));
 }




More information about the cfe-commits mailing list