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

Bug 312172

Summary: Infinite loop in Implement Method command
Product: [Tools] CDT Reporter: Sergey Prigogin <eclipse.sprigogin>
Component: cdt-refactoringAssignee: Sergey Prigogin <eclipse.sprigogin>
Status: RESOLVED FIXED QA Contact: Emanuel Graf <emanuel>
Severity: major    
Priority: P3 CC: me, yevshif
Version: 6.0.2   
Target Milestone: 7.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix eclipse.sprigogin: iplog-

Description Sergey Prigogin CLA 2010-05-08 22:14:09 EDT
To reproduce:

1. Create a file with the following content:

#define COPY_CTOR(T) T(const T&)

class A {
public:
  A();

  void m();

private:
  COPY_CTOR(A);
};

2. Select method "m" and click on Implement Method.

Eclipse gets into an infinite loop in PseudoNameGenerator.generateNewName:

PseudoNameGenerator.generateNewName(String) line: 62	
ParameterHandler.findNameForParameter(String) line: 77	
ParameterHandler.initArgumentNames() line: 61	
ParameterHandler.<init>(IASTSimpleDeclaration) line: 39	
ImplementMethodData.setMethodDeclarations(List<IASTSimpleDeclaration>) line: 38	
ImplementMethodRefactoring.checkInitialConditions(IProgressMonitor) line: 83	
CheckConditionsOperation.run(IProgressMonitor) line: 83	
Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1975	
WorkbenchRunnableAdapter.run(IProgressMonitor) line: 87	
ModalContext$ModalContextThread.run() line: 121
Comment 1 Sergey Prigogin CLA 2010-05-30 22:35:55 EDT
Created attachment 170486 [details]
Fix
Comment 2 Sergey Prigogin CLA 2010-05-30 22:38:24 EDT
Fixed in HEAD > 20100530.