1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 363111 - Automatically generated explicit constructor has the

explicit keyword in constructor definition
This commit is contained in:
Marc-Andre Laperle 2011-11-11 11:58:01 -05:00
parent 5e3d2ee884
commit 8a1269053a
2 changed files with 20 additions and 1 deletions

View file

@ -775,3 +775,21 @@ template<typename T>
inline void func(T&) {
}
//!Bug 363111 - Remove explicit in constructor definition
//#org.eclipse.cdt.ui.tests.refactoring.implementmethod.ImplementMethodRefactoringTest
//@.config
filename=A.h
//@A.h
class TestClass {
public:
/*$*/explicit TestClass();/*$$*/
};
//@A.cpp
//=
TestClass::TestClass() {
}

View file

@ -237,7 +237,8 @@ public class ImplementMethodRefactoring extends CRefactoring2 {
IASTNode declarationParent = methodDeclaration.getParent();
if (declSpecifier instanceof ICPPASTDeclSpecifier) {
((ICPPASTDeclSpecifier) declSpecifier).setVirtual(false);
((ICPPASTDeclSpecifier) declSpecifier).setVirtual(false);
((ICPPASTDeclSpecifier) declSpecifier).setExplicit(false);
}
String currentFileName = declarationParent.getNodeLocations()[0].asFileLocation().getFileName();