Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / functionalities / dynamic_value_child_count / pass-to-base.cpp
blobd9dd3529821ebd4faca649ab7a973a02e0c90974
1 #include <stdio.h>
2 #include <memory>
4 class BaseClass
6 public:
7 BaseClass();
8 virtual ~BaseClass() { }
9 };
11 class DerivedClass : public BaseClass
13 public:
14 DerivedClass();
15 virtual ~DerivedClass() { }
16 protected:
17 int mem;
20 BaseClass::BaseClass()
24 DerivedClass::DerivedClass() : BaseClass()
26 mem = 101;
29 int
30 main (int argc, char **argv)
32 BaseClass *b = nullptr; // Break here and check b has 0 children
33 b = new DerivedClass(); // Break here and check b still has 0 children
34 b = nullptr; // Break here and check b has one child now
35 return 0; // Break here and check b has 0 children again