Files
clang-p2996/lldb/test/functionalities/value_md5_crash/main.cpp
Enrico Granata 20c321caf8 This patch fixes my think-o in ValueObject::UpdateValueIfNeeded() about the right thing to assert()
It also comes with a (rudimentary) test case that gets itself in a failed update scenario, and checks that we don't crash
This is the easiest case I could think of that forces the failed update case Zachary was seeing

llvm-svn: 225463
2015-01-08 19:11:43 +00:00

30 lines
659 B
C++

//===-- main.cpp ------------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
class A {
public:
virtual int foo() { return 1; }
virtual ~A () = default;
A() = default;
};
class B : public A {
public:
virtual int foo() { return 2; }
virtual ~B () = default;
B() = default;
};
int main() {
A* a = new B();
a->foo(); // break here
return 0; // break here
}