mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-14 01:46:41 +00:00

This patch makes sure that everything is cleaned up properly when ExprConstant evaluates an ArrayInitLoopExpr. Fixes #57135
14 lines
271 B
C++
14 lines
271 B
C++
// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -std=c++17 -verify %s
|
|
// RUN: %clang_cc1 -std=c++17 -verify=ref %s
|
|
|
|
// ref-no-diagnostics
|
|
// expected-no-diagnostics
|
|
|
|
void used_to_crash() {
|
|
int s[2][2];
|
|
|
|
int arr[4];
|
|
|
|
arr[0] = [s] { return s[0][0]; }();
|
|
}
|