Commit f01c0a7
committed
Diagnose CustomAttrs as needed in
CustomAttr backs four different features, each of which requires a different behavior in `@abi`:
• Global actors: Permitted (and permitted to vary) since they can affect mangling
• Result builders: Forbidden inside an `@abi` since they have no ABI impact
• Property wrappers: Forbidden both inside an `@abi` and on a decl with an `@abi` since it’s not clear how we would apply `@abi` to the auxiliary decls
• Attached macros: Forbidden inside an `@abi` since an ABI-only decl has no body, accessors, members, peers, extensions, or (currently) conformances
Implement these behaviors (outside of `ABIDeclChecker` since they can’t be described there).
Macro-related tests are not included in this commit; they require matching swift-syntax changes which are being negotiated.@abi
1 parent 9d63cf8 commit f01c0a7
File tree
5 files changed
+96
-3
lines changed- include/swift/AST
- lib/Sema
- test/attr
5 files changed
+96
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7457 | 7457 | | |
7458 | 7458 | | |
7459 | 7459 | | |
7460 | | - | |
| 7460 | + | |
7461 | 7461 | | |
7462 | 7462 | | |
7463 | 7463 | | |
| |||
8509 | 8509 | | |
8510 | 8510 | | |
8511 | 8511 | | |
| 8512 | + | |
| 8513 | + | |
| 8514 | + | |
| 8515 | + | |
8512 | 8516 | | |
8513 | 8517 | | |
8514 | 8518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4406 | 4406 | | |
4407 | 4407 | | |
4408 | 4408 | | |
| 4409 | + | |
| 4410 | + | |
| 4411 | + | |
| 4412 | + | |
| 4413 | + | |
| 4414 | + | |
4409 | 4415 | | |
4410 | 4416 | | |
4411 | 4417 | | |
| |||
4487 | 4493 | | |
4488 | 4494 | | |
4489 | 4495 | | |
| 4496 | + | |
4490 | 4497 | | |
4491 | 4498 | | |
| 4499 | + | |
| 4500 | + | |
4492 | 4501 | | |
4493 | 4502 | | |
| 4503 | + | |
4494 | 4504 | | |
4495 | 4505 | | |
| 4506 | + | |
4496 | 4507 | | |
4497 | 4508 | | |
4498 | 4509 | | |
4499 | 4510 | | |
| 4511 | + | |
| 4512 | + | |
| 4513 | + | |
| 4514 | + | |
4500 | 4515 | | |
4501 | 4516 | | |
4502 | 4517 | | |
| |||
4540 | 4555 | | |
4541 | 4556 | | |
4542 | 4557 | | |
| 4558 | + | |
| 4559 | + | |
| 4560 | + | |
| 4561 | + | |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
| 4565 | + | |
4543 | 4566 | | |
4544 | 4567 | | |
4545 | 4568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
1398 | 1404 | | |
1399 | 1405 | | |
1400 | 1406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
484 | 487 | | |
485 | 488 | | |
486 | 489 | | |
487 | 490 | | |
488 | | - | |
| 491 | + | |
| 492 | + | |
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
| |||
498 | 502 | | |
499 | 503 | | |
500 | 504 | | |
| 505 | + | |
| 506 | + | |
501 | 507 | | |
502 | 508 | | |
503 | | - | |
| 509 | + | |
504 | 510 | | |
505 | 511 | | |
506 | 512 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1270 | 1324 | | |
1271 | 1325 | | |
1272 | 1326 | | |
| |||
0 commit comments