aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/lang/cpp/static_members/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/cpp/static_members/main.cpp')
-rw-r--r--packages/Python/lldbsuite/test/lang/cpp/static_members/main.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/lang/cpp/static_members/main.cpp b/packages/Python/lldbsuite/test/lang/cpp/static_members/main.cpp
new file mode 100644
index 000000000000..7ccc2f9a328b
--- /dev/null
+++ b/packages/Python/lldbsuite/test/lang/cpp/static_members/main.cpp
@@ -0,0 +1,36 @@
+//===-- main.cpp ------------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+
+struct A
+{
+ short m_a;
+ static long s_b;
+ char m_c;
+ static int s_d;
+
+ long access() {
+ return m_a + s_b + m_c + s_d; // breakpoint 2
+ }
+};
+
+long A::s_b = 2;
+int A::s_d = 4;
+
+int main()
+{
+ A my_a;
+ my_a.m_a = 1;
+ my_a.m_c = 3;
+
+ my_a.access(); // breakpoint 1
+ return 0;
+}
+