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 // CHECK: [[BINT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<int>" 18 // CHECK-SAME: line: 42, 19 x::bar<int> bi; 20 // CHECK: !DIGlobalVariable(name: "bf",{{.*}} type: [[BFLOAT:![0-9]+]] 21 // CHECK: [[BFLOAT]] = !DIDerivedType(tag: DW_TAG_typedef, name: "bar<float>" 22 x::bar<float> bf; 23 24 using 25 // CHECK: !DIGlobalVariable(name: "n",{{.*}} type: [[NARF:![0-9]+]] 26 # 142 27 narf // CHECK: [[NARF]] = !DIDerivedType(tag: DW_TAG_typedef, name: "narf" 28 // CHECK-SAME: line: 142 29 = int; 30 narf n; 31 32 template <typename T> 33 using tv = void; 34 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "tv<int>" 35 tv<int> *tvp; 36 37 using v = void; 38 // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "v" 39 v *vp; 40