]> granicus.if.org Git - clang/commitdiff
Make sure to bump the reference count of the last element in the ParenListExpr repres...
authorDouglas Gregor <dgregor@apple.com>
Wed, 26 Aug 2009 23:26:04 +0000 (23:26 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 26 Aug 2009 23:26:04 +0000 (23:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80177 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplateInstantiateDecl.cpp

index 71fb36892b610598e2c7961b0597b94107f3ad10..5e917890836ef9a3b82c61eed356381e9f3f4304 100644 (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.