Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the binding of a copy ctor when a move ctor exists too.
Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
- Loading branch information
Showing
8 changed files
with
100 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,36 @@ | |||
using CppSharp.AST; | |||
using CppSharp.Passes; | |||
|
|||
namespace CppSharp.Passes | |||
{ | |||
public class IgnoreMoveConstructorsPass : TranslationUnitPass | |||
{ | |||
public IgnoreMoveConstructorsPass() | |||
{ | |||
VisitOptions.VisitClassBases = false; | |||
VisitOptions.VisitClassFields = false; | |||
VisitOptions.VisitClassProperties = false; | |||
VisitOptions.VisitEventParameters = false; | |||
VisitOptions.VisitFunctionParameters = false; | |||
VisitOptions.VisitFunctionReturnType = false; | |||
VisitOptions.VisitNamespaceEnums = false; | |||
VisitOptions.VisitNamespaceEvents = false; | |||
VisitOptions.VisitNamespaceVariables = false; | |||
VisitOptions.VisitTemplateArguments = false; | |||
} | |||
|
|||
public override bool VisitMethodDecl(Method method) | |||
{ | |||
if (!base.VisitMethodDecl(method)) | |||
return false; | |||
|
|||
if (method.IsMoveConstructor) | |||
{ | |||
method.ExplicitlyIgnore(); | |||
return true; | |||
} | |||
|
|||
return false; | |||
} | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters