[all-commits] [llvm/llvm-project] 0f0665: [CUDA][HIP] check dtor in deferred diag (#129117)
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Fri Feb 28 06:58:41 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0f0665db067f9680f0a90ad07c2f42842acc693f
https://github.com/llvm/llvm-project/commit/0f0665db067f9680f0a90ad07c2f42842acc693f
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2025-02-28 (Fri, 28 Feb 2025)
Changed paths:
M clang/include/clang/Sema/Sema.h
M clang/lib/Sema/Sema.cpp
M clang/lib/Sema/SemaCUDA.cpp
M clang/lib/Sema/SemaDecl.cpp
A clang/test/SemaCUDA/dtor.cu
Log Message:
-----------
[CUDA][HIP] check dtor in deferred diag (#129117)
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
https://github.com/llvm/llvm-project/issues/108548
By fixing these issue, clang will diag the issues early during
compilation instead of linking.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list