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:
parent
5e3d2ee884
commit
8a1269053a
2 changed files with 20 additions and 1 deletions
|
@ -775,3 +775,21 @@ template<typename T>
|
||||||
inline void func(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() {
|
||||||
|
}
|
|
@ -237,7 +237,8 @@ public class ImplementMethodRefactoring extends CRefactoring2 {
|
||||||
IASTNode declarationParent = methodDeclaration.getParent();
|
IASTNode declarationParent = methodDeclaration.getParent();
|
||||||
|
|
||||||
if (declSpecifier instanceof ICPPASTDeclSpecifier) {
|
if (declSpecifier instanceof ICPPASTDeclSpecifier) {
|
||||||
((ICPPASTDeclSpecifier) declSpecifier).setVirtual(false);
|
((ICPPASTDeclSpecifier) declSpecifier).setVirtual(false);
|
||||||
|
((ICPPASTDeclSpecifier) declSpecifier).setExplicit(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
String currentFileName = declarationParent.getNodeLocations()[0].asFileLocation().getFileName();
|
String currentFileName = declarationParent.getNodeLocations()[0].asFileLocation().getFileName();
|
||||||
|
|
Loading…
Add table
Reference in a new issue