Commit b374c09
committed
[Clang importer] Eliminate redundant imports of C++ fields as properties
A recent refactoring uncovered two places where we could end up
importing a C++ field declaration as a property more than once:
1. Importing the declaration context of a field in C++ mode can then
go import all of the fields. In such a case, check that the field
we're importing didn't happen already, and bail out early if it did.
This is common practice in the Clang importer but wasn't happening here.
2. One caller to the function that imported a field from a C++ base
class into its inheriting class (as a computed property) wasn't
checking the cache, and therefore created a redundant version.
Fix both issues.1 parent 386c180 commit b374c09
File tree
3 files changed
+25
-9
lines changed- lib/ClangImporter
3 files changed
+25
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5006 | 5006 | | |
5007 | 5007 | | |
5008 | 5008 | | |
5009 | | - | |
| 5009 | + | |
| 5010 | + | |
5010 | 5011 | | |
5011 | 5012 | | |
5012 | 5013 | | |
| |||
6290 | 6291 | | |
6291 | 6292 | | |
6292 | 6293 | | |
6293 | | - | |
6294 | | - | |
| 6294 | + | |
| 6295 | + | |
6295 | 6296 | | |
6296 | 6297 | | |
6297 | 6298 | | |
6298 | | - | |
| 6299 | + | |
| 6300 | + | |
6299 | 6301 | | |
6300 | | - | |
| 6302 | + | |
6301 | 6303 | | |
6302 | | - | |
| 6304 | + | |
| 6305 | + | |
| 6306 | + | |
| 6307 | + | |
| 6308 | + | |
| 6309 | + | |
| 6310 | + | |
6303 | 6311 | | |
6304 | 6312 | | |
6305 | 6313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3581 | 3581 | | |
3582 | 3582 | | |
3583 | 3583 | | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
3584 | 3590 | | |
3585 | 3591 | | |
3586 | 3592 | | |
| |||
8761 | 8767 | | |
8762 | 8768 | | |
8763 | 8769 | | |
8764 | | - | |
8765 | | - | |
8766 | 8770 | | |
8767 | 8771 | | |
8768 | 8772 | | |
| |||
8793 | 8797 | | |
8794 | 8798 | | |
8795 | 8799 | | |
8796 | | - | |
| 8800 | + | |
8797 | 8801 | | |
8798 | 8802 | | |
8799 | 8803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
| 645 | + | |
645 | 646 | | |
646 | 647 | | |
647 | 648 | | |
648 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
649 | 653 | | |
650 | 654 | | |
651 | 655 | | |
| |||
0 commit comments