1#include <stdio.h>
2#include <string>
3#include <vector>
4typedef std::vector<int> int_vect;
5typedef std::vector<std::string> string_vect;
6
7template <class T>
8void by_ref_and_ptr(std::vector<T> &ref, std::vector<T> *ptr) {
9 // Stop here to check by ref
10 return;
11}
12
13int main() {
14 int_vect numbers;
15 numbers.push_back(x: 1); // break here
16 numbers.push_back(x: 12); // break here
17 numbers.push_back(x: 123);
18 numbers.push_back(x: 1234);
19 numbers.push_back(x: 12345); // break here
20 numbers.push_back(x: 123456);
21 numbers.push_back(x: 1234567);
22 by_ref_and_ptr(ref&: numbers, ptr: &numbers);
23
24 printf(format: "break here");
25 numbers.clear();
26
27 numbers.push_back(x: 7); // break here
28
29 string_vect strings;
30 strings.push_back(x: std::string("goofy"));
31 strings.push_back(x: std::string("is"));
32 strings.push_back(x: std::string("smart"));
33 printf(format: "break here");
34 strings.push_back(x: std::string("!!!"));
35
36 printf(format: "break here");
37 strings.clear();
38
39 return 0; // break here
40}
41

source code of lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/vector/main.cpp