]> granicus.if.org Git - clang/commit
[CUDA] Disallow overloading destructors.
authorJustin Lebar <jlebar@google.com>
Mon, 3 Oct 2016 16:48:23 +0000 (16:48 +0000)
committerJustin Lebar <jlebar@google.com>
Mon, 3 Oct 2016 16:48:23 +0000 (16:48 +0000)
commit534b63721ae410c95b33d99cf378b338100f8d33
treeed29bcfbbe70f9d676569bca9a83133f01cf6712
parentb3fa84259ca68feb9379c001a30e839ed376145b
[CUDA] Disallow overloading destructors.

Summary:
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.

Reviewers: rsmith

Subscribers: cfe-commits, tra

Differential Revision: https://reviews.llvm.org/D24571

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283120 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaOverload.cpp
test/CodeGenCUDA/function-overload.cu
test/SemaCUDA/call-overloaded-destructor.cu [deleted file]
test/SemaCUDA/function-overload.cu
test/SemaCUDA/no-destructor-overload.cu [new file with mode: 0644]