From 102f1b68d468499a8175363b39b58ec712962aaa Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 8 Nov 2003 23:00:49 +0000 Subject: [PATCH] new testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9815 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr diff --git a/test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr b/test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr new file mode 100644 index 00000000000..410e41ceab2 --- /dev/null +++ b/test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr @@ -0,0 +1,10 @@ +// RUN: %llvmg++ -xc++ %s -c -o - | llvm-dis | grep getelementptr + +struct foo { + int array[100]; + void *getAddr(unsigned i); +}; + +void *foo::getAddr(unsigned i) { + return &array[i]; +} -- 2.34.1