blob: 8c3f8447de6912235ebf143dcca68175a77bb8b6 [file] [log] [blame]
David Blaikief1b382e2014-04-06 17:14:06 +00001// 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
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000016// CHECK: !DIGlobalVariable(name: "bi",{{.*}} type: [[BINT:![0-9]+]]
David Blaikief1b382e2014-04-06 17:14:06 +000017x::bar<int> bi;
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000018// CHECK: !DIGlobalVariable(name: "bf",{{.*}} type: [[BFLOAT:![0-9]+]]
19// CHECK: [[BFLOAT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<float>"
David Blaikief1b382e2014-04-06 17:14:06 +000020x::bar<float> bf;
21
22using
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000023// CHECK: !DIGlobalVariable(name: "n",{{.*}} type: [[NARF:![0-9]+]]
David Blaikie80bec832014-05-01 18:13:24 +000024# 142
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000025narf // CHECK: [[NARF]] = !DIDerivedType(tag: DW_TAG_typedef, name: "narf"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000026// CHECK-SAME: line: 142
David Blaikief1b382e2014-04-06 17:14:06 +000027= int;
28narf n;
29
David Blaikie1c286f62014-05-01 18:25:19 +000030template <typename T>
31using tv = void;
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000032// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "tv<int>"
David Blaikie1c286f62014-05-01 18:25:19 +000033tv<int> *tvp;
34
35using v = void;
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000036// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "v"
David Blaikie1c286f62014-05-01 18:25:19 +000037v *vp;
Peter Collingbourneeeb56ab2016-09-13 01:13:19 +000038
39// CHECK: [[BINT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<int>"
40// CHECK-SAME: line: 42,