Commit 4336c58
committed
[OpenCLCpp] Remove address-space from friend declaration
OpenCL prohibits address-space on function, however it
default address-space is implicitly to all member decls.
This causes the lookup to fail find correct free function or free function
template as it is considered different declaration.
This change also makes sure that hidden friend definition doesn't have
associated address-space.
Without this change friend declaration would cause incorrect diagnostic:
'test/SemaCXX/friend.cpp Line 16: conflicting types for 'f'`
in case of prior definition of function f friend declaration was refering to
While bit unsatisfactory it was much easier to fix/remove address-space of
friend declaration since it is still required for friend of member function
decls.
This change also enables compilation of some of failing test exposing this defect.
It was originally exhibited by 'test/SemaCXX/type-traits.cpp', however this test
has currently other issues also related to the __cl_clang_function_pointers
extension and address-space inferrence preventing from enabling it by the defaut.1 parent 6ae6c4f commit 4336c58
File tree
8 files changed
+41
-5
lines changed- clang
- include/clang
- AST
- Sema
- lib/Sema
- test/SemaCXX
8 files changed
+41
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5349 | 5349 | | |
5350 | 5350 | | |
5351 | 5351 | | |
| 5352 | + | |
| 5353 | + | |
| 5354 | + | |
| 5355 | + | |
| 5356 | + | |
| 5357 | + | |
5352 | 5358 | | |
5353 | 5359 | | |
5354 | 5360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
10300 | 10301 | | |
10301 | 10302 | | |
10302 | 10303 | | |
| 10304 | + | |
| 10305 | + | |
| 10306 | + | |
| 10307 | + | |
| 10308 | + | |
10303 | 10309 | | |
10304 | 10310 | | |
10305 | 10311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
579 | 591 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
2823 | 2824 | | |
2824 | 2825 | | |
2825 | 2826 | | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
2826 | 2832 | | |
2827 | 2833 | | |
2828 | 2834 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
66 | | - | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
74 | | - | |
| 74 | + | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments