Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354585

Summary: ImplicitName for operator new not contained in AST anymore
Product: [Tools] CDT Reporter: Lukas Felber <l.felber>
Component: cdt-parserAssignee: Markus Schorn <mschorn.eclipse>
Status: RESOLVED FIXED QA Contact: Markus Schorn <mschorn.eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: 8.0.1   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Lukas Felber CLA 2011-08-12 04:03:56 EDT
Build Identifier: I20110613-1736

In cdt 7.x ICPPASTNewExpression returned an IASTImplicitName "operator new". In CDT 8.0 (and on head) it is missing.
You can also see this when trying to ctrl+click on any "new" keyword (which you can't) as in the example code.
The problem seems to be similar as the one reported by Thomas in Bug 351547 for operator delete.

Reproducible: Always

Steps to Reproduce:
1. Create following code
#include <new>
class A {
public:
  void* operator new(size_t size) { }
};
int main() {
  A *p_a = new A();
}
2. ctrl+click on new.
Comment 1 Markus Schorn CLA 2011-08-17 04:07:06 EDT
Added testcase and fix.
Comment 2 CDT Genie CLA 2011-08-17 04:23:01 EDT
*** cdt git genie on behalf of Markus Schorn ***

    Bug 354585: Resolution of overloaded new

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=b099aac3337905d7535656b3470821376649a949
Comment 3 CDT Genie CLA 2011-08-17 04:23:03 EDT
*** cdt git genie on behalf of Markus Schorn ***

    Bug 354585: Resolution of overloaded new

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