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];