зеркало из https://github.com/mono/CppSharp.git
Always ignore functions returning unsupported specializations
In very complex headers with heavily typedef-ed returned specializations of templates with non-type template parameters the functions themselves can be visited before such templates - thus leaving such invalid functions as valid. Unfortunately, such a complex interaction cannot be reproduced and therefore tested in a reasonable time-frame. Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
This commit is contained in:
Родитель
634c231853
Коммит
da251d443b
|
@ -65,8 +65,9 @@ namespace CppSharp.Passes
|
|||
|
||||
Declaration decl = null;
|
||||
if (specialization.Arguments.Any(a =>
|
||||
a.Type.Type?.TryGetDeclaration(out decl) == true) &&
|
||||
decl.Ignore)
|
||||
a.Kind != TemplateArgument.ArgumentKind.Type ||
|
||||
(a.Type.Type.TryGetDeclaration(out decl) == true) &&
|
||||
decl.Ignore))
|
||||
{
|
||||
specialization.ExplicitlyIgnore();
|
||||
return false;
|
||||
|
@ -157,7 +158,7 @@ namespace CppSharp.Passes
|
|||
|
||||
public override bool VisitFunctionDecl(Function function)
|
||||
{
|
||||
if (!VisitDeclaration(function) || function.IsSynthetized
|
||||
if (!base.VisitFunctionDecl(function) || function.IsSynthetized
|
||||
|| function.IsExplicitlyGenerated)
|
||||
return false;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче