aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclAttr.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
commit8eee119bf4f1693dde17b8552c1f9f81bf2b681e (patch)
tree601a85f32ae7619aeae6101e12360190f6b7df06 /lib/Sema/SemaDeclAttr.cpp
parentbe6d8e3bc409fe70964e5fdb675571fde37a59d0 (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/SemaDeclAttr.cpp')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index dee10fb608..527b469fed 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -1410,7 +1410,7 @@ static void HandleTransparentUnionAttr(Decl *d, const AttributeList &Attr,
FieldDecl *FirstField = *Field;
QualType FirstType = FirstField->getType();
- if (FirstType->isFloatingType() || FirstType->isVectorType()) {
+ if (FirstType->hasFloatingRepresentation()) {
S.Diag(FirstField->getLocation(),
diag::warn_transparent_union_attribute_floating);
return;