From dc28a8b9978e2d0d8a393c2fbac60f5debfcf42b Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Thu, 29 Oct 2009 23:29:54 +0000 Subject: Add yet more testcases. llvm-svn: 85535 --- clang/test/CodeGen/object-size.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'clang/test/CodeGen/object-size.c') diff --git a/clang/test/CodeGen/object-size.c b/clang/test/CodeGen/object-size.c index fc138e26fde..27e24ac1201 100644 --- a/clang/test/CodeGen/object-size.c +++ b/clang/test/CodeGen/object-size.c @@ -88,3 +88,33 @@ void test10() { // CHECK: call ___inline_strcpy_chk strcpy(*(++p), "Hi there"); } + +void test11() { + // CHECK-NOT: call ___strcpy_chk + // CHECK: call ___inline_strcpy_chk + strcpy(gp = gbuf, "Hi there"); +} + +void test12() { + // CHECK-NOT: call ___strcpy_chk + // CHECK: call ___inline_strcpy_chk + strcpy(++gp, "Hi there"); +} + +void test13() { + // CHECK-NOT: call ___strcpy_chk + // CHECK: call ___inline_strcpy_chk + strcpy(gp++, "Hi there"); +} + +void test14() { + // CHECK-NOT: call ___strcpy_chk + // CHECK: call ___inline_strcpy_chk + strcpy(--gp, "Hi there"); +} + +void test15() { + // CHECK-NOT: call ___strcpy_chk + // CHECK: call ___inline_strcpy_chk + strcpy(gp--, "Hi there"); +} -- cgit v1.2.3