diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-05-01 09:29:55 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-05-01 09:29:55 +0000 |
commit | cec0ced5bd3de14d7cebbc1a240618282c91f656 (patch) | |
tree | 81950515e3dfdab774c6975acf876800b1a68728 | |
parent | af5a3c6af37a16b0ca686e6af994010b0b3785dd (diff) |
Switch __is_scalar to use the isScalarType predicate rather than
duplicating its logic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130654 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 0f715f0b8f..2664c7811c 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -2507,12 +2507,7 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, UnaryTypeTrait UTT, // !__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: |