diff --git a/tools/swift-ide-test/swift-ide-test.cpp b/tools/swift-ide-test/swift-ide-test.cpp index 37a796f7b51..78e7c1833be 100644 --- a/tools/swift-ide-test/swift-ide-test.cpp +++ b/tools/swift-ide-test/swift-ide-test.cpp @@ -1379,7 +1379,7 @@ printCodeCompletionLookedupTypeNames(ArrayRef names, sortedNames.append(names.begin(), names.end()); llvm::sort(sortedNames, [](NullTerminatedStringRef a, NullTerminatedStringRef b) { - return a.compare(b) <= 0; + return a.compare(b) < 0; }); OS << "LookedupTypeNames: ["; diff --git a/validation-test/IDE/crashers_fixed/14fef9539c874eb2.swift b/validation-test/IDE/crashers_fixed/14fef9539c874eb2.swift new file mode 100644 index 00000000000..df037d89be6 --- /dev/null +++ b/validation-test/IDE/crashers_fixed/14fef9539c874eb2.swift @@ -0,0 +1,4 @@ +// {"kind":"complete","signature":"void std::__1::__introsort, llvm::raw_ostream&)::$_0&, swift::NullTerminatedStringRef*, false>(swift::NullTerminatedStringRef*, swift::NullTerminatedStringRef*, printCodeCompletionLookedupTypeNames(llvm::ArrayRef, llvm::raw_ostream&)::$_0&, std::__1::iterator_traits::difference_type, bool)"} +// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s +{ +$1 == [$1 ]#^^# diff --git a/validation-test/IDE/crashers/539adae64314fae.swift b/validation-test/IDE/crashers_fixed/539adae64314fae.swift similarity index 68% rename from validation-test/IDE/crashers/539adae64314fae.swift rename to validation-test/IDE/crashers_fixed/539adae64314fae.swift index d0bcd7f7763..c7c0c9146e1 100644 --- a/validation-test/IDE/crashers/539adae64314fae.swift +++ b/validation-test/IDE/crashers_fixed/539adae64314fae.swift @@ -1,8 +1,5 @@ -// {"kind":"complete","signature":"void std::__1::__introsort, llvm::raw_ostream&)::$_0&, swift::NullTerminatedStringRef*, false>(swift::NullTerminatedStringRef*, swift::NullTerminatedStringRef*, printCodeCompletionLookedupTypeNames(llvm::ArrayRef, llvm::raw_ostream&)::$_0&, std::__1::iterator_traits::difference_type, bool)","useGuardMalloc":true} -// RUN: env DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s -// REQUIRES: OS=macosx -// REQUIRES: no_asan -// REQUIRES: target-same-as-host +// {"kind":"complete","signature":"void std::__1::__introsort, llvm::raw_ostream&)::$_0&, swift::NullTerminatedStringRef*, false>(swift::NullTerminatedStringRef*, swift::NullTerminatedStringRef*, printCodeCompletionLookedupTypeNames(llvm::ArrayRef, llvm::raw_ostream&)::$_0&, std::__1::iterator_traits::difference_type, bool)"} +// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s struct a, llvm::raw_ostream&)::$_0&, swift::NullTerminatedStringRef*, false>(swift::NullTerminatedStringRef*, swift::NullTerminatedStringRef*, printCodeCompletionLookedupTypeNames(llvm::ArrayRef, llvm::raw_ostream&)::$_0&, std::__1::iterator_traits::difference_type, bool)"} +// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s +(.1.a - a)#^^#