Skip to content

Commit dc88058

Browse files
authored
Merge pull request #82619 from hamishknight/fuzzy
[test] Add some more known crashers
2 parents 11cb7e5 + b9afc87 commit dc88058

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+310
-1
lines changed

lib/Sema/CSDiagnostics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ class ArgumentMismatchFailure : public ContextualFailure {
21702170
FixBehavior fixBehavior =
21712171
FixBehavior::Error)
21722172
: ContextualFailure(solution, argType, paramType, locator, fixBehavior),
2173-
Info(*getFunctionArgApplyInfo(getLocator())) {}
2173+
Info(getFunctionArgApplyInfo(getLocator()).value()) {}
21742174

21752175
bool diagnoseAsError() override;
21762176
bool diagnoseAsNote() override;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"complete","signature":"swift::TypeChecker::resolveDeclRefExpr(swift::UnresolvedDeclRefExpr*, swift::DeclContext*)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -code-completion-diagnostics -source-filename %s
3+
extension <#type#> {
4+
var
5+
a = "title \( init String * 0).General\(String#^COMPLETE^#0))"
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","signature":"swift::constraints::ConstraintSystem::assignFixedType(swift::TypeVariableType*, swift::Type, bool, bool)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
3+
[ _""#^COMPLETE^#
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"complete","signature":"swift::GenericSignatureImpl::getReducedType(swift::Type) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
3+
protocol a: Collection where Iterator == b<Self> {
4+
struct b<c: a>: IteratorProtocol
5+
func d ->
6+
#^COMPLETE^#
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// {"kind":"complete","signature":"swift::IterableDeclContext::addMemberSilently(swift::Decl*, swift::Decl*, bool) const::$_0::operator()(swift::Decl*, swift::Decl*) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
3+
class a {b { { [ } ] in
4+
#^COMPLETE^#
5+
}
6+
c)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","signature":"swift::AnyFunctionType::getExtInfo() const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
3+
func a(b) a#^COMPLETE^#
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// {"kind":"complete","signature":"swift::ast_scope::ASTScopeImpl::getCharSourceRangeOfScope(swift::SourceManager&, bool) const"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
3+
var a: b {
4+
@ #^COMPLETE^#
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"kind":"complete","signature":"swift::Parser::consumeIdentifier(swift::Identifier&, bool)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
3+
switch { case borrowing #^COMPLETE^#
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// {"kind":"complete","signature":"doPrintTypeInterface(swift::CompilerInvocation const&, llvm::StringRef, llvm::StringRef)"}
2+
// Actual signature: checkSingleOverride
3+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
4+
class a { subscript(a) a { set } class b : a { override subscript(a) a {
5+
#^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)::PreCheckTarget::simplifyTypeExpr(swift::Expr*)"}
2+
// RUN: not --crash %target-swift-ide-test -code-completion --code-completion-token=COMPLETE -source-filename %s
3+
macro a = { #^COMPLETE^#

0 commit comments

Comments
 (0)