From e265281305eeb3b54f0c282cf51fed4c338877bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C4=81vis=20Mos=C4=81ns?= Date: Wed, 27 Mar 2019 00:00:52 +0200 Subject: [PATCH] Sort entries in relativeLocationAccessorImpl --- clang/TranslationUnit.d | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/TranslationUnit.d b/clang/TranslationUnit.d index c3aa0451..f37c50b6 100644 --- a/clang/TranslationUnit.d +++ b/clang/TranslationUnit.d @@ -245,6 +245,10 @@ struct TranslationUnit foreach (index, location; locations) map[location.path] ~= Entry(index, location); + import std.algorithm.sorting; + foreach (path, entries; map) + entries.sort(); + size_t findIndex(SourceLocation a) { auto entries = map[a.path];