Finish up handling all permutations of "complex int" (in Sema::UsualArithmeticConversions()).
A FIXME remains to verify the conversion rules are consistent with GCC.
Thanks to Eli for the new/improved test case...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46022 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/complex-int.c b/test/Sema/complex-int.c
index 1e2f8cf..d7244d1 100644
--- a/test/Sema/complex-int.c
+++ b/test/Sema/complex-int.c
@@ -21,3 +21,23 @@
}
}
+void Tester() {
+__complex short a1;
+__complex int a2;
+__complex float a3;
+__complex double a4;
+short a5;
+int a6;
+float a7;
+double a8;
+#define TestPair(m,n) int x##m##n = a##m+a##n;
+#define TestPairs(m) TestPair(m,1) TestPair(m,2) \
+ TestPair(m,3) TestPair(m,4) \
+ TestPair(m,5) TestPair(m,6) \
+ TestPair(m,7) TestPair(m,8)
+TestPairs(1); TestPairs(2);
+TestPairs(3); TestPairs(4);
+TestPairs(5); TestPairs(6);
+TestPairs(7); TestPairs(8);
+}
+