Commit f8f14b4
committed
[Clang importer] Use ParseSourceFileRequest for parsing swift_attr attributes
The Clang importer was directly calling into the parser to parse the
attribute (or modifier) within swift_attr. Aside from being gross, this
isn't possible with ASTGen.
Instead, teach ParseSourceFileRequest to deal with modifiers in the
same way that the Clang importer was hardcoding, and have the Clang
importer pull the attributes/modifiers off of the "missing"
declaration introduced by the request.
One benefit of this approach is that we're only parsing each
swift_attr source buffer once, then cloning the attributes each time
it's used, so we should be doing less work overall.
Fixes rdar://139119159.1 parent 7872fc6 commit f8f14b4
File tree
4 files changed
+30
-40
lines changed- include/swift/Parse
- lib
- ClangImporter
- Parse
4 files changed
+30
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
1325 | | - | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
1326 | 1330 | | |
1327 | 1331 | | |
1328 | 1332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
8281 | 8280 | | |
8282 | 8281 | | |
8283 | 8282 | | |
8284 | | - | |
8285 | 8283 | | |
8286 | 8284 | | |
8287 | 8285 | | |
| |||
8406 | 8404 | | |
8407 | 8405 | | |
8408 | 8406 | | |
8409 | | - | |
8410 | | - | |
8411 | | - | |
8412 | | - | |
8413 | | - | |
8414 | | - | |
8415 | | - | |
8416 | | - | |
8417 | | - | |
8418 | | - | |
8419 | | - | |
8420 | | - | |
8421 | | - | |
8422 | | - | |
8423 | | - | |
8424 | | - | |
8425 | | - | |
8426 | | - | |
8427 | | - | |
8428 | | - | |
8429 | | - | |
8430 | | - | |
8431 | | - | |
8432 | | - | |
8433 | | - | |
8434 | | - | |
8435 | | - | |
8436 | | - | |
8437 | | - | |
8438 | | - | |
8439 | | - | |
| 8407 | + | |
| 8408 | + | |
| 8409 | + | |
| 8410 | + | |
| 8411 | + | |
| 8412 | + | |
8440 | 8413 | | |
8441 | 8414 | | |
8442 | 8415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8166 | 8166 | | |
8167 | 8167 | | |
8168 | 8168 | | |
8169 | | - | |
| 8169 | + | |
| 8170 | + | |
8170 | 8171 | | |
8171 | 8172 | | |
8172 | 8173 | | |
8173 | 8174 | | |
8174 | 8175 | | |
8175 | 8176 | | |
| 8177 | + | |
| 8178 | + | |
| 8179 | + | |
| 8180 | + | |
| 8181 | + | |
| 8182 | + | |
| 8183 | + | |
| 8184 | + | |
8176 | 8185 | | |
8177 | 8186 | | |
8178 | | - | |
8179 | | - | |
| 8187 | + | |
| 8188 | + | |
| 8189 | + | |
| 8190 | + | |
8180 | 8191 | | |
8181 | 8192 | | |
8182 | 8193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
384 | 387 | | |
385 | | - | |
386 | 388 | | |
387 | 389 | | |
388 | 390 | | |
| |||
0 commit comments