aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/commands/statistics/basic/main.cpp
blob: 321d4b5034393e91c7b0016075070404b50c2f98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Test that the lldb command `statistics` works.
#include <string>
#include <vector>

template <typename T> class Box {
  T m_value;

public:
  Box(T value) : m_value(value) {}
};

void foo() {
  std::string str = "hello world";
  str += "\n"; // stop here
}

void bar(int x) {
  auto box = Box<int>(x);
  // stop here
}

void vec() {
  std::vector<int> int_vec = {1, 2, 3, 4, 5, 6, 7, 8};
  std::vector<double> double_vec = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  // stop vector
  int x = int_vec.size();
}

int main(void) {
  int patatino = 27;
  foo();
  bar(patatino);
  vec();
  return 0; // break here
}