Make sure to bump the reference count of the last element in the ParenListExpr representing the direct initializer of a declaration

llvm-svn: 80177
This commit is contained in:
Douglas Gregor
2009-08-26 23:26:04 +00:00
parent b039caa1c3
commit ce2a5e18f2

View File

@@ -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.