Commit 057f8ad
authored
use is_same_type when determining if a cast is redundant (#18588)
while working on #18540 (which my original prototype based the code on
`warn-redundant-casts`) I noticed the suggestion
[here](#18540 (comment))
would probably make sense to apply to redundant-cast as well!
I also made sure to include the example from the [original
implementation](#1705 (comment))
just to make sure I wasn't regressing that as well since it seemed
related.1 parent 99e2688 commit 057f8ad
2 files changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4696 | 4696 | | |
4697 | 4697 | | |
4698 | 4698 | | |
4699 | | - | |
4700 | | - | |
| 4699 | + | |
| 4700 | + | |
4701 | 4701 | | |
4702 | 4702 | | |
4703 | 4703 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
45 | 71 | | |
46 | 72 | | |
47 | 73 | | |
| |||
0 commit comments