Commit a103e21
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 23a7a59 commit a103e21
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 | |
|---|---|---|---|
| |||
7437 | 7437 | | |
7438 | 7438 | | |
7439 | 7439 | | |
7440 | | - | |
| 7440 | + | |
7441 | 7441 | | |
7442 | 7442 | | |
7443 | 7443 | | |
| |||
8499 | 8499 | | |
8500 | 8500 | | |
8501 | 8501 | | |
| 8502 | + | |
| 8503 | + | |
| 8504 | + | |
| 8505 | + | |
8502 | 8506 | | |
8503 | 8507 | | |
8504 | 8508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4401 | 4401 | | |
4402 | 4402 | | |
4403 | 4403 | | |
| 4404 | + | |
| 4405 | + | |
| 4406 | + | |
| 4407 | + | |
| 4408 | + | |
| 4409 | + | |
4404 | 4410 | | |
4405 | 4411 | | |
4406 | 4412 | | |
| |||
4482 | 4488 | | |
4483 | 4489 | | |
4484 | 4490 | | |
| 4491 | + | |
4485 | 4492 | | |
4486 | 4493 | | |
| 4494 | + | |
| 4495 | + | |
4487 | 4496 | | |
4488 | 4497 | | |
| 4498 | + | |
4489 | 4499 | | |
4490 | 4500 | | |
| 4501 | + | |
4491 | 4502 | | |
4492 | 4503 | | |
4493 | 4504 | | |
4494 | 4505 | | |
| 4506 | + | |
| 4507 | + | |
| 4508 | + | |
| 4509 | + | |
4495 | 4510 | | |
4496 | 4511 | | |
4497 | 4512 | | |
| |||
4535 | 4550 | | |
4536 | 4551 | | |
4537 | 4552 | | |
| 4553 | + | |
| 4554 | + | |
| 4555 | + | |
| 4556 | + | |
| 4557 | + | |
| 4558 | + | |
| 4559 | + | |
| 4560 | + | |
4538 | 4561 | | |
4539 | 4562 | | |
4540 | 4563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1382 | 1382 | | |
1383 | 1383 | | |
1384 | 1384 | | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
1385 | 1391 | | |
1386 | 1392 | | |
1387 | 1393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
487 | 490 | | |
488 | 491 | | |
489 | 492 | | |
490 | 493 | | |
491 | | - | |
| 494 | + | |
| 495 | + | |
492 | 496 | | |
493 | 497 | | |
494 | 498 | | |
| |||
501 | 505 | | |
502 | 506 | | |
503 | 507 | | |
| 508 | + | |
| 509 | + | |
504 | 510 | | |
505 | 511 | | |
506 | | - | |
| 512 | + | |
507 | 513 | | |
508 | 514 | | |
509 | 515 | | |
| |||
| 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