]> granicus.if.org Git - clang/commitdiff
fix a bug that is causing CodeGen/complex.c to be grumpy.
authorChris Lattner <sabre@nondot.org>
Thu, 30 Aug 2007 06:19:11 +0000 (06:19 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Aug 2007 06:19:11 +0000 (06:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41603 91177308-0d34-0410-b5e6-96231b3b80d8

AST/Type.cpp

index 4d1cdf84973de865eb8432b713515a83f3fa6b0d..c0c278d19ec2e5fd8f9ff8e07609a31cdf2067e1 100644 (file)
@@ -436,7 +436,7 @@ bool Type::isFloatingType() const {
     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;