diff options
author | Mike Stump <mrs@apple.com> | 2009-10-29 23:29:54 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-10-29 23:29:54 +0000 |
commit | dc28a8b9978e2d0d8a393c2fbac60f5debfcf42b (patch) | |
tree | 347cba85fff9e8a80198ef19a0cc9ff97abda6db /clang/test/CodeGen/object-size.c | |
parent | eb5c92b399715989a9aa36175f2cb8c4939acf33 (diff) | |
download | bcm5719-llvm-dc28a8b9978e2d0d8a393c2fbac60f5debfcf42b.tar.gz bcm5719-llvm-dc28a8b9978e2d0d8a393c2fbac60f5debfcf42b.zip |
Add yet more testcases.
llvm-svn: 85535
Diffstat (limited to 'clang/test/CodeGen/object-size.c')
-rw-r--r-- | clang/test/CodeGen/object-size.c | 30 |
1 files changed, 30 insertions, 0 deletions
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"); +} |