Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351547 - Delete expression lacks implicit name with binding to operator delete
Summary: Delete expression lacks implicit name with binding to operator delete
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: 8.0.1   Edit
Assignee: Markus Schorn CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-08 07:23 EDT by Thomas Corbat CLA
Modified: 2011-07-20 07:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Corbat CLA 2011-07-08 07:23:28 EDT
Build Identifier: I20110613-1736

After creating an AST for code that contains a delete statement, the AST node for that delete expression (CPPASTDeleteExpression) contains an implicit name for the destructor of the operand's type. This implicit name has a binding to the corresponding destructor. Now we are lacking the reference to the operator delete of the operand's type. In previous versions (CDT 7.0) there was an additional implicit name for this operator with a corresponding binding.

Example code:
struct A {
	void operator delete(void * a){
	}
};

int main() {
	A *a = new A;
	delete a;
}

Reproducible: Always

Steps to Reproduce:
1. Create a C++ Project and a source file.
2. Copy/Paste the example code from the details.
3. Create an AST for that file.
Comment 1 Markus Schorn CLA 2011-07-20 06:14:30 EDT
Added testcase, fixed in 8.0.1 > 20110720.
Comment 2 CDT Genie CLA 2011-07-20 06:19:39 EDT
*** cdt git genie on behalf of 351547 ***

    Bug 351547: Resolution of delete expressions.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=34fdfb11964bdd89930641b0bff118f089fdb126
Comment 3 CDT Genie CLA 2011-07-20 07:19:35 EDT
*** cdt git genie on behalf of 351547 ***

    Bug 351547: Resolution of delete expressions.

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=13bb1c1037aad223cd883ebe7470b80c3881f66a