diff --git a/src/CppParser/Parser.cpp b/src/CppParser/Parser.cpp index 9c301e65..8addf689 100644 --- a/src/CppParser/Parser.cpp +++ b/src/CppParser/Parser.cpp @@ -3184,8 +3184,9 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D, break; } case Decl::Typedef: + case Decl::TypeAlias: { - auto TD = cast(D); + auto TD = cast(D); auto NS = GetNamespace(TD); auto Name = GetDeclName(TD); diff --git a/tests/Common/Common.Tests.cs b/tests/Common/Common.Tests.cs index 7b01ed3a..04e6aa04 100644 --- a/tests/Common/Common.Tests.cs +++ b/tests/Common/Common.Tests.cs @@ -383,6 +383,8 @@ public class CommonTests : GeneratorTestFixture { var ret = common.Function(); Assert.That(ret, Is.EqualTo(5)); + + common.FuncWithTypeAlias(0); } [Test] diff --git a/tests/Common/Common.cpp b/tests/Common/Common.cpp index c972c89c..715762d4 100644 --- a/tests/Common/Common.cpp +++ b/tests/Common/Common.cpp @@ -618,3 +618,7 @@ HasProtectedEnum::HasProtectedEnum() void HasProtectedEnum::function(ProtectedEnum param) { } + +void FuncWithTypeAlias(custom_int_t i) +{ +} diff --git a/tests/Common/Common.h b/tests/Common/Common.h index fe967f44..437c073e 100644 --- a/tests/Common/Common.h +++ b/tests/Common/Common.h @@ -1103,6 +1103,9 @@ protected: void function(ProtectedEnum param); }; +using custom_int_t = int; +void FuncWithTypeAlias(custom_int_t i); + struct TestsTypes { int(*FunctionNoProto)();