Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312172 - Infinite loop in Implement Method command
Summary: Infinite loop in Implement Method command
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 6.0.2   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 7.0   Edit
Assignee: Sergey Prigogin CLA
QA Contact: Emanuel Graf CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-08 22:14 EDT by Sergey Prigogin CLA
Modified: 2010-05-30 23:23 EDT (History)
2 users (show)

See Also:


Attachments
Fix (7.71 KB, patch)
2010-05-30 22:35 EDT, Sergey Prigogin CLA
eclipse.sprigogin: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.