Skip to content

Commit 5730eb2

Browse files
committed
[test] Add some more known crashers
1 parent 1169376 commit 5730eb2

38 files changed

+222
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// {"kind":"complete","signature":"matchCallArgumentsImpl(llvm::SmallVectorImpl<swift::AnyFunctionType::Param>&, llvm::ArrayRef<swift::AnyFunctionType::Param>, swift::ParameterListInfo const&, std::__1::optional<unsigned int>, bool, swift::constraints::TrailingClosureMatching, swift::constraints::MatchCallArgumentListener&, llvm::SmallVectorImpl<llvm::SmallVector<unsigned int, 1u>>&)::$_5::operator()(unsigned int&, swift::Identifier, bool, bool) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
3+
struct a {
4+
@dynamicMemberLookup enum b {
5+
subscript <c>(dynamicMember d: KeyPath<a, c>) -> c {
6+
@dynamicMemberLookup class e {c { self[
7+
#^COMPLETE^#}
8+
subscript(dynamicMember d: KeyPath<b, c>) -> c
9+
}
10+
}
11+
}
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","signature":"swift::IterableDeclContext::addMemberSilently(swift::Decl*, swift::Decl*, bool) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
3+
{
4+
class a {
5+
lazy b: = #^COMPLETE^#
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","signature":"swift::ide::AfterPoundExprCompletion::sawSolutionImpl(swift::constraints::Solution const&)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
3+
{##^COMPLETE^#
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","signature":"(anonymous namespace)::getEquivalentDeclContextFromSourceFile(swift::DeclContext*, swift::SourceFile*)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
do { func a { #^^# #^b^#
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","signature":"swift::ide::IDEInspectionInstance::performCachedOperationIfPossible(llvm::hash_code, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, swift::SearchPathOptions const&, llvm::MemoryBuffer*, unsigned int, swift::DiagnosticConsumer*, std::__1::shared_ptr<std::__1::atomic<bool>>, llvm::function_ref<void (swift::ide::CancellableResult<swift::ide::IDEInspectionInstanceResult>)>)","useSourceOrderCompletion":true}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s -source-order-completion
3+
#^^#
4+
#if a)#^COMPLETE3^#
5+
var
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {"kind":"complete","signature":"void std::__1::__introsort<std::__1::_ClassicAlgPolicy, printCodeCompletionLookedupTypeNames(llvm::ArrayRef<swift::NullTerminatedStringRef>, llvm::raw_ostream&)::$_0&, swift::NullTerminatedStringRef*, false>(swift::NullTerminatedStringRef*, swift::NullTerminatedStringRef*, printCodeCompletionLookedupTypeNames(llvm::ArrayRef<swift::NullTerminatedStringRef>, llvm::raw_ostream&)::$_0&, std::__1::iterator_traits<swift::NullTerminatedStringRef*>::difference_type, bool)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
struct a<each b: Collection
4+
{
5+
c: (repeat each b.Index
6+
func == {
7+
repeat each d == (each c)#^^#
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","signature":"swift::Mangle::ASTMangler::appendType(swift::Type, swift::GenericSignature, swift::ValueDecl const*)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
// REQUIRES: OS=macosx
4+
import Foundation switch Foundation { case #^^#
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"complete","signature":"swift::FragileFunctionKindRequest::evaluate(swift::Evaluator&, swift::DeclContext*) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
3+
enum a {
4+
case ( = {
5+
enum b :
6+
#^COMPLETE^#
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","signature":"swift::irgen::IRGenModule::emitLazyObjCProtocolDefinition(swift::ProtocolDecl*)"}
2+
// Actual signature: matchCallArguments
3+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
4+
{ switch { case let c(#^COMPLETE^# b) a
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"complete","signature":"swift::constraints::ConstraintSystem::addConstraintImpl(swift::constraints::ConstraintKind, swift::Type, swift::Type, swift::constraints::ConstraintLocatorBuilder, bool)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
3+
@propertyWrapper struct a {
4+
wrappedValue: Bool init(wrappedValue: Bool
5+
var projectedValue init(projectedValue: ) func b(@a ) {
6+
b#^^#

0 commit comments

Comments
 (0)