Commit 701fe51
authored
[Clang] Fix an inadvertent overwrite of sub-initializers (llvm#140714)
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.
Fixes llvm#671731 parent 0649122 commit 701fe51
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 | |
|---|---|---|---|
| |||
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| 706 | + | |
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
| |||
| 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