1*67e74705SXin Li // REQUIRES: x86-registered-target 2*67e74705SXin Li // RUN: %clang_cc1 %s -mllvm -warn-stack-size=0 -emit-codegen-only -triple=i386-apple-darwin 2>&1 | FileCheck %s 3*67e74705SXin Li 4*67e74705SXin Li // TODO: Emit rich diagnostics for thunks and move this into the appropriate test file. 5*67e74705SXin Li // Until then, test that we fall back and display the LLVM backend diagnostic. 6*67e74705SXin Li namespace frameSizeThunkWarning { 7*67e74705SXin Li struct A { 8*67e74705SXin Li virtual void f(); 9*67e74705SXin Li }; 10*67e74705SXin Li 11*67e74705SXin Li struct B : virtual A { 12*67e74705SXin Li virtual void f(); 13*67e74705SXin Li }; 14*67e74705SXin Li 15*67e74705SXin Li // CHECK: warning: stack frame size of {{[0-9]+}} bytes in function 'frameSizeThunkWarning::B::f' 16*67e74705SXin Li // CHECK: warning: stack size limit exceeded ({{[0-9]+}}) in {{[^ ]+}} f()17*67e74705SXin Li void B::f() { } 18*67e74705SXin Li } 19