forked from OSchip/llvm-project
Install a diagnostic consumer into each new AST
context as the first thing we do. This prevents crashes if some of the initial setup produces messages or errors. <rdar://problem/20457882> llvm-svn: 234511
This commit is contained in:
parent
628d6057d0
commit
6d61b63cc5
|
@ -401,6 +401,9 @@ ClangASTContext::getASTContext()
|
|||
*getIdentifierTable(),
|
||||
*getSelectorTable(),
|
||||
*getBuiltinContext()));
|
||||
|
||||
m_ast_ap->getDiagnostics().setClient(getDiagnosticConsumer(), false);
|
||||
|
||||
m_ast_ap->InitBuiltinTypes(*getTargetInfo());
|
||||
|
||||
if ((m_callback_tag_decl || m_callback_objc_decl) && m_callback_baton)
|
||||
|
@ -409,8 +412,6 @@ ClangASTContext::getASTContext()
|
|||
//m_ast_ap->getTranslationUnitDecl()->setHasExternalVisibleStorage();
|
||||
}
|
||||
|
||||
m_ast_ap->getDiagnostics().setClient(getDiagnosticConsumer(), false);
|
||||
|
||||
GetASTMap().Insert(m_ast_ap.get(), this);
|
||||
}
|
||||
return m_ast_ap.get();
|
||||
|
|
Loading…
Reference in New Issue