Jim Ingham bff389120f Fix a bug with setting breakpoints on C++11 inline initialization statements.
If they occurred before the constructor that used them, we would refuse to
set the breakpoint because we thought they were crossing function boundaries.

Differential Revision: https://reviews.llvm.org/D94846
2021-01-20 17:58:34 -08:00

32 lines
488 B
C++

#include <stdio.h>
#include <vector>
class Trivial {
public:
Trivial(int input) : m_int(input) {}
private:
int m_int;
};
class Foo {
private:
Trivial m_trivial = Trivial(100); // Set the before constructor breakpoint here
public:
Foo(int input) {
printf("I have been made!\n");
}
private:
Trivial m_other_trivial = Trivial(200); // Set the after constructor breakpoint here
};
int
main()
{
Foo myFoo(10); // Set a breakpoint here to get started
return 0;
}