summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-05-03 19:04:14 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-05-03 19:04:14 +0000
commitae674aeaabfd0889fc35dbfb5b65110ceecbc08e (patch)
treee6364dd745c5a97cc64187a5b1b27c367ce28e70
parentfc06fc4cff19d3828dd5a94b517895c28e83be43 (diff)
Ensure there is stack usage in stack size warning test
r359906 broke this because the only stack usage was from a spill which can be avoided since the only block is a return. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359918 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Misc/backend-stack-frame-diagnostics-fallback.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Misc/backend-stack-frame-diagnostics-fallback.cpp b/test/Misc/backend-stack-frame-diagnostics-fallback.cpp
index 8ae8c55396..332dd22fec 100644
--- a/test/Misc/backend-stack-frame-diagnostics-fallback.cpp
+++ b/test/Misc/backend-stack-frame-diagnostics-fallback.cpp
@@ -14,5 +14,7 @@ namespace frameSizeThunkWarning {
// CHECK: warning: stack frame size of {{[0-9]+}} bytes in function 'frameSizeThunkWarning::B::f'
// CHECK: warning: stack size limit exceeded ({{[0-9]+}}) in {{[^ ]+}}
- void B::f() { }
+ void B::f() {
+ volatile int x = 0; // Ensure there is stack usage.
+ }
}