annotate clang/test/Misc/backend-stack-frame-diagnostics-fallback.cpp @ 206:f17a3b42b08b

Added tag before-12 for changeset b7591485f4cd
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 07 Jun 2021 21:25:57 +0900
parents 1d019706d866
children 5f17cb93ff66
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // REQUIRES: x86-registered-target
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 %s -mllvm -warn-stack-size=0 -emit-codegen-only -triple=i386-apple-darwin 2>&1 | FileCheck %s
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 // TODO: Emit rich diagnostics for thunks and move this into the appropriate test file.
anatofuz
parents:
diff changeset
5 // Until then, test that we fall back and display the LLVM backend diagnostic.
anatofuz
parents:
diff changeset
6 namespace frameSizeThunkWarning {
anatofuz
parents:
diff changeset
7 struct A {
anatofuz
parents:
diff changeset
8 virtual void f();
anatofuz
parents:
diff changeset
9 };
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 struct B : virtual A {
anatofuz
parents:
diff changeset
12 virtual void f();
anatofuz
parents:
diff changeset
13 };
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 // CHECK: warning: stack frame size of {{[0-9]+}} bytes in function 'frameSizeThunkWarning::B::f'
anatofuz
parents:
diff changeset
16 // CHECK: warning: stack size limit exceeded ({{[0-9]+}}) in {{[^ ]+}}
anatofuz
parents:
diff changeset
17 void B::f() {
anatofuz
parents:
diff changeset
18 volatile int x = 0; // Ensure there is stack usage.
anatofuz
parents:
diff changeset
19 }
anatofuz
parents:
diff changeset
20 }