From bdb84f374cde7736ca68d5db2c2ecf5468346710 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 22 Jul 2016 23:36:59 +0000 Subject: P0217R3: Parsing support and framework for AST representation of C++1z decomposition declarations. There are a couple of things in the wording that seem strange here: decomposition declarations are permitted at namespace scope (which we partially support here) and they are permitted as the declaration in a template (which we reject). llvm-svn: 276492 --- clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'clang/lib/Sema/SemaTemplateInstantiateDecl.cpp') diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 6a213953ec9..967c2beec4c 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -598,6 +598,16 @@ TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(TypeAliasTemplateDecl *D) { return Inst; } +Decl *TemplateDeclInstantiator::VisitBindingDecl(BindingDecl *D) { + return BindingDecl::Create(SemaRef.Context, Owner, D->getLocation(), + D->getIdentifier()); +} + +Decl *TemplateDeclInstantiator::VisitDecompositionDecl(DecompositionDecl *D) { + // FIXME: Instantiate bindings and pass them in. + return VisitVarDecl(D, /*InstantiatingVarTemplate=*/false); +} + Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) { return VisitVarDecl(D, /*InstantiatingVarTemplate=*/false); } -- cgit v1.2.3