mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 10:55:58 +08:00
Fixed a leak of ASTStructExtractors and also
made sure we don't keep around no-longer-valid ASTTransformers. <rdar://problem/15182379> llvm-svn: 192333
This commit is contained in:
@@ -95,15 +95,9 @@ ClangUserExpression::~ClangUserExpression ()
|
||||
|
||||
clang::ASTConsumer *
|
||||
ClangUserExpression::ASTTransformer (clang::ASTConsumer *passthrough)
|
||||
{
|
||||
ClangASTContext *clang_ast_context = m_target->GetScratchClangASTContext();
|
||||
|
||||
if (!clang_ast_context)
|
||||
return NULL;
|
||||
|
||||
if (!m_result_synthesizer.get())
|
||||
m_result_synthesizer.reset(new ASTResultSynthesizer(passthrough,
|
||||
*m_target));
|
||||
{
|
||||
m_result_synthesizer.reset(new ASTResultSynthesizer(passthrough,
|
||||
*m_target));
|
||||
|
||||
return m_result_synthesizer.get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user