HomePhabricator

[lldb] Fix crash in AccessDeclContextSanity when copying FunctionTemplateDecl…

Authored by teemperor on Jan 2 2020, 5:46 AM.

Description

[lldb] Fix crash in AccessDeclContextSanity when copying FunctionTemplateDecl inside a record.

Summary:
We currently don't set access specifiers for function template declarations. This seems to be fine
as long as the function template is not declared inside any record in which case Clang asserts
with the following once we try to query it's access:

Assertion failed: (Access != AS_none && "Access specifier is AS_none inside a record decl"), function AccessDeclContextSanity,

This patch just marks these function template declarations as public to make Clang happy.

Reviewers: shafik, teemperor

Reviewed By: teemperor

Subscribers: JDevlieghere, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71909