Files
swift-mirror/lib/SILOptimizer/Transforms/OptRemarkGenerator.cpp
Michael Gottesman 753f7ab8f3 [opt-remark] Add remarks for casts that go through the runtime and aren't optimized away.
Now we get opt-remarks like the following:

```
public func condCast5<NS, T>(_ ns: NS) -> T? {
  // Make sure the colon info is right so that the arrow is under the a.
  //
  // Today, we lose that x was assigned.
  if let x = ns as? T {  // expected-remark @:17 {{conditional runtime cast of value with type 'NS' to 'T'}}
    return x             // expected-note @-5:32 {{of 'ns'}}
  }
  return nil
}
```
2021-03-30 18:58:27 -07:00

28 KiB