[all-commits] [llvm/llvm-project] 7ead00: [lldb] Fix crash in AccessDeclContextSanity when c...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Thu Jan 2 05:47:35 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ead00872929a994ac40fc2c99fce15968e2c5a6
      https://github.com/llvm/llvm-project/commit/7ead00872929a994ac40fc2c99fce15968e2c5a6
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2020-01-02 (Thu, 02 Jan 2020)

  Changed paths:
    R lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash2/TestCompletionCrash2.py
    R lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash2/main.cpp
    A lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/TestRegressionAccessFunctionTemplateInRecord.py
    A lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/main.cpp
    M lldb/source/Symbol/ClangASTContext.cpp
    M lldb/unittests/Symbol/TestClangASTContext.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list