Raphael Isemann d4ff5ba926 Add missing boundary checks to variable completion.
Summary: Stopgap patch to at least stop all the crashes I get from this code.

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D49949

llvm-svn: 338177
2018-07-27 23:37:08 +00:00

22 lines
317 B
C++

class Foo
{
public:
int Bar(int x, int y)
{
return x + y;
}
};
struct Container { int MemberVar; };
int main()
{
Foo fooo;
Foo *ptr_fooo = &fooo;
fooo.Bar(1, 2);
Container container;
Container *ptr_container = &container;
return container.MemberVar = 3; // Break here
}