[cfe-commits] r80177 - /cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

Douglas Gregor dgregor at apple.com
Wed Aug 26 16:26:04 PDT 2009


Author: dgregor
Date: Wed Aug 26 18:26:04 2009
New Revision: 80177

URL: http://llvm.org/viewvc/llvm-project?rev=80177&view=rev
Log:
Make sure to bump the reference count of the last element in the ParenListExpr representing the direct initializer of a declaration

Modified:
    cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=80177&r1=80176&r2=80177&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Wed Aug 26 18:26:04 2009
@@ -165,6 +165,7 @@
           FakeCommaLocs.push_back(
                                 SemaRef.PP.getLocForEndOfToken(E->getLocEnd()));
         }
+        PLE->getExpr(PLE->getNumExprs() - 1)->Retain();
       }
       
       // Add the direct initializer to the declaration.





More information about the cfe-commits mailing list