[PATCH] D24571: [CUDA] Disallow overloading destructors.
Justin Lebar via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 14 10:08:34 PDT 2016
jlebar created this revision.
jlebar added a reviewer: rsmith.
jlebar added subscribers: tra, cfe-commits.
We'd attempted to allow this, but turns out we were doing a very bad
job. :)
Making this work properly would be a giant change in clang. For
example, we'd need to make CXXRecordDecl::getDestructor()
context-sensitive, because the destructor you end up with depends on
where you're calling it from.
For now (and hopefully for ever), just disallow overloading of
destructors in CUDA.
https://reviews.llvm.org/D24571
Files:
clang/lib/Sema/SemaOverload.cpp
clang/test/CodeGenCUDA/function-overload.cu
clang/test/SemaCUDA/call-overloaded-destructor.cu
clang/test/SemaCUDA/function-overload.cu
clang/test/SemaCUDA/no-destructor-overload.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24571.71379.patch
Type: text/x-patch
Size: 5264 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160914/167ca36b/attachment.bin>
More information about the cfe-commits
mailing list