aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-23 22:44:42 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-23 22:44:42 +0000
commita8bc8c9e9ba5bffebde00340786fe8542469c435 (patch)
tree75be85d4dd770d5f44b6c43b54d38747e8de8e8b /lib/Sema/SemaTemplate.cpp
parentc32647d111e516593b9ba242cad7b8ff4016c155 (diff)
Implement parsing of function parameter packs and non-type template
parameter packs (C++0x [dcl.fct]p13), including disambiguation between unnamed function parameter packs and varargs (C++0x [dcl.fct]p14) for cases like void f(T...) where T may or may not contain unexpanded parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122520 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 1f3e2ef9c8..7357e94490 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -632,6 +632,12 @@ Decl *Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D,
Invalid = true;
}
+ if (D.hasEllipsis()) {
+ // FIXME: Variadic templates.
+ Diag(D.getEllipsisLoc(), diag::err_non_type_parameter_pack_unsupported);
+ Invalid = true;
+ }
+
NonTypeTemplateParmDecl *Param
= NonTypeTemplateParmDecl::Create(Context, Context.getTranslationUnitDecl(),
D.getIdentifierLoc(),