forked from OSchip/llvm-project
c162e8e193
we would just leak them all over the place, with no clear ownership of these objects at all. AttributeList objects would get leaked on both error and non-error paths. Note: I introduced the usage of llvm::OwningPtr<AttributeList> to manage these objects, which is particularly useful for methods with multiple return sites. In at least one method I used them even when they weren't strictly necessary because it clarified the ownership semantics and made the code easier to read. Should the excessive 'take()' and 'reset()' calls become a performance issue we can always re-evaluate. Note+1: I believe I have not introduced any double-frees, but it would be nice for someone to review this. This fixes <rdar://problem/7635046>. llvm-svn: 95847 |
||
---|---|---|
.. | ||
AttributeList.cpp | ||
CMakeLists.txt | ||
DeclSpec.cpp | ||
Makefile | ||
MinimalAction.cpp | ||
ParseCXXInlineMethods.cpp | ||
ParseDecl.cpp | ||
ParseDeclCXX.cpp | ||
ParseExpr.cpp | ||
ParseExprCXX.cpp | ||
ParseInit.cpp | ||
ParseObjc.cpp | ||
ParsePragma.cpp | ||
ParsePragma.h | ||
ParseStmt.cpp | ||
ParseTemplate.cpp | ||
ParseTentative.cpp | ||
Parser.cpp | ||
RAIIObjectsForParser.h |