Commit 6089ec5
committed
[CUDA][HIP] check dtor in deferred diag
Currently the deferred diag fails to diagnose calling of host
function in host device function in device compilation
triggered by destructors.
This can be further divided into two issuse:
1. the deferred diag visitor does not visit dtor of member
and parent class when visiting dtor, which it should
2. the deferred diag visitor does not visit virtual dtor of explicit
template class instantiation, which it should
Due to these issues, some constexpr functions which call
host functions are emitted on device side, which causes
undefind symbols in linking stage, as revealed by
#108548
By fixing these issue, clang will diag the issues early during compilation
instead of linking.1 parent 26fc3aa commit 6089ec5
File tree
5 files changed
+176
-1
lines changed- clang
- include/clang/Sema
- lib/Sema
- test/SemaCUDA
5 files changed
+176
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4392 | 4392 | | |
4393 | 4393 | | |
4394 | 4394 | | |
4395 | | - | |
4396 | 4395 | | |
4397 | 4396 | | |
4398 | 4397 | | |
4399 | 4398 | | |
| 4399 | + | |
4400 | 4400 | | |
4401 | 4401 | | |
4402 | 4402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1798 | 1798 | | |
1799 | 1799 | | |
1800 | 1800 | | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
1801 | 1842 | | |
1802 | 1843 | | |
1803 | 1844 | | |
| |||
1839 | 1880 | | |
1840 | 1881 | | |
1841 | 1882 | | |
| 1883 | + | |
| 1884 | + | |
1842 | 1885 | | |
1843 | 1886 | | |
1844 | 1887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
375 | 390 | | |
376 | 391 | | |
377 | 392 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20473 | 20473 | | |
20474 | 20474 | | |
20475 | 20475 | | |
| 20476 | + | |
| 20477 | + | |
| 20478 | + | |
| 20479 | + | |
| 20480 | + | |
| 20481 | + | |
| 20482 | + | |
| 20483 | + | |
| 20484 | + | |
| 20485 | + | |
| 20486 | + | |
| 20487 | + | |
| 20488 | + | |
| 20489 | + | |
| 20490 | + | |
20476 | 20491 | | |
20477 | 20492 | | |
20478 | 20493 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 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 | + | |
0 commit comments