2009-09-03 07:02:57 +08:00
|
|
|
// RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s &&
|
|
|
|
// RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s &&
|
|
|
|
// RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s &&
|
|
|
|
// RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s &&
|
|
|
|
// RUN: true
|
2009-09-02 05:04:42 +08:00
|
|
|
|
|
|
|
// PR4826
|
|
|
|
struct A {
|
|
|
|
A() {
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
struct B {
|
|
|
|
B(T) {}
|
|
|
|
|
|
|
|
A nodes;
|
|
|
|
};
|
|
|
|
|
2009-09-03 07:02:57 +08:00
|
|
|
|
|
|
|
// PR4853
|
|
|
|
template <typename T> class List {
|
|
|
|
public:
|
|
|
|
List(){ } // List<BinomialNode<int>*>::List() remains undefined.
|
|
|
|
};
|
|
|
|
|
2009-09-04 05:32:41 +08:00
|
|
|
template <typename T> class Node {
|
|
|
|
int i;
|
|
|
|
public:
|
|
|
|
Node(){ } // Node<BinomialNode<int>*>::Node() remains undefined.
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
template<typename T> class BinomialNode : Node<BinomialNode<T>*> {
|
2009-09-03 07:02:57 +08:00
|
|
|
public:
|
|
|
|
BinomialNode(T value) {}
|
|
|
|
List<BinomialNode<T>*> nodes;
|
|
|
|
};
|
|
|
|
|
2009-09-02 05:04:42 +08:00
|
|
|
int main() {
|
|
|
|
B<int> *n = new B<int>(4);
|
2009-09-03 07:02:57 +08:00
|
|
|
BinomialNode<int> *node = new BinomialNode<int>(1);
|
2009-09-02 05:04:42 +08:00
|
|
|
}
|
2009-09-03 07:02:57 +08:00
|
|
|
|
2009-09-04 05:32:41 +08:00
|
|
|
// CHECK-LP64: __ZN4NodeIP12BinomialNodeIiEEC1Ev:
|
2009-09-03 07:02:57 +08:00
|
|
|
// CHECK-LP64: __ZN4ListIP12BinomialNodeIiEEC1Ev:
|
|
|
|
|
2009-09-04 05:32:41 +08:00
|
|
|
// CHECK-LP32: __ZN4NodeIP12BinomialNodeIiEEC1Ev:
|
|
|
|
// CHECK-LP32: __ZN4ListIP12BinomialNodeIiEEC1Ev:
|