diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-06-22 22:12:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-06-22 22:12:46 +0000 |
commit | 8eee119bf4f1693dde17b8552c1f9f81bf2b681e (patch) | |
tree | 601a85f32ae7619aeae6101e12360190f6b7df06 /lib/Sema/SemaOverload.cpp | |
parent | be6d8e3bc409fe70964e5fdb675571fde37a59d0 (diff) |
Change Type::isFloatingType() to reflect the actual definition of a
"floating type" in C, which does not include vector types. Introduce
Type::hasFloatingRepresentation() for the places where we want to know
whether the underlying representation is one or more floating-point
values. Remove some hacks we had where the former behavior of
Type::isFloatingType() was at odds with the language definition of the
term.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106584 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index a22556a7e5..b4133e8b4a 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -1015,18 +1015,14 @@ Sema::IsStandardConversion(Expr* From, QualType ToType, // Complex-real conversions (C99 6.3.1.7) SCS.Second = ICK_Complex_Real; FromType = ToType.getUnqualifiedType(); - } else if (FromType->isFloatingType() && ToType->isFloatingType() && - /*FIXME*/!FromType->isVectorType() && - /*FIXME*/!ToType->isVectorType()) { + } else if (FromType->isFloatingType() && ToType->isFloatingType()) { // Floating point conversions (C++ 4.8). SCS.Second = ICK_Floating_Conversion; FromType = ToType.getUnqualifiedType(); } else if ((FromType->isFloatingType() && - /*FIXME*/!FromType->isVectorType() && ToType->isIntegralType(Context) && !ToType->isBooleanType()) || (FromType->isIntegralOrEnumerationType() && - ToType->isFloatingType() && - /*FIXME*/!FromType->isVectorType())) { + ToType->isFloatingType())) { // Floating-integral conversions (C++ 4.9). SCS.Second = ICK_Floating_Integral; FromType = ToType.getUnqualifiedType(); |