Right now the stdlib/overlays can compile against -Onone tests with or without
-enable-ownership-stripping-after-serialization. This will help me to prevent
other work going on from breaking these properties.
Implementation is as follows: In `preCheckExpression` try to
detect if there is `T(literal)` call in the AST, replace it with
implicit `literal as T`, while trying to form type-checked AST,
after constraint solving, restore source information and drop
unnecessary coercion expression.
Resolves: rdar://problem/17088188
Resolves: rdar://problem/39120081
Resolves: rdar://problem/23672697
Resolves: rdar://problem/40379985
This commit enables many parts of the test suite `diagnostic_constant_propagation.swift`.
These tests were disabled as they failed due to changes to the implementation of integer
initializers, which made them non-transparent. The current modification enables all test
cases that pass under the latest swift implementation. It also has some false negatives,
which should ideally be reported as an error but currently pass the diagnostics phase.
The commit also extracts the tests that have diverging behavior in Swift 3 and Swift 4
into separate test files.