Commit 35b141f
authored
[flang] Translate +x to (x), not x (#157513)
In expression semantics, don't completely delete the unary plus
operator, but instead translate it into parentheses. The distinction
matters in contexts where the bounds of x are significant or when x must
not be misinterpreted as a variable.
Fixes #157379.1 parent 7f007b5 commit 35b141f
File tree
2 files changed
+17
-1
lines changed- flang
- lib/Semantics
- test/Evaluate
2 files changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3700 | 3700 | | |
3701 | 3701 | | |
3702 | 3702 | | |
3703 | | - | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
3704 | 3707 | | |
3705 | 3708 | | |
3706 | 3709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments