Fixed the getting of the template a specialised function is instantiated from.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
This commit is contained in:
Dimitar Dobrev 2017-03-07 22:50:11 +02:00
Родитель 254e51145f
Коммит 10ac0a4865
2 изменённых файлов: 3 добавлений и 6 удалений

Просмотреть файл

@ -3731,6 +3731,8 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D,
break;
}
case Decl::CXXConstructor:
case Decl::CXXDestructor:
case Decl::CXXConversion:
case Decl::CXXMethod:
{
auto MD = cast<CXXMethodDecl>(D);
@ -3764,11 +3766,6 @@ Declaration* Parser::WalkDeclaration(const clang::Decl* D,
Decl = WalkNonTypeTemplateParameter(NTTPD);
break;
}
// Ignore these declarations since they must have been declared in
// a class already.
case Decl::CXXDestructor:
case Decl::CXXConversion:
break;
case Decl::BuiltinTemplate:
case Decl::ClassScopeFunctionSpecialization:
case Decl::PragmaComment:

Просмотреть файл

@ -1332,7 +1332,7 @@ namespace CppSharp.Generators.CSharp
// Generate a delegate type for each method.
foreach (var method in wrappedEntries.Select(e => e.Method))
GenerateVTableMethodDelegates(containingClass, containingClass.IsDependent ?
containingClass.Methods[@class.Methods.IndexOf(method)] : method);
(Method) method.InstantiatedFrom : method);
WriteLine("private static void*[] __ManagedVTables;");
if (wrappedEntries.Any(e => e.Method.IsDestructor))