From 49f67ce4b3ec401bbc3591dd7b4fd443fbced874 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 26 Aug 2010 13:48:20 +0000 Subject: Move the sorting of code-completion results out of the main path and into the clients, e.g., the printing code-completion consumer and c-index-test. Clients may want to re-sort the results anyway. Provide a libclang function that sorts the results. 3rd try. How embarrassing. llvm-svn: 112180 --- clang/include/clang-c/Index.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'clang/include/clang-c') diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 9b80d9f3a55..9abaa516a07 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -2349,6 +2349,17 @@ CXCodeCompleteResults *clang_codeCompleteAt(CXTranslationUnit TU, unsigned num_unsaved_files, unsigned options); +/** + * \brief Sort the code-completion results in case-insensitive alphabetical + * order. + * + * \param Results The set of results to sort. + * \param NumResults The number of results in \p Results. + */ +CINDEX_LINKAGE +void clang_sortCodeCompletionResults(CXCompletionResult *Results, + unsigned NumResults); + /** * \brief Free the given set of code-completion results. */ -- cgit v1.2.3