Commit c1be3c5
committed
[Clang] Minimal support for avaibility attributes on partial specializations
There are some limitations.
Because we only know which partial
specialization to refer to when instantiating, and because we
can't instantiate the class before we require a complete type,
we can only use the partial specialization once we have a complete
class.
Similarly, because we don't know if a class is ever going to be
complete, we always always warn on avaibility of the primary.
Therefore we only warn fr the partial specialization if we did
not warn on the primary.
I considered alternatives to address that second limitation:
- Delay warnings to the end of the TU
- Tracking where each avaibility attribute originally comes from.
However, both of these have drawbacks, and the use case is probably
less motivated than wanting to deprecate the use of a
specific specialization.
Fixes #444961 parent 5b02a26 commit c1be3c5
File tree
5 files changed
+96
-19
lines changed- clang
- docs
- include/clang/Sema
- lib/Sema
- test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated
5 files changed
+96
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
589 | 592 | | |
590 | 593 | | |
591 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2385 | 2385 | | |
2386 | 2386 | | |
2387 | 2387 | | |
2388 | | - | |
2389 | | - | |
2390 | | - | |
2391 | | - | |
2392 | | - | |
2393 | | - | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
2394 | 2398 | | |
2395 | 2399 | | |
2396 | 2400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
| |||
147 | 146 | | |
148 | 147 | | |
149 | 148 | | |
150 | | - | |
| 149 | + | |
151 | 150 | | |
152 | | - | |
| 151 | + | |
153 | 152 | | |
154 | | - | |
155 | | - | |
| 153 | + | |
| 154 | + | |
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
| |||
162 | 161 | | |
163 | 162 | | |
164 | 163 | | |
165 | | - | |
166 | 164 | | |
167 | 165 | | |
168 | 166 | | |
| |||
876 | 874 | | |
877 | 875 | | |
878 | 876 | | |
879 | | - | |
| 877 | + | |
880 | 878 | | |
881 | 879 | | |
882 | 880 | | |
| |||
1112 | 1110 | | |
1113 | 1111 | | |
1114 | 1112 | | |
| 1113 | + | |
1115 | 1114 | | |
1116 | 1115 | | |
1117 | 1116 | | |
1118 | 1117 | | |
1119 | 1118 | | |
1120 | | - | |
| 1119 | + | |
1121 | 1120 | | |
1122 | 1121 | | |
1123 | 1122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4094 | 4094 | | |
4095 | 4095 | | |
4096 | 4096 | | |
| 4097 | + | |
| 4098 | + | |
| 4099 | + | |
| 4100 | + | |
4097 | 4101 | | |
4098 | 4102 | | |
4099 | 4103 | | |
4100 | 4104 | | |
| 4105 | + | |
4101 | 4106 | | |
4102 | 4107 | | |
4103 | 4108 | | |
4104 | | - | |
| 4109 | + | |
4105 | 4110 | | |
4106 | 4111 | | |
| 4112 | + | |
| 4113 | + | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
4107 | 4123 | | |
4108 | 4124 | | |
4109 | 4125 | | |
| |||
Lines changed: 56 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
0 commit comments