1 | // RUN: %clangxx --target=x86_64-pc-linux -flimit-debug-info -o %t -c %s -g |
2 | // RUN: %lldb %t -o "target var a" -o "expr -- var" -o exit | FileCheck %s |
3 | |
4 | // This forces lldb to attempt to complete the type A. Since it has no |
5 | // definition it will fail. |
6 | // CHECK: target var a |
7 | // CHECK: (A) a = <incomplete type "A"> |
8 | |
9 | // Now attempt to display the second variable, which will try to add a typedef |
10 | // to the incomplete type. Make sure that succeeds. Use the expression command |
11 | // to make sure the resulting AST can be imported correctly. |
12 | // CHECK: expr -- var |
13 | // CHECK: (A::X) $0 = 0 |
14 | |
15 | struct A { |
16 | // Declare the constructor, but don't define it to avoid emitting the |
17 | // definition in the debug info. |
18 | A(); |
19 | using X = int; |
20 | }; |
21 | |
22 | A a; |
23 | A::X var; |
24 | |