[Bug 46775] New: lldb needs to handle auto

Bug ID 46775
Summary lldb needs to handle auto
Product lldb
Version 11.0
Hardware PC
OS Linux
Status NEW
Severity normal
Priority P
Component All Bugs
Assignee lldb-dev@lists.llvm.org
Reporter trass3r@gmail.com
CC jdevlieghere@apple.com, llvm-bugs@lists.llvm.org

When compiling clangd with clang it generates the following debug info:

Abbrev Number: 166 (DW_TAG_unspecified_type)
DW_AT_name        : (indexed string: 0xb0c6): auto

This is not handled in DWARFASTParserClang::ParseTypeModifier:

  case DW_TAG_unspecified_type:
    if (attrs.name == "nullptr_t" || attrs.name == "decltype(nullptr)") {
      resolve_state = Type::ResolveState::Full;
      clang_type = m_ast.GetBasicType(eBasicTypeNullPtr);
      break;
    }
    // Fall through to base type below in case we can handle the type
    // there...
    LLVM_FALLTHROUGH;

  case DW_TAG_base_type:

And due to the fallthrough this results in the following (somewhat misleading)
error message:
error: need to add support for DW_TAG_base_type 'auto' encoded with DW_ATE =
0x0, bit_size = 0