- Change Type::isComplexType() to exlude GCC's complex integer extension. In general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec). 
- Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType().

This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46005 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Type.cpp b/AST/Type.cpp
index bb3fd9d..78e0dbb 100644
--- a/AST/Type.cpp
+++ b/AST/Type.cpp
@@ -74,7 +74,9 @@
 }
 
 bool Type::isComplexType() const {
-  return isa<ComplexType>(CanonicalType);
+  if (const ComplexType *CT = dyn_cast<ComplexType>(CanonicalType))
+    return CT->getElementType()->isFloatingType();
+  return false;
 }
 
 bool Type::isComplexIntegerType() const {