xref: /llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwo-static-data-member-access.test (revision 2bf01d73f6ebca11f36c17a65b7a86109d44681e)
1# In DWARFv5, C++ static data members are represented
2# as DW_TAG_variable. We make sure LLDB's expression
3# evaluator doesn't crash when trying to parse such
4# a DW_TAG_variable DIE, whose parent DIE is only
5# a forward declaration.
6
7# RUN: %clangxx_host %S/Inputs/dwo-static-data-member.cpp \
8# RUN:   -g -gdwarf-5 -gsplit-dwarf -flimit-debug-info -o %t
9# RUN: %lldb %t -s %s -o exit 2>&1 | FileCheck %s
10
11breakpoint set -n main
12process launch
13
14# CHECK: Process {{.*}} stopped
15
16# FIXME: The expression evaluator tries to attach
17# the static member's VarDecl to the NoCtor RecordDecl
18# before passing the AST to clang; this requires the
19# RecordDecl to be a full definition. But the debug-info
20# only contains forward declaration for NoCtor. So
21# LLDB fails to evaluate the expression.
22expression NoCtor::i
23# CHECK-LABEL: expression NoCtor::i
24# CHECK:       use of undeclared identifier 'NoCtor'
25