1// In top-level scope.
2struct TopLevelStruct {
3 int member;
4};
5TopLevelStruct top_level_struct;
6
7// Nested in a class.
8struct OuterStruct {
9 struct InnerStruct {
10 int member;
11 };
12};
13OuterStruct::InnerStruct inner_struct;
14
15// Behind typedef.
16struct UnderlyingTypedefStruct {
17 int member;
18};
19typedef UnderlyingTypedefStruct TypedefStruct;
20TypedefStruct typedef_struct;
21
22// In namespace.
23namespace NS {
24struct NamespaceStruct {
25 int member;
26};
27} // namespace NS
28NS::NamespaceStruct namespace_struct;
29
30// In unnamed namespace.
31namespace {
32struct UnnamedNamespaceStruct {
33 int member;
34};
35} // namespace
36UnnamedNamespaceStruct unnamed_namespace_struct;
37
38// In linkage spec.
39extern "C" {
40struct ExternCStruct {
41 int member;
42};
43}
44ExternCStruct extern_c_struct;
45
46int main() {
47 struct DeclInFunc {
48 int member;
49 };
50
51 DeclInFunc decl_in_func;
52 return unnamed_namespace_struct.member; // break here
53}
54

source code of lldb/test/API/lang/cpp/scratch-context-merging/structs/main.cpp