1 // RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
6 std::function
<int()> f
;
9 f
= [&x
]() __attribute__((noinline
)) {
11 // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
12 // We cannot assert the line, after the argument promotion pass this crashes
13 // in the BOOM line below instead, when the ref gets turned into a value.
14 // CHECK: #0 0x{{.*}} in {{.*}}use-after-scope-capture.cpp