[asan][test] Fix use-after-scope-capture test after D148269
authorPaul Kirth <paulkirth@google.com>
Fri, 14 Apr 2023 23:51:34 +0000 (23:51 +0000)
committerPaul Kirth <paulkirth@google.com>
Sat, 15 Apr 2023 00:10:49 +0000 (00:10 +0000)
After enabling ArgPromotion at lower opt levels, the body of this test
was optimized away, and the CHECK lines no longer functioned.

Setting -O0 is a hammer, but gets the test passing again, until code owners
can find a better solution.

Reviewed By: fmayer

Differential Revision: https://reviews.llvm.org/D148396

compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp

index 2e27a16..0eca271 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
 
 #include <functional>