diff options
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
| -rw-r--r-- | clang/lib/Driver/Driver.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index a1aa4db671f..9ae33b80f88 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1198,7 +1198,11 @@ void Driver::handleAutocompletions(StringRef PassedFlags) const { // case-insensitive sorting for consistency with the -help option // which prints out options in the case-insensitive alphabetical order. std::sort(SuggestedCompletions.begin(), SuggestedCompletions.end(), - [](StringRef A, StringRef B) { return A.compare_lower(B) < 0; }); + [](StringRef A, StringRef B) { + if (int X = A.compare_lower(B)) + return X < 0; + return A.compare(B) > 0; + }); llvm::outs() << llvm::join(SuggestedCompletions, "\n") << '\n'; } |

