summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-06-22 22:12:46 +0000
committerDouglas Gregor <dgregor@apple.com>2010-06-22 22:12:46 +0000
commit4ffbad1904b1e4e32ce3386f40b2a7a1b9c2ef58 (patch)
tree1019e4b1beff568eef3c5b2cef63321e95b43c29 /clang/lib/Sema/SemaOverload.cpp
parent1023f6bd98ea12acadbdca9ef6e75ef35e95a76e (diff)
downloadbcm5719-llvm-4ffbad1904b1e4e32ce3386f40b2a7a1b9c2ef58.tar.gz
bcm5719-llvm-4ffbad1904b1e4e32ce3386f40b2a7a1b9c2ef58.zip
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. llvm-svn: 106584
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index a22556a7e5a..b4133e8b4ac 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/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();
OpenPOWER on IntegriCloud