2014-02-05 05:29:50 +08:00
|
|
|
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s
|
|
|
|
// This test is for a crash when emitting debug info for not-yet-completed types.
|
|
|
|
// Test that we don't actually emit a forward decl for the offending class:
|
2014-02-05 05:50:56 +08:00
|
|
|
// CHECK: [ DW_TAG_class_type ] [Derived<Foo>] {{.*}} [def]
|
2014-02-05 05:29:50 +08:00
|
|
|
// rdar://problem/15931354
|
|
|
|
template <class R> class Returner {};
|
2014-02-05 05:50:56 +08:00
|
|
|
template <class A> class Derived;
|
2014-02-05 05:29:50 +08:00
|
|
|
|
2014-02-05 05:50:56 +08:00
|
|
|
template <class A>
|
2014-02-05 05:29:50 +08:00
|
|
|
class Base
|
|
|
|
{
|
2014-02-05 05:50:56 +08:00
|
|
|
static Derived<A>* create();
|
2014-02-05 05:29:50 +08:00
|
|
|
};
|
|
|
|
|
2014-02-05 05:50:56 +08:00
|
|
|
template <class A>
|
|
|
|
class Derived : public Base<A> {
|
2014-02-05 05:29:50 +08:00
|
|
|
public:
|
|
|
|
static void foo();
|
|
|
|
};
|
|
|
|
|
|
|
|
class Foo
|
|
|
|
{
|
|
|
|
Foo();
|
2014-02-05 05:50:56 +08:00
|
|
|
static Returner<Base<Foo> > all();
|
2014-02-05 05:29:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
Foo::Foo(){}
|
|
|
|
|
2014-02-05 05:50:56 +08:00
|
|
|
Returner<Base<Foo> > Foo::all()
|
2014-02-05 05:29:50 +08:00
|
|
|
{
|
2014-02-05 05:50:56 +08:00
|
|
|
Derived<Foo>::foo();
|
2014-02-05 05:29:50 +08:00
|
|
|
return Foo::all();
|
|
|
|
}
|