<div dir="ltr">Any chance of using unique_ptr or other RAII/etc ownership to make this API safer by default?</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 22, 2018 at 10:58 AM Raphael Isemann via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This revision was not accepted when it landed; it landed in state "Needs Review".<br>
This revision was automatically updated to reflect the committed changes.<br>
Closed by commit rL323138: Fix memory leak in TestClangASTContext.TestRecordHasFields (authored by teemperor, committed by ).<br>
Herald added a subscriber: llvm-commits.<br>
<br>
Changed prior to commit:<br>
  <a href="https://reviews.llvm.org/D42386?vs=130926&id=130928#toc" rel="noreferrer" target="_blank">https://reviews.llvm.org/D42386?vs=130926&id=130928#toc</a><br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D42386" rel="noreferrer" target="_blank">https://reviews.llvm.org/D42386</a><br>
<br>
Files:<br>
  lldb/trunk/unittests/Symbol/TestClangASTContext.cpp<br>
<br>
<br>
Index: lldb/trunk/unittests/Symbol/TestClangASTContext.cpp<br>
===================================================================<br>
--- lldb/trunk/unittests/Symbol/TestClangASTContext.cpp<br>
+++ lldb/trunk/unittests/Symbol/TestClangASTContext.cpp<br>
@@ -11,6 +11,8 @@<br>
<br>
 #include "gtest/gtest.h"<br>
<br>
+#include "clang/AST/DeclCXX.h"<br>
+<br>
 #include "lldb/Host/HostInfo.h"<br>
 #include "lldb/Symbol/ClangASTContext.h"<br>
 #include "lldb/Symbol/ClangUtil.h"<br>
@@ -375,6 +377,9 @@<br>
                    empty_derived_non_empty_vbase_cxx_decl, false));<br>
   EXPECT_TRUE(<br>
       ClangASTContext::RecordHasFields(empty_derived_non_empty_vbase_decl));<br>
+<br>
+  delete non_empty_base_spec;<br>
+  delete non_empty_vbase_spec;<br>
 }<br>
<br>
 TEST_F(TestClangASTContext, TemplateArguments) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>