Commit 876f99a
[CUDA][HIP] make trivial ctor/dtor host device
Make trivial ctor/dtor implicitly host device functions
so that they can be used to initialize file-scope
device variables to match nvcc behavior.
Fixes: llvm#72261
Fixes: SWDEV-432412
cherry-pick of: llvm#72394
[CUDA][HIP] ignore implicit host/device attr for override
When deciding whether a previous function declaration is an
overload or override, implicit host/device attrs should
not be considered.
This fixes the failure for the following code:
`template <typename T>
class C {
explicit C() {};
};
template <> C<int>::C() {};
`
The issue was introduced by llvm#72394
sine the template specialization is treated as overload
due to implicit host/device attrs are considered for
overload/override differentiation.
cherry-pick of llvm#72815
Change-Id: Ie896cc0e4d5d82d5af48e08a996a3b392285d9ee1 parent 357ce67 commit 876f99a
File tree
11 files changed
+92
-10
lines changed- clang
- include/clang/Sema
- lib/Sema
- test/SemaCUDA
11 files changed
+92
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13193 | 13193 | | |
13194 | 13194 | | |
13195 | 13195 | | |
| 13196 | + | |
| 13197 | + | |
| 13198 | + | |
| 13199 | + | |
13196 | 13200 | | |
13197 | 13201 | | |
13198 | 13202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
733 | 749 | | |
734 | 750 | | |
735 | 751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15884 | 15884 | | |
15885 | 15885 | | |
15886 | 15886 | | |
| 15887 | + | |
| 15888 | + | |
| 15889 | + | |
15887 | 15890 | | |
15888 | 15891 | | |
15889 | 15892 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1404 | 1404 | | |
1405 | 1405 | | |
1406 | 1406 | | |
1407 | | - | |
1408 | | - | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
1409 | 1411 | | |
1410 | 1412 | | |
1411 | 1413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | | - | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
0 commit comments