debug-info-alias.cpp revision 6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89
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: metadata [[BINT:![0-9]*]], i32 0, i32 1, {{.*}} ; [ DW_TAG_variable ] [bi] 17// CHECK: [[BINT]] = {{.*}} ; [ DW_TAG_typedef ] [bar<int>] [line 42 18x::bar<int> bi; 19// CHECK: metadata [[BFLOAT:![0-9]*]], i32 0, i32 1, {{.*}} ; [ DW_TAG_variable ] [bf] 20// CHECK: [[BFLOAT]] = {{.*}} ; [ DW_TAG_typedef ] [bar<float>] [line 42 21x::bar<float> bf; 22 23using 24// CHECK: metadata [[NARF:![0-9]*]], i32 0, i32 1, {{.*}} ; [ DW_TAG_variable ] [n] 25# 142 26narf // CHECK: [[NARF]] = {{.*}} ; [ DW_TAG_typedef ] [narf] [line 142 27= int; 28narf n; 29 30template <typename T> 31using tv = void; 32// CHECK: null} ; [ DW_TAG_typedef ] [tv<int>] {{.*}} [from ] 33tv<int> *tvp; 34 35using v = void; 36// CHECK: null} ; [ DW_TAG_typedef ] [v] {{.*}} [from ] 37v *vp; 38