Teach ASTUnit to hold on to the Sema object and ASTConsumer that are
used when parsing (or re-parsing) a file. Also, when loading a precompiled header into ASTUnit, create a Sema object that holds onto semantic-analysis information. llvm-svn: 111003
This commit is contained in:
@@ -44,6 +44,12 @@ void ASTMergeAction::ExecuteAction() {
|
||||
if (!Unit)
|
||||
continue;
|
||||
|
||||
// Reset the argument -> string function so that it has the AST
|
||||
// context we want, since the Sema object created by
|
||||
// LoadFromPCHFile will override it.
|
||||
CI.getDiagnostics().SetArgToStringFn(&FormatASTNodeDiagnosticArgument,
|
||||
&CI.getASTContext());
|
||||
|
||||
ASTImporter Importer(CI.getDiagnostics(),
|
||||
CI.getASTContext(),
|
||||
CI.getFileManager(),
|
||||
|
||||
Reference in New Issue
Block a user