// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -gline-tables-only %s -o - | FileCheck %s
// Crasher for PR22929.
class Base {
  virtual void VariadicFunction(...);
};

class Derived : public virtual Base {
  virtual void VariadicFunction(...);
};

void Derived::VariadicFunction(...) { }

// CHECK-LABEL: define void @_ZN7Derived16VariadicFunctionEz(
// CHECK: ret void, !dbg ![[LOC:[0-9]+]]
// CHECK-LABEL: define void @_ZT{{.+}}N7Derived16VariadicFunctionEz(
// CHECK: ret void, !dbg ![[LOC:[0-9]+]]
//
// CHECK: !llvm.dbg.cu = !{![[CU:[0-9]+]]}
//
// CHECK: ![[CU]] = !MDCompileUnit({{.*}} subprograms: ![[SPs:[0-9]+]]
// CHECK: ![[SPs]] = !{![[SP:[0-9]+]]}
// CHECK: ![[SP]] = !MDSubprogram(name: "VariadicFunction",{{.*}} function: {{[^:]+}} @_ZN7Derived16VariadicFunctionEz
// CHECK: ![[LOC]] = !MDLocation({{.*}}scope: ![[SP]])

Test that linetables work with variadic virtual thunks
CodeGenCXX: Test that linetables work with variadic virtual thunks

Add a frontend test for PR22929, which was fixed by LLVM r232449.
Besides the crash test, check that the `!dbg` attachment is sane since
its presence was the trigger.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@232450 91177308-0d34-0410-b5e6-96231b3b80d8
