From 3b08630b06a41235f4f9bba302ff3a643cca943f Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Thu, 8 Oct 2009 23:45:10 +0000 Subject: - Fixup SortCodeCompleteResult() to properly sort keywords on Mac OS (compare was system dependent). Worked on Linux, failed on Mac OS (which caused the recently added testcase to fail on Linux). - Sort results in testcase. llvm-svn: 83597 --- clang/lib/Sema/SemaCodeComplete.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaCodeComplete.cpp') diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index b6487026501..d7697a7333a 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -986,7 +986,7 @@ namespace { Y.Declaration->getDeclName()); case Result::RK_Keyword: - return strcmp(X.Keyword, Y.Keyword) == -1; + return strcmp(X.Keyword, Y.Keyword) < 0; } // Silence GCC warning. -- cgit v1.2.3