• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
2 
3 template<typename T>
4 struct foo {
5 };
6 namespace x {
7 // splitting these over multiple lines to make sure the right token is used for
8 // the location
9 template<typename T>
10 using
11 # 42
12 bar
13 = foo<T*>;
14 }
15 
16 // CHECK: !DIGlobalVariable(name: "bi",{{.*}} type: [[BINT:![0-9]+]]
17 x::bar<int> bi;
18 // CHECK: !DIGlobalVariable(name: "bf",{{.*}} type: [[BFLOAT:![0-9]+]]
19 // CHECK: [[BFLOAT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<float>"
20 x::bar<float> bf;
21 
22 using
23 // CHECK: !DIGlobalVariable(name: "n",{{.*}} type: [[NARF:![0-9]+]]
24 # 142
25 narf // CHECK: [[NARF]] = !DIDerivedType(tag: DW_TAG_typedef, name: "narf"
26 // CHECK-SAME:                           line: 142
27 = int;
28 narf n;
29 
30 template <typename T>
31 using tv = void;
32 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "tv<int>"
33 tv<int> *tvp;
34 
35 using v = void;
36 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "v"
37 v *vp;
38 
39 // CHECK: [[BINT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<int>"
40 // CHECK-SAME:                      line: 42,
41