aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateVariadic.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-05 21:11:38 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-05 21:11:38 +0000
commit1fe85ea697fb5c85acded3ac0ddbc19f89c2e181 (patch)
tree5f8a42d98e3f99c1ed0020cce5b8020fe574b788 /lib/Sema/SemaTemplateVariadic.cpp
parent135ffa7375fb5802b92f42774e02d0e6e4c78e5b (diff)
Add Decl::isParameterPack(), which covers both function and template
parameter packs, along with ParmVarDecl::isParameterPack(), which looks for function parameter packs. Use these routines to fix some obvious FIXMEs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateVariadic.cpp')
-rw-r--r--lib/Sema/SemaTemplateVariadic.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaTemplateVariadic.cpp b/lib/Sema/SemaTemplateVariadic.cpp
index fb88bd114b..3090d1532d 100644
--- a/lib/Sema/SemaTemplateVariadic.cpp
+++ b/lib/Sema/SemaTemplateVariadic.cpp
@@ -602,9 +602,8 @@ ExprResult Sema::ActOnSizeofParameterPackExpr(Scope *S,
case LookupResult::NotFoundInCurrentInstantiation:
if (DeclarationName CorrectedName = CorrectTypo(R, S, 0, 0, false,
CTC_NoKeywords)) {
- // FIXME: Variadic templates function parameter packs.
if (NamedDecl *CorrectedResult = R.getAsSingle<NamedDecl>())
- if (CorrectedResult->isTemplateParameterPack()) {
+ if (CorrectedResult->isParameterPack()) {
ParameterPack = CorrectedResult;
Diag(NameLoc, diag::err_sizeof_pack_no_pack_name_suggest)
<< &Name << CorrectedName
@@ -624,8 +623,7 @@ ExprResult Sema::ActOnSizeofParameterPackExpr(Scope *S,
return ExprError();
}
- // FIXME: Variadic templates function parameter packs.
- if (!ParameterPack || !ParameterPack->isTemplateParameterPack()) {
+ if (!ParameterPack || !ParameterPack->isParameterPack()) {
Diag(NameLoc, diag::err_sizeof_pack_no_pack_name)
<< &Name;
return ExprError();