]> granicus.if.org Git - clang/commitdiff
Add yet more testcases.
authorMike Stump <mrs@apple.com>
Thu, 29 Oct 2009 23:29:54 +0000 (23:29 +0000)
committerMike Stump <mrs@apple.com>
Thu, 29 Oct 2009 23:29:54 +0000 (23:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85535 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/object-size.c

index fc138e26fde94a3a2e1591b95af41f8026799fee..27e24ac120144d7baba0b4c51cdedfafc4ae6f4b 100644 (file)
@@ -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");
+}