[cfe-commits] r58429 - /cfe/trunk/lib/AST/Type.cpp
Douglas Gregor
doug.gregor at gmail.com
Thu Oct 30 06:47:08 PDT 2008
Author: dgregor
Date: Thu Oct 30 08:47:07 2008
New Revision: 58429
URL: http://llvm.org/viewvc/llvm-project?rev=58429&view=rev
Log:
Fix arithmetic type check
Modified:
cfe/trunk/lib/AST/Type.cpp
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=58429&r1=58428&r2=58429&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Thu Oct 30 08:47:07 2008
@@ -587,7 +587,8 @@
bool Type::isArithmeticType() const {
if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
- return BT->getKind() != BuiltinType::Void;
+ return BT->getKind() >= BuiltinType::Bool &&
+ BT->getKind() <= BuiltinType::LongDouble;
if (const EnumType *ET = dyn_cast<EnumType>(CanonicalType))
// GCC allows forward declaration of enum types (forbid by C99 6.7.2.3p2).
// If a body isn't seen by the time we get here, return false.
More information about the cfe-commits
mailing list