summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-11-24 16:52:50 +0000
committerAnders Carlsson <andersca@mac.com>2009-11-24 16:52:50 +0000
commitb7408b95edfeb6633db21d58e59d6a642cb73f1b (patch)
treedb04c4fc5c3e51d068b4841c16a85e2d09a16df2 /clang/lib/Sema
parent965f450d423f9dd8649b60aa0f65ca8ffdb8e4d8 (diff)
downloadbcm5719-llvm-b7408b95edfeb6633db21d58e59d6a642cb73f1b.tar.gz
bcm5719-llvm-b7408b95edfeb6633db21d58e59d6a642cb73f1b.zip
Fix a crash when "instantiating" VarDecls that are neither type nor value dependent.
llvm-svn: 89774
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 34dc947422a..bda19f1e988 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/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())) {
OpenPOWER on IntegriCloud