aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-26 23:26:04 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-26 23:26:04 +0000
commite9f8eb64ed2d41c23db4a9774768613d4e07a865 (patch)
tree7e25d19369fcc7c950f52dc48c8e53dac7e42ee4
parentc56642301eaa6335ea9ad210ff923080f841464b (diff)
Make sure to bump the reference count of the last element in the ParenListExpr representing the direct initializer of a declaration
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80177 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 71fb36892b..5e91789083 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -165,6 +165,7 @@ Decl *TemplateDeclInstantiator::VisitVarDecl(VarDecl *D) {
FakeCommaLocs.push_back(
SemaRef.PP.getLocForEndOfToken(E->getLocEnd()));
}
+ PLE->getExpr(PLE->getNumExprs() - 1)->Retain();
}
// Add the direct initializer to the declaration.