aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/value_md5_crash/main.cpp
blob: ba596b8653cfddaef3fb431d5af02e3d238f6809 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//===-- 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
}