Skip to content
Snippets Groups Projects
Commit 025330a7 authored by Alexey Bataev's avatar Alexey Bataev
Browse files

Added test for capturing VLA types if the captured variable is a function parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212170 91177308-0d34-0410-b5e6-96231b3b80d8
parent 7a02dd69
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,19 @@ void test3(int size) {
// CHECK-3: call void @__captured_stmt
}
// Capture VLA array
void test4(int size, int vla_arr[size]) {
#pragma clang __debug captured
{
vla_arr[0] = 1;
}
// CHECK-3: test4([[INT:i.+]] [[SIZE:.+]], [[INT]]*
// CHECK-3: store [[INT]] [[SIZE]], [[INT]]* [[SIZE_ADDR:.+]],
// CHECK-3: [[REF:%.+]] = getelementptr inbounds
// CHECK-3: store [[INT]]* [[SIZE_ADDR]], [[INT]]** [[REF]]
// CHECK-3: call void @__captured_stmt
}
void dont_capture_global() {
static int s;
extern int e;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment