1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s 2*0a6a1f1dSLionel Sambuc // 3*0a6a1f1dSLionel Sambuc // Test that indirect field decls are handled gracefully. 4*0a6a1f1dSLionel Sambuc // rdar://problem/16348575 5*0a6a1f1dSLionel Sambuc // 6*0a6a1f1dSLionel Sambuc template <class T, int T::*ptr> class Foo { }; 7*0a6a1f1dSLionel Sambuc 8*0a6a1f1dSLionel Sambuc struct Bar { 9*0a6a1f1dSLionel Sambuc int i1; 10*0a6a1f1dSLionel Sambuc // CHECK: [ DW_TAG_member ] [line [[@LINE+1]], size 32, align 32, offset 32] [from _ZTSN3BarUt_E] 11*0a6a1f1dSLionel Sambuc union { 12*0a6a1f1dSLionel Sambuc // CHECK: [ DW_TAG_member ] [i2] [line [[@LINE+1]], size 32, align 32, offset 0] [from int] 13*0a6a1f1dSLionel Sambuc int i2; 14*0a6a1f1dSLionel Sambuc }; 15*0a6a1f1dSLionel Sambuc }; 16*0a6a1f1dSLionel Sambuc 17*0a6a1f1dSLionel Sambuc Foo<Bar, &Bar::i2> the_foo; 18