diff options
Diffstat (limited to 'test/CodeGenCXX/vlt_to_reference.cpp')
-rw-r--r-- | test/CodeGenCXX/vlt_to_reference.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGenCXX/vlt_to_reference.cpp b/test/CodeGenCXX/vlt_to_reference.cpp new file mode 100644 index 0000000..49d7f1a --- /dev/null +++ b/test/CodeGenCXX/vlt_to_reference.cpp @@ -0,0 +1,22 @@ +// 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]+}} +} + |