diff --git a/lib/Sema/CSSolver.cpp b/lib/Sema/CSSolver.cpp index 46b7c9c6b16ff..f7489412dc0f2 100644 --- a/lib/Sema/CSSolver.cpp +++ b/lib/Sema/CSSolver.cpp @@ -1453,7 +1453,6 @@ bool ConstraintSystem::Candidate::solve() { // because it would assign types to expressions, which // might interfere with solving higher-level expressions. ExprCleaner cleaner(E); - CleanupIllFormedExpressionRAII cleanup(TC.Context, E); // Allocate new constraint system for sub-expression. ConstraintSystem cs(TC, DC, None); @@ -1496,18 +1495,6 @@ bool ConstraintSystem::Candidate::solve() { // Record found solutions as suggestions. this->applySolutions(solutions); - - // Solution application is going to modify AST, so we need to avoid - // clean-up, but let's double-check if we have any implicit - // expressions with type variables and nullify their types. - cleanup.disable(); - E->forEachChildExpr([&](Expr *childExpr) -> Expr * { - Type type = childExpr->getType(); - if (childExpr->isImplicit() && type && type->hasTypeVariable()) - childExpr->setType(Type()); - return childExpr; - }); - return false; } diff --git a/validation-test/compiler_crashers_fixed/28593-unreachable-executed-at-swift-lib-ast-type-cpp-3771.swift b/validation-test/compiler_crashers/28593-unreachable-executed-at-swift-lib-ast-type-cpp-3771.swift similarity index 80% rename from validation-test/compiler_crashers_fixed/28593-unreachable-executed-at-swift-lib-ast-type-cpp-3771.swift rename to validation-test/compiler_crashers/28593-unreachable-executed-at-swift-lib-ast-type-cpp-3771.swift index 06a785dc0b637..2d7b5b3a5765d 100644 --- a/validation-test/compiler_crashers_fixed/28593-unreachable-executed-at-swift-lib-ast-type-cpp-3771.swift +++ b/validation-test/compiler_crashers/28593-unreachable-executed-at-swift-lib-ast-type-cpp-3771.swift @@ -5,5 +5,6 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not %target-swift-frontend %s -emit-ir +// REQUIRES: deterministic-behavior +// RUN: not --crash %target-swift-frontend %s -emit-ir [{_=#keyPath(t>w diff --git a/validation-test/compiler_crashers_fixed/28623-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift b/validation-test/compiler_crashers/28623-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift similarity index 81% rename from validation-test/compiler_crashers_fixed/28623-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift rename to validation-test/compiler_crashers/28623-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift index 2c333c7a2d636..e3ec7a3ebaa14 100644 --- a/validation-test/compiler_crashers_fixed/28623-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift +++ b/validation-test/compiler_crashers/28623-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift @@ -5,5 +5,6 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not %target-swift-frontend %s -emit-ir +// REQUIRES: deterministic-behavior +// RUN: not --crash %target-swift-frontend %s -emit-ir f#keyPath(n&_==a>c{{{{{{{{{{{{{{{{{_=b:{{{{c{{{{{{d diff --git a/validation-test/compiler_crashers_fixed/28631-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift b/validation-test/compiler_crashers/28631-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift similarity index 80% rename from validation-test/compiler_crashers_fixed/28631-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift rename to validation-test/compiler_crashers/28631-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift index ec248a45d86b9..ae32b2f9ea681 100644 --- a/validation-test/compiler_crashers_fixed/28631-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift +++ b/validation-test/compiler_crashers/28631-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift @@ -5,5 +5,6 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not %target-swift-frontend %s -emit-ir +// REQUIRES: deterministic-behavior +// RUN: not --crash %target-swift-frontend %s -emit-ir [{{{{{{{{{{{{{{0=#keyPath(n&_=d diff --git a/validation-test/compiler_crashers_fixed/28632-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift b/validation-test/compiler_crashers/28632-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift similarity index 83% rename from validation-test/compiler_crashers_fixed/28632-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift rename to validation-test/compiler_crashers/28632-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift index 7cf03a0912d30..c22489c5ad611 100644 --- a/validation-test/compiler_crashers_fixed/28632-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift +++ b/validation-test/compiler_crashers/28632-unreachable-executed-at-swift-lib-ast-type-cpp-1130.swift @@ -5,8 +5,9 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// REQUIRES: deterministic-behavior // REQUIRES: asserts -// RUN: not %target-swift-frontend %s -emit-ir +// RUN: not --crash %target-swift-frontend %s -emit-ir {func a> print(a==#keyPath(a{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{ diff --git a/validation-test/compiler_crashers_fixed/28635-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift b/validation-test/compiler_crashers/28635-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift similarity index 74% rename from validation-test/compiler_crashers_fixed/28635-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift rename to validation-test/compiler_crashers/28635-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift index e0aaea40dbae9..82f3bc015f01a 100644 --- a/validation-test/compiler_crashers_fixed/28635-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift +++ b/validation-test/compiler_crashers/28635-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift @@ -5,5 +5,7 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not %target-swift-frontend %s -emit-ir +// REQUIRES: deterministic-behavior +// REQUIRES: deterministic-behavior +// RUN: not --crash %target-swift-frontend %s -emit-ir func a|Set(#keyPath(t>a>a{ diff --git a/validation-test/compiler_crashers_fixed/28639-unreachable-executed-at-swift-lib-ast-type-cpp-1337.swift b/validation-test/compiler_crashers/28639-unreachable-executed-at-swift-lib-ast-type-cpp-1337.swift similarity index 80% rename from validation-test/compiler_crashers_fixed/28639-unreachable-executed-at-swift-lib-ast-type-cpp-1337.swift rename to validation-test/compiler_crashers/28639-unreachable-executed-at-swift-lib-ast-type-cpp-1337.swift index 849688ae16ba6..70b9a429a48cb 100644 --- a/validation-test/compiler_crashers_fixed/28639-unreachable-executed-at-swift-lib-ast-type-cpp-1337.swift +++ b/validation-test/compiler_crashers/28639-unreachable-executed-at-swift-lib-ast-type-cpp-1337.swift @@ -5,5 +5,6 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not %target-swift-frontend %s -emit-ir +// REQUIRES: deterministic-behavior +// RUN: not --crash %target-swift-frontend %s -emit-ir print([{#keyPath(a}(t>A diff --git a/validation-test/compiler_crashers_fixed/28640-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift b/validation-test/compiler_crashers/28640-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift similarity index 80% rename from validation-test/compiler_crashers_fixed/28640-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift rename to validation-test/compiler_crashers/28640-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift index acaf2bc933c75..40f87f57fa236 100644 --- a/validation-test/compiler_crashers_fixed/28640-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift +++ b/validation-test/compiler_crashers/28640-swift-tupletype-get-llvm-arrayref-swift-tupletypeelt-swift-astcontext-const.swift @@ -5,5 +5,6 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not %target-swift-frontend %s -emit-ir +// REQUIRES: deterministic-behavior +// RUN: not --crash %target-swift-frontend %s -emit-ir protocol a func a|Set(#keyPath(t>a{ diff --git a/validation-test/compiler_crashers_fixed/28641-result-case-not-implemented.swift b/validation-test/compiler_crashers/28641-result-case-not-implemented.swift similarity index 82% rename from validation-test/compiler_crashers_fixed/28641-result-case-not-implemented.swift rename to validation-test/compiler_crashers/28641-result-case-not-implemented.swift index d3370b0ab9172..ef6976bfe3c51 100644 --- a/validation-test/compiler_crashers_fixed/28641-result-case-not-implemented.swift +++ b/validation-test/compiler_crashers/28641-result-case-not-implemented.swift @@ -5,6 +5,7 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors +// REQUIRES: deterministic-behavior // REQUIRES: asserts -// RUN: not %target-swift-frontend %s -emit-ir +// RUN: not --crash %target-swift-frontend %s -emit-ir {let β=b&[{{{#keyPath(n&[{{{{{{{{{{{{{{{{{{{{{{{{{{a{{{{s diff --git a/validation-test/compiler_crashers_fixed/28642-swift-optionaltype-get-swift-type.swift b/validation-test/compiler_crashers/28642-swift-optionaltype-get-swift-type.swift similarity index 80% rename from validation-test/compiler_crashers_fixed/28642-swift-optionaltype-get-swift-type.swift rename to validation-test/compiler_crashers/28642-swift-optionaltype-get-swift-type.swift index c2e862abfb3e4..9fe9ea6a92851 100644 --- a/validation-test/compiler_crashers_fixed/28642-swift-optionaltype-get-swift-type.swift +++ b/validation-test/compiler_crashers/28642-swift-optionaltype-get-swift-type.swift @@ -5,5 +5,6 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not %target-swift-frontend %s -emit-ir +// REQUIRES: deterministic-behavior +// RUN: not --crash %target-swift-frontend %s -emit-ir Array(_==#keyPath(t>Void! diff --git a/validation-test/compiler_crashers_fixed/28645-swift-type-transform-llvm-function-ref-swift-type-swift-type-const.swift b/validation-test/compiler_crashers/28645-swift-type-transform-llvm-function-ref-swift-type-swift-type-const.swift similarity index 80% rename from validation-test/compiler_crashers_fixed/28645-swift-type-transform-llvm-function-ref-swift-type-swift-type-const.swift rename to validation-test/compiler_crashers/28645-swift-type-transform-llvm-function-ref-swift-type-swift-type-const.swift index 26986fc8bd929..f797ed802dbb5 100644 --- a/validation-test/compiler_crashers_fixed/28645-swift-type-transform-llvm-function-ref-swift-type-swift-type-const.swift +++ b/validation-test/compiler_crashers/28645-swift-type-transform-llvm-function-ref-swift-type-swift-type-const.swift @@ -5,5 +5,6 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not %target-swift-frontend %s -emit-ir +// REQUIRES: deterministic-behavior +// RUN: not --crash %target-swift-frontend %s -emit-ir (.n).h.n&[(#keyPath(t>A diff --git a/validation-test/compiler_crashers_fixed/28646-swift-lvaluetype-get-swift-type.swift b/validation-test/compiler_crashers/28646-swift-lvaluetype-get-swift-type.swift similarity index 81% rename from validation-test/compiler_crashers_fixed/28646-swift-lvaluetype-get-swift-type.swift rename to validation-test/compiler_crashers/28646-swift-lvaluetype-get-swift-type.swift index 772fd2340a16a..569bfa8082f85 100644 --- a/validation-test/compiler_crashers_fixed/28646-swift-lvaluetype-get-swift-type.swift +++ b/validation-test/compiler_crashers/28646-swift-lvaluetype-get-swift-type.swift @@ -5,7 +5,8 @@ // See https://swift.org/LICENSE.txt for license information // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors -// RUN: not %target-swift-frontend %s -emit-ir +// REQUIRES: deterministic-behavior +// RUN: not --crash %target-swift-frontend %s -emit-ir #keyPath(a print(Int print(_=#keyPath(a