Skip to content

Commit 6570da3

Browse files
committed
[test] Clean up some crasher test cases
1 parent 9a0a831 commit 6570da3

34 files changed

+41
-41
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::Parser::parseStmtConditionElement(llvm::SmallVectorImpl<swift::StmtConditionElement>&, swift::Diag<>, swift::StmtKind, llvm::StringRef&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
func a: b[ if let
3+
func a: b[ if let
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::TuplePattern::createSimple(swift::ASTContext&, swift::SourceLoc, llvm::ArrayRef<swift::TuplePatternElt>, swift::SourceLoc)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
switch { case (repeat a
3+
switch { case (repeat a
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"makeBinOp(swift::ASTContext&, swift::Expr*, swift::Expr*, swift::Expr*, swift::PrecedenceGroupDecl*, bool)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
let a= switch a { case &b as? b
3+
let a= switch a { case &b as? b
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::Parser::parseTypeSimple(swift::Diag<>, swift::Parser::ParseTypeReason)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
subscript(a: ~b <
3+
subscript(a: ~b <

validation-test/compiler_crashers_2/83d5136a1ea615f9.swift renamed to validation-test/compiler_crashers_2/3070c3e372b52e7e.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
struct a func b(c : a) {
44
{
55
switch
6-
c { case .baz(c==
6+
c { case .baz(c==
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"(anonymous namespace)::ExprRewriter::coerceCallArguments(swift::ArgumentList*, swift::AnyFunctionType*, swift::ConcreteDeclRef, swift::ApplyExpr*, swift::constraints::ConstraintLocatorBuilder, llvm::ArrayRef<swift::AppliedPropertyWrapper>)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
func a<b, each c>(body : (repeat each c)->b) { body(
3+
func a<b, each c>(body : (repeat each c)->b) { body(
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"(anonymous namespace)::ExprWalker::rewriteTarget(swift::constraints::SyntacticElementTarget)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
{ Sendable(Sendable<<a
3+
{ Sendable(Sendable<<a
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"deriveBodyRawRepresentable_init(swift::AbstractFunctionDecl*, void*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
a enum a : Int { case = #/
3+
a enum a : Int { case = #/
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// {"signature":"swift::constraints::simplifyLocator(swift::ASTNode&, llvm::ArrayRef<swift::constraints::ConstraintLocator::PathElement>&, swift::SourceRange&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
struct a { eq = "" b "Self ecuador1 Self) > Bool {
3+
struct a { eq = "" b "Self ecuador1 Self) > Bool {
44
let getProperties = (
55
\.eq as Self -> _
66
let eq = ""
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"(anonymous namespace)::ConnectedComponents::unionSets(swift::TypeVariableType*, swift::TypeVariableType*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
let b = ( c , d a {
3+
let b = ( c , d a {
44
e b
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"(anonymous namespace)::ExprRewriter::buildSingleCurryThunk(swift::Expr*, swift::Expr*, swift::DeclContext*, swift::FunctionType*, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
// REQUIRES: OS=macosx
4-
import Foundation func a(b: AnyClass?) { b (b
4+
import Foundation func a(b: AnyClass?) { b (b
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"diagSyntacticUseRestrictions(swift::Expr const*, swift::DeclContext const*, bool)::DiagnoseWalker::walkToExprPre(swift::Expr*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
{ @#b([a:
3+
{ @#b([a:
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// {"signature":"(anonymous namespace)::ExprRewriter::coerceToType(swift::Expr*, swift::Type, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
struct a < each b : Collection {
4-
c : ( repeat each b
5-
extension
4+
c : ( repeat each b
5+
extension
66
struct Index {
77
d : (repeat(each b.Index
88
} var endIndex : Index {
9-
Index(d: repeat (each c).endIndex
9+
Index(d: repeat (each c).endIndex
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"(anonymous namespace)::ExprRewriter::finishApply(swift::ApplyExpr*, swift::Type, swift::constraints::ConstraintLocatorBuilder, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
func a(b : ()->Void c : _->Void) { withoutActuallyEscaping(b do : c
3+
func a(b : ()->Void c : _->Void) { withoutActuallyEscaping(b do : c

validation-test/compiler_crashers_2/e38f396e3ac8635.swift renamed to validation-test/compiler_crashers_2/89bcf379b8d4d092.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
struct a < b : FixedWidthInteger extension a : Sequence {
44
c {
5-
{ for
6-
d self { b(truncatingIfNeeded : d
5+
{ for
6+
d self { b(truncatingIfNeeded : d
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::EnumRawValuesRequest::evaluate(swift::Evaluator&, swift::EnumDecl*, swift::TypeResolutionStage) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
func a<each b>(c : repeat each b) { repeat !(d c
3+
func a<each b>(c : repeat each b) { repeat !(d c

validation-test/compiler_crashers_2/8ae148bd6e72fec2.swift

Lines changed: 0 additions & 3 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// {"signature":"swift::constraints::AllowTypeOrInstanceMemberFailure::diagnoseAsError()"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
struct a func b<c >(c = a [
3+
struct a func b<c >(c = a [
44
extension a {
55
subscript->Int
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"lookupReplacedDecl(swift::DeclNameRef, swift::DeclAttribute const*, swift::ValueDecl const*, llvm::SmallVectorImpl<swift::ValueDecl*>&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
{ @_dynamicReplacement(for: ) func a
3+
{ @_dynamicReplacement(for: ) func a
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"swift::constraints::ConstraintSystem::setTargetFor(swift::constraints::SyntacticElementTargetKey, swift::constraints::SyntacticElementTarget)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
{$0=[{} }(
3+
{$0=[{} }(
44
[a:

validation-test/compiler_crashers_2/aea9b13219906649.swift renamed to validation-test/compiler_crashers_2/a04f67aa8fb22efa.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
struct a < Element {
44
b {
5-
class c : Collection { typealias Index = d subscript(e :
5+
class c : Collection { typealias Index = d subscript(e :
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"swift::DeclContext::getASTContext() const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
@a({ struct b }
3+
@a({ struct b }
44
var c
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"swift::constraints::MissingConformanceFailure::diagnoseTypeCannotConform(swift::Type, swift::Type) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
protocol a extension a {
4-
b { func * (Self= {
4+
b { func * (Self= {
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"$s11swiftASTGen19addQueuedDiagnostic20queuedDiagnosticsPtr011perFrontende5StateH04text8severity4cLoc12categoryName17documentationPath015highlightRangesH0012numHighlightT013fixItsUntypedySv_SvSo16BridgedStringRefVSo0zE8SeverityVSo0z6SourceN0VA2NSPySo0Z15CharSourceRangeVGSgSiSo0Z8ArrayRefVtF"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
// REQUIRES: swift_swift_parser
4-
class a { @objc ( : ( b
4+
class a { @objc ( : ( b
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::TuplePatternElt& llvm::SmallVectorTemplateBase<swift::TuplePatternElt, true>::growAndEmplaceBack<swift::Identifier, swift::SourceLoc, swift::Pattern*&>(swift::Identifier&&, swift::SourceLoc&&, swift::Pattern*&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
switch { case .a(&b
3+
switch { case .a(&b
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::constraints::Solution::getFunctionArgApplyInfo(swift::constraints::ConstraintLocator*) const"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
func a<b, each c>(d : repeat(b)->each c) { repeat d(e = f
3+
func a<b, each c>(d : repeat(b)->each c) { repeat d(e = f
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::SubstitutionMap::get(swift::GenericSignature, swift::InFlightSubstitution&)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
struct a < each b { class c protocol d init(e: c & d
3+
struct a < each b { class c protocol d init(e: c & d
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"swift::constraints::SolverTrail::~SolverTrail()"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
enum a< b { case c(}
4-
func d< b >(b->a< b >) d(a< e >.c let a
3+
enum a< b { case c(}
4+
func d< b >(b->a< b >) d(a< e >.c let a
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::constraints::ConstraintSystem::associateArgumentList(swift::constraints::ConstraintLocator*, swift::ArgumentList*)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
protocol b let b = { (a : b)in switch a { case .c(d(
3+
protocol b let b = { (a : b)in switch a { case .c(d(
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::constraints::ConstraintSystem::repairFailures(swift::Type, swift::Type, swift::constraints::ConstraintKind, swift::optionset::OptionSet<swift::constraints::ConstraintSystem::TypeMatchFlags, unsigned int>, llvm::SmallVectorImpl<swift::constraints::RestrictionOrFix>&, swift::constraints::ConstraintLocatorBuilder)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
func a< b , c : Sequence, d >( b, c) where b== c.Element a( ( 0 , [ (0 0), (
3+
func a< b , c : Sequence, d >( b, c) where b== c.Element a( ( 0 , [ (0 0), (
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// {"signature":"swift::CanTypeVisitor<swift::TypeMatcher<(anonymous namespace)::AssociatedTypeInference::getPotentialTypeWitnessesByMatchingTypes(swift::ValueDecl*, swift::ValueDecl*)::MatchVisitor>::MatchVisitor, bool, swift::Type, swift::Type>::visit(swift::CanType, swift::Type, swift::Type)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
protocol a { associatedtype b func c(_ : _ d: b }
4-
extension a { c(_ : _ d: b struct e : a
3+
protocol a { associatedtype b func c(_ : _ d: b }
4+
extension a { c(_ : _ d: b struct e : a
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// {"signature":"swift::TypeBase::removeArgumentLabels(unsigned int)"}
2+
// RUN: not --crash %target-swift-frontend -typecheck %s
3+
struct a dynamic subscript(b c: Int) a subscript(b c: Int) a @_dynamicReplacement(for: subscript) subscript(Int) a { }
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// {"signature":"swift::constraints::MissingCallFailure::diagnoseAsError()"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
33
struct a < each b {
4-
init(repeat each b) func c < each d { a<repeat each d, String >(repeat e, {
4+
init(repeat each b) func c < each d { a<repeat each d, String >(repeat e, {
55
""
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// {"signature":"swift::InFlightSubstitution::substType(swift::SubstitutableType*, unsigned int)"}
22
// RUN: not --crash %target-swift-frontend -typecheck %s
3-
typealias a< each b > = ( < struct c< each d {
3+
typealias a< each b > = ( < struct c< each d {
44
typealias e< each b > = (repeat a< each d, each b >
5-
struct f typealias 1 = c .e<>
5+
struct f typealias 1 = c .e<>

0 commit comments

Comments
 (0)