Devang Patel | fa275df | 2011-02-02 21:38:49 +0000 | [diff] [blame] | 1 | // RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s |
| 2 | |
| 3 | //CHECK: TC<int> |
| 4 | //CHECK: DW_TAG_template_type_parameter |
| 5 | |
Devang Patel | 700a1cb | 2010-07-20 20:24:18 +0000 | [diff] [blame] | 6 | template<typename T> |
| 7 | class TC { |
| 8 | public: |
| 9 | TC(const TC &) {} |
| 10 | TC() {} |
| 11 | }; |
| 12 | |
| 13 | TC<int> tci; |
Devang Patel | 0ce34c6 | 2011-02-02 22:36:18 +0000 | [diff] [blame] | 14 | |
| 15 | //CHECK: TU<2> |
| 16 | //CHECK: DW_TAG_template_value_parameter |
| 17 | template<unsigned > |
| 18 | class TU { |
| 19 | int b; |
| 20 | }; |
| 21 | |
| 22 | TU<2> u2; |
Devang Patel | ae503df | 2011-04-01 19:02:33 +0000 | [diff] [blame] | 23 | |
| 24 | // PR9600 |
| 25 | template<typename T> class vector {}; |
| 26 | class Foo; |
| 27 | typedef vector<Foo*> FooVector[3]; |
| 28 | struct Test { |
| 29 | virtual void foo(FooVector *); |
| 30 | }; |
| 31 | static Test test; |
| 32 | |
Devang Patel | ba690a4 | 2011-04-04 23:18:38 +0000 | [diff] [blame] | 33 | // PR9608 |
| 34 | template <int i> struct TheTemplate { |
| 35 | struct Empty2 {}; |
| 36 | typedef const Empty2 DependentType[i]; |
| 37 | TheTemplate() {} |
| 38 | }; |
| 39 | |
| 40 | class TheTemplateTest : public TheTemplate<42> { |
| 41 | TheTemplateTest(); |
| 42 | void method(const TheTemplate<42>::DependentType *) {} |
| 43 | }; |
| 44 | |
| 45 | TheTemplateTest::TheTemplateTest() : TheTemplate<42>() {} |
| 46 | |