Skip to content

Assertion fails at virtual destructor declaration #240

@zeule

Description

@zeule

The tool crashes on failed assertion when there is a virtual destructor in a C++ class declaration:

ClangSharpPInvokeGenerator: /usr/lib/llvm/12/include/clang/AST/GlobalDecl.h:61: void clang::GlobalDecl::Init(const clang::Decl*): Assertion `!isa(D) && "Use other ctor with dtor decls!"' failed.

clang/llvm version 12.0.0, .NET Core 5.0

Example C++ file:

#ifndef INC_GUARD
#define INC_GUARD

struct IFace {
    virtual ~IFace() = 0;
}; 

#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions