mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 01:45:33 +02:00
Fixed a bug in Extract Function refactoring.
This commit is contained in:
parent
a797f98218
commit
348452142b
2 changed files with 36 additions and 1 deletions
|
@ -274,6 +274,41 @@ public class ExtractFunctionRefactoringTest extends RefactoringTestBase {
|
|||
assertRefactoringSuccess();
|
||||
}
|
||||
|
||||
//main.cpp
|
||||
//class A {
|
||||
//public:
|
||||
// explicit A(const char*);
|
||||
// void m1() const;
|
||||
// void m2() const;
|
||||
//};
|
||||
//
|
||||
//void main() {
|
||||
// /*$*/A a("");
|
||||
// a.m1();/*$$*/
|
||||
// A b(a);
|
||||
//}
|
||||
//====================
|
||||
//class A {
|
||||
//public:
|
||||
// explicit A(const char*);
|
||||
// void m1() const;
|
||||
// void m2() const;
|
||||
//};
|
||||
//
|
||||
//A extracted() {
|
||||
// A a("");
|
||||
// a.m1();
|
||||
// return a;
|
||||
//}
|
||||
//
|
||||
//void main() {
|
||||
// A a = extracted();
|
||||
// A b(a);
|
||||
//}
|
||||
public void testLocalVariableDeclaration_3() throws Exception {
|
||||
assertRefactoringSuccess();
|
||||
}
|
||||
|
||||
//A.h
|
||||
//#ifndef A_H_
|
||||
//#define A_H_
|
||||
|
|
|
@ -960,7 +960,7 @@ abstract class FlowAnalyzer extends ASTGenericVisitor {
|
|||
return leave((ICASTDesignatedInitializer) node);
|
||||
} else if (node instanceof IASTInitializerList) {
|
||||
return leave((ICPPASTConstructorChainInitializer) node);
|
||||
} else if (node instanceof IASTInitializerList) {
|
||||
} else if (node instanceof ICPPASTConstructorInitializer) {
|
||||
return leave((ICPPASTConstructorInitializer) node);
|
||||
}
|
||||
return PROCESS_SKIP;
|
||||
|
|
Loading…
Add table
Reference in a new issue