blob: 90476439e78225d32933ab4e89caa14b75cda4b3 [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]+]]
17// CHECK: [[BINT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<int>"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000018// CHECK-SAME: line: 42,
David Blaikief1b382e2014-04-06 17:14:06 +000019x::bar<int> bi;
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000020// CHECK: !DIGlobalVariable(name: "bf",{{.*}} type: [[BFLOAT:![0-9]+]]
21// CHECK: [[BFLOAT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<float>"
David Blaikief1b382e2014-04-06 17:14:06 +000022x::bar<float> bf;
23
24using
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000025// CHECK: !DIGlobalVariable(name: "n",{{.*}} type: [[NARF:![0-9]+]]
David Blaikie80bec832014-05-01 18:13:24 +000026# 142
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000027narf // CHECK: [[NARF]] = !DIDerivedType(tag: DW_TAG_typedef, name: "narf"
Duncan P. N. Exon Smithf04be1f2015-03-03 17:25:55 +000028// CHECK-SAME: line: 142
David Blaikief1b382e2014-04-06 17:14:06 +000029= int;
30narf n;
31
David Blaikie1c286f62014-05-01 18:25:19 +000032template <typename T>
33using tv = void;
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000034// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "tv<int>"
David Blaikie1c286f62014-05-01 18:25:19 +000035tv<int> *tvp;
36
37using v = void;
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000038// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "v"
David Blaikie1c286f62014-05-01 18:25:19 +000039v *vp;