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