summaryrefslogtreecommitdiffstats
path: root/clang/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
commit4ffbad1904b1e4e32ce3386f40b2a7a1b9c2ef58 (patch)
tree1019e4b1beff568eef3c5b2cef63321e95b43c29 /clang/lib/Sema/SemaDeclAttr.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/SemaDeclAttr.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index dee10fb608a..527b469fed8 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud