Commit e9867f6
committed
[Macros] Diagnose attached and freestanding declaration macros that produce
something other than a declaration.
The validation code already diagnosed all sorts of invalid declarations, but
it was ignoring AST nodes that aren't declarations at all.
(cherry picked from commit 1f07cba)1 parent a66f28e commit e9867f6
File tree
5 files changed
+72
-5
lines changed- include/swift/AST
- lib
- AST
- Sema
- test/Macros
- Inputs
5 files changed
+72
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7225 | 7225 | | |
7226 | 7226 | | |
7227 | 7227 | | |
7228 | | - | |
| 7228 | + | |
7229 | 7229 | | |
7230 | 7230 | | |
7231 | 7231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11035 | 11035 | | |
11036 | 11036 | | |
11037 | 11037 | | |
11038 | | - | |
| 11038 | + | |
| 11039 | + | |
| 11040 | + | |
| 11041 | + | |
| 11042 | + | |
| 11043 | + | |
| 11044 | + | |
| 11045 | + | |
| 11046 | + | |
| 11047 | + | |
| 11048 | + | |
| 11049 | + | |
| 11050 | + | |
| 11051 | + | |
| 11052 | + | |
| 11053 | + | |
11039 | 11054 | | |
| 11055 | + | |
11040 | 11056 | | |
11041 | 11057 | | |
11042 | 11058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | | - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
691 | 702 | | |
692 | 703 | | |
693 | 704 | | |
| |||
1153 | 1164 | | |
1154 | 1165 | | |
1155 | 1166 | | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
1156 | 1170 | | |
1157 | 1171 | | |
1158 | 1172 | | |
1159 | 1173 | | |
1160 | | - | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
1161 | 1177 | | |
1162 | 1178 | | |
1163 | 1179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2054 | 2054 | | |
2055 | 2055 | | |
2056 | 2056 | | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
130 | 148 | | |
131 | 149 | | |
132 | 150 | | |
| |||
0 commit comments