ClangSharp icon indicating copy to clipboard operation
ClangSharp copied to clipboard

Make Decl.DescribedTemplate property nullable.

Open ceresgalax opened this issue 1 year ago • 0 comments

Obviously, many Decl cursors will not describe a template. Make this property null to reflect that and avoid an exception by TranslationUnit.GetOrCreate<TemplateDecl>().

Additionally, DescribedTemplate will be null for partial template specializations. Added a doc comment to the property as this is less obvious.

ceresgalax avatar Feb 12 '24 00:02 ceresgalax