]> granicus.if.org Git - clang/commitdiff
Ensure there is stack usage in stack size warning test
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 3 May 2019 19:04:14 +0000 (19:04 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 3 May 2019 19:04:14 +0000 (19:04 +0000)
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

test/Misc/backend-stack-frame-diagnostics-fallback.cpp

index 8ae8c55396dcabaef336e50931cedeb9de6cd900..332dd22fecb33dff82b3d73ef293b7e56f9f652b 100644 (file)
@@ -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.
+  }
 }