llvm-project/clang/lib/Parse
Ted Kremenek c162e8e193 Clean up ownership of 'AttributeList' objects in Parser. Apparently
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
2010-02-11 02:19:13 +00:00
..
AttributeList.cpp Parse C++ member check attributes - base_check, hiding, and override. 2009-11-25 04:20:27 +00:00
CMakeLists.txt Reorder files. 2009-07-21 21:03:50 +00:00
DeclSpec.cpp Revert the unused TST_pixel entry from r95335 as it is not listed in the Sema 2010-02-05 07:38:55 +00:00
Makefile -fno-rtti is now the default. 2010-01-24 20:43:31 +00:00
MinimalAction.cpp Keep track of the source locations for each protocol reference in 2010-01-16 15:02:53 +00:00
ParseCXXInlineMethods.cpp Refactor to remove more dependencies on PreDeclaratorDC. I seem to have made 2009-12-19 10:49:29 +00:00
ParseDecl.cpp Clean up ownership of 'AttributeList' objects in Parser. Apparently 2010-02-11 02:19:13 +00:00
ParseDeclCXX.cpp Clean up ownership of 'AttributeList' objects in Parser. Apparently 2010-02-11 02:19:13 +00:00
ParseExpr.cpp When we're parsing an expression that may have looked like a 2010-02-05 19:11:37 +00:00
ParseExprCXX.cpp In some contexts, type declarations cannot occur. Pass this information down to ParseClassSpecifier, to make its decision easier. Fixes PR6200. 2010-02-03 21:21:43 +00:00
ParseInit.cpp PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients 2009-10-18 21:17:35 +00:00
ParseObjc.cpp Clean up ownership of 'AttributeList' objects in Parser. Apparently 2010-02-11 02:19:13 +00:00
ParsePragma.cpp Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
ParsePragma.h Remove tabs, and whitespace cleanups. 2009-09-09 15:08:12 +00:00
ParseStmt.cpp Clean up ownership of 'AttributeList' objects in Parser. Apparently 2010-02-11 02:19:13 +00:00
ParseTemplate.cpp When placing an annotation token over an existing annotation token, make sure that the new token's range extends to the end of the old token. Assert that in AnnotateCachedTokens. Fixes PR6248. 2010-02-08 19:35:18 +00:00
ParseTentative.cpp First stage of adding AltiVec support 2010-02-05 00:12:22 +00:00
Parser.cpp Clean up ownership of 'AttributeList' objects in Parser. Apparently 2010-02-11 02:19:13 +00:00
RAIIObjectsForParser.h Privatize class members. 2009-12-10 21:50:21 +00:00