• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
2 
3 //CHECK: TC<int>
4 //CHECK: DW_TAG_template_type_parameter
5 
6 template<typename T>
7 class TC {
8 public:
TC(const TC &)9   TC(const TC &) {}
TC()10   TC() {}
11 };
12 
13 TC<int> tci;
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;
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 
33 // PR9608
34 template <int i> struct TheTemplate {
35   struct Empty2 {};
36   typedef const Empty2 DependentType[i];
TheTemplateTheTemplate37   TheTemplate() {}
38 };
39 
40 class TheTemplateTest : public TheTemplate<42> {
41   TheTemplateTest();
method(const TheTemplate<42>::DependentType *)42   void method(const TheTemplate<42>::DependentType *) {}
43 };
44 
TheTemplateTest()45 TheTemplateTest::TheTemplateTest() : TheTemplate<42>() {}
46 
47