[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/2007-03-02-VaCopy.c

Evan Cheng evan.cheng at apple.com
Fri Mar 2 17:10:22 PST 2007



Changes in directory llvm-test/SingleSource/UnitTests:

2007-03-02-VaCopy.c added (r1.1)
---
Log message:

New test.

---
Diffs of the changes:  (+17 -0)

 2007-03-02-VaCopy.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+)


Index: llvm-test/SingleSource/UnitTests/2007-03-02-VaCopy.c
diff -c /dev/null llvm-test/SingleSource/UnitTests/2007-03-02-VaCopy.c:1.1
*** /dev/null	Fri Mar  2 19:10:15 2007
--- llvm-test/SingleSource/UnitTests/2007-03-02-VaCopy.c	Fri Mar  2 19:10:05 2007
***************
*** 0 ****
--- 1,17 ----
+ #include <stdio.h>
+ #include <stdarg.h>
+ 
+ void testVaCopyArg(char *fmt, ...) {
+   va_list ap, aq;
+   char *s;
+   va_start(ap, fmt);
+   va_copy(aq, ap);    /* test va_copy */
+ 
+   s = va_arg(aq, char *);
+   printf("string %s\n", s);
+ }
+ 
+ int main() {
+   testVaCopyArg("s", "abc");
+   return 0;
+ }






More information about the llvm-commits mailing list