llvm-project/clang/test/CodeGenCXX/vlt_to_reference.cpp
Alexey Bataev 7cb1789011 Fix for PR21915: assert on multidimensional VLA in function arguments.
Fixed assertion on type checking for arguments and parameters on function call if arguments are pointers to VLA
Differential Revision: http://reviews.llvm.org/D6655

llvm-svn: 224504
2014-12-18 06:54:53 +00:00

23 lines
313 B
C++

// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
// CHECK-LABEL: @main
struct dyn_array {
int size;
int data[];
};
int foo(dyn_array **&d) {
return (*d)->data[1];
}
int main()
{
dyn_array **d;
return foo(d);
// CHECK: call {{.+}} @{{.+}}foo{{.+}}(
// CHECK: ret i{{[0-9]+}}
}