[cfe-commits] r122599 - /cfe/trunk/test/Sema/cast.c

Abramo Bagnara abramo.bagnara at gmail.com
Tue Dec 28 09:19:27 PST 2010


Author: abramo
Date: Tue Dec 28 11:19:27 2010
New Revision: 122599

URL: http://llvm.org/viewvc/llvm-project?rev=122599&view=rev
Log:
Added scalar casts test.

Modified:
    cfe/trunk/test/Sema/cast.c

Modified: cfe/trunk/test/Sema/cast.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/cast.c?rev=122599&r1=122598&r2=122599&view=diff
==============================================================================
--- cfe/trunk/test/Sema/cast.c (original)
+++ cfe/trunk/test/Sema/cast.c Tue Dec 28 11:19:27 2010
@@ -16,3 +16,144 @@
         return (long)(*next)++;  
 }
 
+typedef _Bool Bool;
+typedef int Int;
+typedef long Long;
+typedef float Float;
+typedef double Double;
+typedef _Complex int CInt;
+typedef _Complex long CLong;
+typedef _Complex float CFloat;
+typedef _Complex double CDouble;
+typedef void *VoidPtr;
+typedef char *CharPtr;
+
+void testBool(Bool v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (Float) v;
+  (void) (Double) v;
+  (void) (CInt) v;
+  (void) (CLong) v;
+  (void) (CFloat) v;
+  (void) (CDouble) v;
+  (void) (VoidPtr) v;
+  (void) (CharPtr) v;
+}
+
+void testInt(Int v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (Float) v;
+  (void) (Double) v;
+  (void) (CInt) v;
+  (void) (CLong) v;
+  (void) (CFloat) v;
+  (void) (CDouble) v;
+  (void) (VoidPtr) v;
+  (void) (CharPtr) v;
+}
+
+void testLong(Long v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (Float) v;
+  (void) (Double) v;
+  (void) (CInt) v;
+  (void) (CLong) v;
+  (void) (CFloat) v;
+  (void) (CDouble) v;
+  (void) (VoidPtr) v;
+  (void) (CharPtr) v;
+}
+
+void testFloat(Float v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (Float) v;
+  (void) (Double) v;
+  (void) (CInt) v;
+  (void) (CLong) v;
+  (void) (CFloat) v;
+  (void) (CDouble) v;
+}
+
+void testDouble(Double v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (Float) v;
+  (void) (Double) v;
+  (void) (CInt) v;
+  (void) (CLong) v;
+  (void) (CFloat) v;
+  (void) (CDouble) v;
+}
+
+void testCI(CInt v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (Float) v;
+  (void) (Double) v;
+  (void) (CInt) v;
+  (void) (CLong) v;
+  (void) (CFloat) v;
+  (void) (CDouble) v;
+}
+
+void testCLong(CLong v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (Float) v;
+  (void) (Double) v;
+  (void) (CInt) v;
+  (void) (CLong) v;
+  (void) (CFloat) v;
+  (void) (CDouble) v;
+}
+
+void testCFloat(CFloat v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (Float) v;
+  (void) (Double) v;
+  (void) (CInt) v;
+  (void) (CLong) v;
+  (void) (CFloat) v;
+  (void) (CDouble) v;
+}
+
+void testCDouble(CDouble v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (Float) v;
+  (void) (Double) v;
+  (void) (CInt) v;
+  (void) (CLong) v;
+  (void) (CFloat) v;
+  (void) (CDouble) v;
+}
+
+void testVoidPtr(VoidPtr v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (VoidPtr) v;
+  (void) (CharPtr) v;
+}
+
+void testCharPtr(CharPtr v) {
+  (void) (Bool) v;
+  (void) (Int) v;
+  (void) (Long) v;
+  (void) (VoidPtr) v;
+  (void) (CharPtr) v;
+}





More information about the cfe-commits mailing list