[cfe-commits] r67573 - /cfe/trunk/lib/Sema/SemaAttr.cpp

Ted Kremenek kremenek at apple.com
Mon Mar 23 15:50:47 PDT 2009


Author: kremenek
Date: Mon Mar 23 17:50:47 2009
New Revision: 67573

URL: http://llvm.org/viewvc/llvm-project?rev=67573&view=rev
Log:
Deallocate 'DeclRefExpr's in correctly formed '#pragma unused'

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

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

==============================================================================
--- cfe/trunk/lib/Sema/SemaAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaAttr.cpp Mon Mar 23 17:50:47 2009
@@ -206,5 +206,6 @@
   for (unsigned i = 0; i < NumExprs; ++i) {
     DeclRefExpr *DR = (DeclRefExpr*) Exprs[i];
     DR->getDecl()->addAttr(::new (Context) UnusedAttr());
+    DR->Destroy(Context);
   }
 }





More information about the cfe-commits mailing list