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