clang/test/AST/ByteCode/codegen-cxx20.cpp
raw| 1 | // RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -o - %s -fcxx-exceptions | FileCheck %s |
| 2 | // RUN: %clang_cc1 -triple x86_64-linux -emit-llvm -o - %s -fcxx-exceptions -fexperimental-new-constant-interpreter | FileCheck %s |
| 3 | |
| 4 | |
| 5 | /// The read from a used to succeed, causing the entire if statement to vanish. |
| 6 | extern void e(); |
| 7 | int somefunc() { |
| 8 | auto foo = [a = false]() mutable { |
| 9 | if (a) |
| 10 | e(); |
| 11 | }; |
| 12 | foo(); |
| 13 | } |
| 14 | |
| 15 | // CHECK: call void @_Z1ev() |