aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-06-16 00:17:44 +0000
committerDouglas Gregor <dgregor@apple.com>2010-06-16 00:17:44 +0000
commit2ade35e2cfd554e49d35a52047cea98a82787af9 (patch)
treeb3d261cde2d8f15007d53bd5f103ab6d1b75a595 /lib/Sema/SemaTemplate.cpp
parentff2d05f653948e4bb2877c210f9fa7a2888ceb5c (diff)
Introduce Type::isIntegralOrEnumerationType(), to cover those places
in C++ that involve both integral and enumeration types. Convert all of the callers to Type::isIntegralType() that are meant to work with both integral and enumeration types over to Type::isIntegralOrEnumerationType(), to prepare to eliminate enumeration types as integral types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 234665c4aa..a2d4de5b1f 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -549,7 +549,7 @@ Sema::CheckNonTypeTemplateParameterType(QualType T, SourceLocation Loc) {
// (optionally cv-qualified) types:
//
// -- integral or enumeration type,
- if (T->isIntegralType() || T->isEnumeralType() ||
+ if (T->isIntegralOrEnumerationType() ||
// -- pointer to object or pointer to function,
(T->isPointerType() &&
(T->getAs<PointerType>()->getPointeeType()->isObjectType() ||
@@ -2777,7 +2777,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
// conversions (4.7) are applied.
QualType ParamType = InstantiatedParamType;
QualType ArgType = Arg->getType();
- if (ParamType->isIntegralType() || ParamType->isEnumeralType()) {
+ if (ParamType->isIntegralOrEnumerationType()) {
// C++ [temp.arg.nontype]p1:
// A template-argument for a non-type, non-template
// template-parameter shall be one of:
@@ -2787,7 +2787,7 @@ bool Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
// -- the name of a non-type template-parameter; or
SourceLocation NonConstantLoc;
llvm::APSInt Value;
- if (!ArgType->isIntegralType() && !ArgType->isEnumeralType()) {
+ if (!ArgType->isIntegralOrEnumerationType()) {
Diag(Arg->getSourceRange().getBegin(),
diag::err_template_arg_not_integral_or_enumeral)
<< ArgType << Arg->getSourceRange();