diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-23 22:50:47 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-23 22:50:47 +0000 |
commit | 45a3c05640b1b08e7f7f69f633f899fd0e792f3c (patch) | |
tree | 0986946c76056437bd52b979f7457e48e4884af2 /lib/Sema/SemaAttr.cpp | |
parent | 632d1ece2715b1c8a0c99e1b8b487f4c148c89d5 (diff) |
Deallocate 'DeclRefExpr's in correctly formed '#pragma unused'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67573 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaAttr.cpp')
-rw-r--r-- | lib/Sema/SemaAttr.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index a799169f23..1bf8444c42 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -206,5 +206,6 @@ void Sema::ActOnPragmaUnused(ExprTy **Exprs, unsigned NumExprs, for (unsigned i = 0; i < NumExprs; ++i) { DeclRefExpr *DR = (DeclRefExpr*) Exprs[i]; DR->getDecl()->addAttr(::new (Context) UnusedAttr()); + DR->Destroy(Context); } } |