Commit c5ec389
committed
Diagnose macros that have multiple freestanding macro roles.
Per SE-0397, a macro may only have a single freestanding macro role,
otherwise we would have an ambiguity in how a particular freestanding
macro would be expanded. Produce an error on such macro declarations.
Fixes rdar://110178899.1 parent 3c04cff commit c5ec389
4 files changed
Lines changed: 28 additions & 0 deletions
File tree
- include/swift/AST
- lib/Sema
- test/Macros
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7109 | 7109 | | |
7110 | 7110 | | |
7111 | 7111 | | |
| 7112 | + | |
| 7113 | + | |
7112 | 7114 | | |
7113 | 7115 | | |
7114 | 7116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2017 | 2017 | | |
2018 | 2018 | | |
2019 | 2019 | | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
2020 | 2031 | | |
2021 | 2032 | | |
2022 | 2033 | | |
| |||
2077 | 2088 | | |
2078 | 2089 | | |
2079 | 2090 | | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
2080 | 2098 | | |
2081 | 2099 | | |
2082 | 2100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
0 commit comments