1// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
2
3template<typename _CharT>
4struct basic_string {
5
6  basic_string&
7  assign(const _CharT* __s, const basic_string<_CharT> &x)
8  {
9    return *this;
10  }
11};
12
13void foo (const char *c) {
14  basic_string<char> str;
15  str.assign(c, str);
16}
17
18// CHECK: [[BS:.*]] = !MDCompositeType(tag: DW_TAG_structure_type, name: "basic_string<char>"
19// CHECK-SAME:                         line: 4
20// CHECK-SAME:                         size: 8, align: 8
21// CHECK: [[TYPE:![0-9]*]] = !MDSubroutineType(types: [[ARGS:.*]])
22// CHECK: [[ARGS]] = !{!{{.*}}, !{{.*}}, [[P:![0-9]*]], [[R:.*]]}
23// CHECK: [[P]] = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: [[CON:![0-9]*]]
24// CHECK: [[CON]] = !MDDerivedType(tag: DW_TAG_const_type, baseType: [[CH:![0-9]*]]
25// CHECK: [[CH]] = !MDBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
26
27// CHECK: [[R]] = !MDDerivedType(tag: DW_TAG_reference_type, baseType: [[CON2:![0-9]*]]
28// CHECK: [[CON2]] = !MDDerivedType(tag: DW_TAG_const_type, baseType: !"_ZTS12basic_stringIcE"
29// CHECK: !MDSubprogram(name: "assign"
30// CHECK-SAME:          line: 7
31// CHECK-SAME:          scopeLine: 8
32