From 6d051ae90dcad9b2d17f58764a5b9811d5b323c2 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 14 Apr 2023 13:47:26 -0700 Subject: [PATCH] [ASan] fix test broken by argument promotion pass Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D148376 --- compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp b/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp index b3dbfb6..2e27a16 100644 --- a/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp +++ b/compiler-rt/test/asan/TestCases/use-after-scope-capture.cpp @@ -9,7 +9,9 @@ int main() { f = [&x]() __attribute__((noinline)) { return x; // BOOM // CHECK: ERROR: AddressSanitizer: stack-use-after-scope - // CHECK: #0 0x{{.*}} in {{.*}}use-after-scope-capture.cpp:[[@LINE-2]] + // We cannot assert the line, after the argument promotion pass this crashes + // in the BOOM line below instead, when the ref gets turned into a value. + // CHECK: #0 0x{{.*}} in {{.*}}use-after-scope-capture.cpp }; } return f(); // BOOM -- 2.7.4