[cfe-commits] r130654 - /cfe/trunk/lib/Sema/SemaExprCXX.cpp
Chandler Carruth
chandlerc at gmail.com
Sun May 1 02:29:55 PDT 2011
Author: chandlerc
Date: Sun May 1 04:29:55 2011
New Revision: 130654
URL: http://llvm.org/viewvc/llvm-project?rev=130654&view=rev
Log:
Switch __is_scalar to use the isScalarType predicate rather than
duplicating its logic.
Modified:
cfe/trunk/lib/Sema/SemaExprCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=130654&r1=130653&r2=130654&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sun May 1 04:29:55 2011
@@ -2507,12 +2507,7 @@
// !__is_reference(T) && !__is_function(T) && !__is_void(T).
return ! (T->isReferenceType() || T->isFunctionType() || T->isVoidType());
case UTT_IsScalar:
- // Scalar type is defined in Section 3.9 p10 of the Working Draft.
- // Essentially:
- // __is_arithmetic( T ) || __is_enumeration(T) ||
- // __is_pointer(T) || __is_member_pointer(T)
- return (T->isArithmeticType() || T->isEnumeralType() ||
- T->isPointerType() || T->isMemberPointerType());
+ return T->isScalarType();
case UTT_IsCompound:
return ! (T->isVoidType() || T->isArithmeticType()) || T->isEnumeralType();
case UTT_IsMemberPointer:
More information about the cfe-commits
mailing list