Skip to content

Support pseudodestructors on void in microsoft mode #12163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nico opened this issue Jan 18, 2012 · 3 comments
Closed

Support pseudodestructors on void in microsoft mode #12163

nico opened this issue Jan 18, 2012 · 3 comments
Labels
bugzilla Issues migrated from bugzilla c++

Comments

@nico
Copy link
Contributor

nico commented Jan 18, 2012

Bugzilla Link 11791
Resolution FIXED
Resolved on Aug 27, 2014 08:48
Version unspecified
OS Windows NT
Blocks llvm/llvm-bugzilla-archive#13707
CC @asl,@DougGregor,@rnk

Extended Description

cl.exe accepts this program:

template
void _DebugHeapDelete(_Ty *_Ptr)
{
if (_Ptr != 0)
{
_Ptr->~_Ty();
}
}

void f() {
int* a = 0;
_DebugHeapDelete((void*)a);
}

clang rejects it (it's accepted without the void* cast). This appears in the xdebug header of msvc's library.

(Workaround: Don't do debug builds.)

@nico
Copy link
Contributor Author

nico commented Jan 23, 2012

r148682

@rnk
Copy link
Collaborator

rnk commented May 1, 2014

There was a small problem with the fix: we returned ExprError() after diagnosing with a warning, instead of producing a valid AST.

Small fix in r207771.

@tritao
Copy link
Mannequin

tritao mannequin commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#13707

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++
Projects
None yet
Development

No branches or pull requests

2 participants