diff options
Diffstat (limited to 'clang/lib/AST/CFG.cpp')
-rw-r--r-- | clang/lib/AST/CFG.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/AST/CFG.cpp b/clang/lib/AST/CFG.cpp index 2ea83882876..e08a00b8a5e 100644 --- a/clang/lib/AST/CFG.cpp +++ b/clang/lib/AST/CFG.cpp @@ -379,11 +379,8 @@ CFGBlock* CFGBuilder::WalkAST(Stmt* Terminator, bool AlwaysAddStmt = false) { ? 8 : llvm::AlignOf<DeclStmt>::Alignment; // Allocate the DeclStmt using the BumpPtrAllocator. It will - // get automatically freed with the CFG. Note that even though - // we are using a DeclGroupOwningRef that wraps a singe Decl*, - // that Decl* will not get deallocated because the destroy method - // of DG is never called. - DeclGroupOwningRef DG(*I); + // get automatically freed with the CFG. + DeclGroupRef DG(*I); Decl* D = *I; void* Mem = cfg->getAllocator().Allocate(sizeof(DeclStmt), A); |