Commit 5d1fea2
committed
[CS] Don't consider implicit TupleExprs in exprNeedsParensOutsideFollowingOperator
Such implicit tuples may be used to represent
argument lists for e.g binary expressions, and as
such shouldn't be considered as parent exprs that
satisfy the role of parentheses.
Also fix the callers to use the raw anchor as the
root expression they pass to provide an accurate
parent map. This requires sinking the
UnresolvedMemberChainResultExpr handling logic into
`getPrecedenceParentAndIndex`.
rdar://811092871 parent 41a1761 commit 5d1fea2
File tree
4 files changed
+46
-11
lines changed- lib/Sema
- test/Constraints
4 files changed
+46
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7891 | 7891 | | |
7892 | 7892 | | |
7893 | 7893 | | |
| 7894 | + | |
| 7895 | + | |
| 7896 | + | |
| 7897 | + | |
| 7898 | + | |
| 7899 | + | |
| 7900 | + | |
| 7901 | + | |
| 7902 | + | |
7894 | 7903 | | |
7895 | 7904 | | |
7896 | 7905 | | |
| |||
7970 | 7979 | | |
7971 | 7980 | | |
7972 | 7981 | | |
7973 | | - | |
| 7982 | + | |
7974 | 7983 | | |
7975 | | - | |
7976 | 7984 | | |
7977 | | - | |
7978 | | - | |
| 7985 | + | |
| 7986 | + | |
7979 | 7987 | | |
| 7988 | + | |
7980 | 7989 | | |
7981 | 7990 | | |
7982 | 7991 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1146 | 1146 | | |
1147 | 1147 | | |
1148 | 1148 | | |
| 1149 | + | |
1149 | 1150 | | |
1150 | 1151 | | |
1151 | 1152 | | |
| |||
1171 | 1172 | | |
1172 | 1173 | | |
1173 | 1174 | | |
1174 | | - | |
| 1175 | + | |
1175 | 1176 | | |
1176 | 1177 | | |
1177 | 1178 | | |
| |||
1310 | 1311 | | |
1311 | 1312 | | |
1312 | 1313 | | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | 1314 | | |
1317 | | - | |
| 1315 | + | |
1318 | 1316 | | |
1319 | 1317 | | |
1320 | 1318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1415 | 1415 | | |
1416 | 1416 | | |
1417 | 1417 | | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
0 commit comments