From: Benjamin Kramer Date: Sat, 14 Apr 2012 12:44:47 +0000 (+0000) Subject: Delete late parsed attributes instead of leaking them. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d306cf7b21c7924fdf5655265f4b22ff85db4fae;p=clang Delete late parsed attributes instead of leaking them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154746 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index be84cdc55a..884820e023 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -756,6 +756,7 @@ void Parser::ParseLexedAttributeList(LateParsedAttrList &LAs, Decl *D, for (unsigned i = 0, ni = LAs.size(); i < ni; ++i) { LAs[i]->addDecl(D); ParseLexedAttribute(*LAs[i], EnterScope, OnDefinition); + delete LAs[i]; } LAs.clear(); }