Commit ec6c540
committed
[Clang] Fix an inadvertent overwrite of sub-initializers
When using InitChecker with VerifyOnly, we create a new designated
initializer to handle anonymous fields. However in the last call to
CheckDesignatedInitializer, the subinitializer isn't properly
preserved but it gets overwritten by the cloned one. Which causes
the initializer to reference the dependent field, breaking
assumptions when we initialize the instantiated specialization.1 parent 6181f4f commit ec6c540
File tree
3 files changed
+36
-4
lines changed- clang
- docs
- lib/Sema
- test/SemaTemplate
3 files changed
+36
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
| 693 | + | |
693 | 694 | | |
694 | 695 | | |
695 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2791 | 2791 | | |
2792 | 2792 | | |
2793 | 2793 | | |
2794 | | - | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
2795 | 2799 | | |
2796 | 2800 | | |
2797 | 2801 | | |
2798 | 2802 | | |
2799 | 2803 | | |
2800 | 2804 | | |
2801 | | - | |
2802 | | - | |
2803 | | - | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
2804 | 2808 | | |
2805 | 2809 | | |
2806 | 2810 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
0 commit comments