Skip to content

Commit 2f6aac4

Browse files
authored
Merge pull request #5660 from DougGregor/disable-unstable-crashers
Disable unstable crashers
2 parents e3428ba + 0f29a07 commit 2f6aac4

6 files changed

+18
-4
lines changed

lib/Sema/ConstraintSystem.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,6 +2411,12 @@ class ExprCleaner {
24112411
TS->Patterns.insert({ P, P->getType() });
24122412
return { true, P };
24132413
}
2414+
2415+
// Don't walk into statements. This handles the BraceStmt in
2416+
// non-single-expr closures, so we don't walk into their body.
2417+
std::pair<bool, Stmt *> walkToStmtPre(Stmt *S) override {
2418+
return { false, S };
2419+
}
24142420
};
24152421

24162422
E->walk(ExprCleanserImpl(this));

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,12 @@ void CleanupIllFormedExpressionRAII::doIt(Expr *expr, ASTContext &Context) {
13011301
}
13021302
return true;
13031303
}
1304+
1305+
// Don't walk into statements. This handles the BraceStmt in
1306+
// non-single-expr closures, so we don't walk into their body.
1307+
std::pair<bool, Stmt *> walkToStmtPre(Stmt *S) override {
1308+
return { false, S };
1309+
}
13041310
};
13051311

13061312
if (expr)

test/Constraints/closures.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-parse-verify-swift
2-
// REQUIRES: closurefixes
32

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

validation-test/compiler_crashers_fixed/28413-swift-typebase-getcanonicaltype.swift renamed to validation-test/compiler_crashers/28413-swift-typebase-getcanonicaltype.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
// See http://swift.org/LICENSE.txt for license information
66
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
77

8-
// RUN: not %target-swift-frontend %s -parse
8+
// RUN: not --crash %target-swift-frontend %s -parse
9+
// REQUIRES: SR-3149
910
t c
1011
let : {{
1112
return $0
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
// See http://swift.org/LICENSE.txt for license information
66
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
77

8-
// RUN: not %target-swift-frontend %s -emit-ir
8+
// RUN: not --crash %target-swift-frontend %s -emit-ir
9+
// REQUIRES: SR-3149
910
guard{{return $0
1011
== Int
1112
p
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
// See http://swift.org/LICENSE.txt for license information
66
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
77

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

0 commit comments

Comments
 (0)