diff options
author | Anders Carlsson <andersca@mac.com> | 2009-11-24 16:52:50 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-11-24 16:52:50 +0000 |
commit | a244dc3a554f6bf82416697e34f9e96dc1efbb88 (patch) | |
tree | b749952c3856eb5b64b536938cce3c60a16dc6d5 /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 01234bbc1cb94946df8046ad95e17537082b4f71 (diff) |
Fix a crash when "instantiating" VarDecls that are neither type nor value dependent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 34dc947422..bda19f1e98 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -205,6 +205,7 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) { // we don't want to redo all the checking, especially since the // initializer might have been wrapped by a CXXConstructExpr since we did // it the first time. + Var->setType(D->getType()); Var->setInit(SemaRef.Context, Init.takeAs<Expr>()); } else if (ParenListExpr *PLE = dyn_cast<ParenListExpr>((Expr *)Init.get())) { |