Skip to content

NullReferenceException when parsing instantiation of a previously partially specialised template #77

Description

@s1sw

Parsing the following code causes a NullReferenceException:

template<typename A, typename B>
struct foo {};

template<typename B>
struct foo<int, B> {};

foo<int, int> foobar;

CppModelBuilder.GetOrCreateDeclarationContainer doesn't handle ClassTemplatePartialSpecialization cursors. This causes it to return null, which later causes the exception when trying to create a declaration container for the instantiation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions