xref: /llvm-project/lldb/test/API/functionalities/data-formatter/refpointer-recursion/main.cpp (revision 99451b4453688a94c6014cac233d371ab4cc342d)
1 int _ID = 0;
2 
3 class Foo {
4 	public:
5 		Foo *next;
6 		int ID;
7 
Foo()8 	Foo () : next(0), ID(++_ID) {}
9 };
10 
evalFoo(Foo & foo)11 int evalFoo(Foo& foo)
12 {
13 	return foo.ID; // Set break point at this line.
14 }
15 
main()16 int main() {
17 	Foo f;
18 	f.next = &f;
19 	return evalFoo(f);
20 }
21 
22