Skip to content

Disable unstable crashers #5660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 7, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/Sema/ConstraintSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -2411,6 +2411,12 @@ class ExprCleaner {
TS->Patterns.insert({ P, P->getType() });
return { true, P };
}

// Don't walk into statements. This handles the BraceStmt in
// non-single-expr closures, so we don't walk into their body.
std::pair<bool, Stmt *> walkToStmtPre(Stmt *S) override {
return { false, S };
}
};

E->walk(ExprCleanserImpl(this));
Expand Down
6 changes: 6 additions & 0 deletions lib/Sema/TypeCheckConstraints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,12 @@ void CleanupIllFormedExpressionRAII::doIt(Expr *expr, ASTContext &Context) {
}
return true;
}

// Don't walk into statements. This handles the BraceStmt in
// non-single-expr closures, so we don't walk into their body.
std::pair<bool, Stmt *> walkToStmtPre(Stmt *S) override {
return { false, S };
}
};

if (expr)
Expand Down
1 change: 0 additions & 1 deletion test/Constraints/closures.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %target-parse-verify-swift
// REQUIRES: closurefixes

func myMap<T1, T2>(_ array: [T1], _ fn: (T1) -> T2) -> [T2] {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

// RUN: not %target-swift-frontend %s -parse
// RUN: not --crash %target-swift-frontend %s -parse
// REQUIRES: SR-3149
t c
let : {{
return $0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

// RUN: not %target-swift-frontend %s -emit-ir
// RUN: not --crash %target-swift-frontend %s -emit-ir
// REQUIRES: SR-3149
guard{{return $0
== Int
p
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

// RUN: not %target-swift-frontend %s -emit-ir
// RUN: not --crash %target-swift-frontend %s -emit-ir
// REQUIRE: SR-3149
b<n([print{$0