1 // RUN: %clang_cc1 -triple=x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
5 [[clang::disable_tail_calls
]] virtual int m1() { return 1; }
6 virtual int m2() { return 2; }
8 [[clang::disable_tail_calls
]] int m4();
13 int m1() override
{ return 11; }
14 [[clang::disable_tail_calls
]] int m2() override
{ return 22; }
21 t
+= b
->m1() + b
->m2() + b
->m3() + b
->m4();
22 t
+= d
->m1() + d
->m2();
26 // CHECK: define linkonce_odr noundef i32 @_ZN1B2m3Ev(ptr {{[^,]*}} %this) [[ATTRFALSE:#[0-9]+]]
27 // CHECK: declare noundef i32 @_ZN1B2m4Ev(ptr {{[^,]*}}) [[ATTRTRUE0:#[0-9]+]]
28 // CHECK: define linkonce_odr noundef i32 @_ZN1B2m1Ev(ptr {{[^,]*}} %this) unnamed_addr [[ATTRTRUE1:#[0-9]+]]
29 // CHECK: define linkonce_odr noundef i32 @_ZN1B2m2Ev(ptr {{[^,]*}} %this) unnamed_addr [[ATTRFALSE:#[0-9]+]]
30 // CHECK: define linkonce_odr noundef i32 @_ZN1D2m1Ev(ptr {{[^,]*}} %this) unnamed_addr [[ATTRFALSE:#[0-9]+]]
31 // CHECK: define linkonce_odr noundef i32 @_ZN1D2m2Ev(ptr {{[^,]*}} %this) unnamed_addr [[ATTRTRUE1:#[0-9]+]]
33 // CHECK-NOT: attributes [[ATTRFALSE]] = { {{.*}}"disable-tail-calls"="false"{{.*}} }
34 // CHECK: attributes [[ATTRTRUE0]] = { {{.*}}"disable-tail-calls"="true"{{.*}} }
35 // CHECK: attributes [[ATTRTRUE1]] = { {{.*}}"disable-tail-calls"="true"{{.*}} }