summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/FileIndexRecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Index/FileIndexRecord.cpp')
-rw-r--r--clang/lib/Index/FileIndexRecord.cpp1
1 files changed, 1 insertions, 0 deletions
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));
}
OpenPOWER on IntegriCloud