1template <typename T> struct Base {
2 Base(T &t) : ref(t), pointer(&t) {}
3 // Try referencing `Derived` via different ways to potentially make LLDB
4 // pull in the definition (which would recurse back to this base class).
5 T &ref;
6 T *pointer;
7 T func() { return ref; }
8};
9
10struct Derived : Base<Derived> {
11 Derived() : Base<Derived>(*this) {}
12 int member = 0;
13};
14
15Derived derived;
16
17int main() { return derived.member; }
18

source code of lldb/test/API/lang/cpp/crtp/main.cpp