[all-commits] [llvm/llvm-project] fdc6ae: [lldb] Check Decl kind when completing -flimit-deb...

Pavel Labath via All-commits all-commits at lists.llvm.org
Fri Aug 14 03:32:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fdc6aea3fd822b639baaa5b666fdf7598d08c8de
      https://github.com/llvm/llvm-project/commit/fdc6aea3fd822b639baaa5b666fdf7598d08c8de
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-08-14 (Fri, 14 Aug 2020)

  Changed paths:
    M lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.cpp
    M lldb/test/API/functionalities/limit-debug-info/TestLimitDebugInfo.py
    M lldb/test/API/functionalities/limit-debug-info/main.cpp
    M lldb/test/API/functionalities/limit-debug-info/one.cpp
    M lldb/test/API/functionalities/limit-debug-info/onetwo.h

  Log Message:
  -----------
  [lldb] Check Decl kind when completing -flimit-debug-info types

The search for the complete class definition can also produce entries
which are not of the expected type. This can happen for instance when
there is a function with the same name as the class we're looking up
(which means that the class needs to be disambiguated with the
struct/class tag in most contexts).

Previously we were just picking the first Decl that the lookup returned,
which later caused crashes or assertion failures if it was not of the
correct type. This patch changes that to search for an entry of the
correct type.

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




More information about the All-commits mailing list