Commit c12b289
Automerge: [Clang] Non-polymorphic trivially relocatable types can have [[trivial_abi]] (#143111)
Use the definition of trivially relocatable types to short-circuit some
checks for trivial_abi.
Note that this is mostly a no-op as there is a lot of overlap between
trivial_abi and trivial relocatability (ie, I can't envision a scenario
in which there would be a trivially relocatable type that would not be
eligible for trivial_abi based on its special member function... which
is good!)
Note that for bases and members, we need to check CanPassInRegister
rather than just relocation. So we do these checks first, which leads to
better diagnostics.File tree
5 files changed
+47
-36
lines changed- clang
- include/clang/Sema
- lib/Sema
- test
- SemaCXX
- SemaObjCXX
5 files changed
+47
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8680 | 8680 | | |
8681 | 8681 | | |
8682 | 8682 | | |
| 8683 | + | |
8683 | 8684 | | |
8684 | 8685 | | |
8685 | 8686 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10571 | 10571 | | |
10572 | 10572 | | |
10573 | 10573 | | |
10574 | | - | |
10575 | | - | |
10576 | | - | |
10577 | | - | |
10578 | | - | |
10579 | | - | |
10580 | | - | |
10581 | | - | |
10582 | | - | |
10583 | | - | |
10584 | | - | |
10585 | | - | |
10586 | | - | |
10587 | | - | |
10588 | | - | |
10589 | | - | |
10590 | | - | |
10591 | | - | |
10592 | | - | |
10593 | | - | |
10594 | | - | |
10595 | | - | |
10596 | | - | |
10597 | 10574 | | |
10598 | 10575 | | |
10599 | 10576 | | |
| |||
10637 | 10614 | | |
10638 | 10615 | | |
10639 | 10616 | | |
| 10617 | + | |
| 10618 | + | |
| 10619 | + | |
| 10620 | + | |
| 10621 | + | |
| 10622 | + | |
| 10623 | + | |
| 10624 | + | |
| 10625 | + | |
| 10626 | + | |
| 10627 | + | |
| 10628 | + | |
| 10629 | + | |
| 10630 | + | |
| 10631 | + | |
| 10632 | + | |
| 10633 | + | |
| 10634 | + | |
| 10635 | + | |
| 10636 | + | |
| 10637 | + | |
| 10638 | + | |
| 10639 | + | |
| 10640 | + | |
| 10641 | + | |
| 10642 | + | |
10640 | 10643 | | |
10641 | 10644 | | |
10642 | 10645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
| 303 | + | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
309 | | - | |
| 308 | + | |
| 309 | + | |
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
675 | | - | |
| 675 | + | |
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| |||
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
198 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
0 commit comments