fix a bug that is causing CodeGen/complex.c to be grumpy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41603 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Type.cpp b/AST/Type.cpp
index 4d1cdf8..c0c278d 100644
--- a/AST/Type.cpp
+++ b/AST/Type.cpp
@@ -436,7 +436,7 @@
     return BT->getKind() >= BuiltinType::Float &&
            BT->getKind() <= BuiltinType::LongDouble;
   if (const ComplexType *CT = dyn_cast<ComplexType>(CanonicalType))
-    return CT->isFloatingType();
+    return CT->getElementType()->isFloatingType();
   if (const VectorType *VT = dyn_cast<VectorType>(CanonicalType))
     return VT->getElementType()->isFloatingType();
   return false;