diff --git a/src/Generator/Passes/CleanInvalidDeclNamesPass.cs b/src/Generator/Passes/CleanInvalidDeclNamesPass.cs index 6628ac72..726d3961 100644 --- a/src/Generator/Passes/CleanInvalidDeclNamesPass.cs +++ b/src/Generator/Passes/CleanInvalidDeclNamesPass.cs @@ -69,7 +69,29 @@ namespace CppSharp.Passes public override bool VisitFunctionDecl(Function function) { uniqueName = 0; - return base.VisitFunctionDecl(function); + var ret = base.VisitFunctionDecl(function); + uniqueName = 0; + + return ret; + } + + public override bool VisitEvent(Event @event) + { + uniqueName = 0; + var ret = base.VisitEvent(@event); + uniqueName = 0; + + return ret; + } + + public override bool VisitFunctionType(FunctionType type, + TypeQualifiers quals) + { + uniqueName = 0; + var ret = base.VisitFunctionType(type, quals); + uniqueName = 0; + + return ret; } public override bool VisitTypedefDecl(TypedefDecl typedef)