From 2fbe558cfe8de9e6c3fb1a8728e91df3d16d0413 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 10 Feb 2010 17:16:49 +0000 Subject: Teach AST merging that variables with incomplete array types can be merged with variables of constant array types. Also, make sure that we call DiagnosticClient's BeginSourceFile/EndSourceFile, so that it has a LangOptions to work with. llvm-svn: 95782 --- clang/lib/Frontend/ASTMerge.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clang/lib/Frontend/ASTMerge.cpp') diff --git a/clang/lib/Frontend/ASTMerge.cpp b/clang/lib/Frontend/ASTMerge.cpp index d51647b..f2de09a 100644 --- a/clang/lib/Frontend/ASTMerge.cpp +++ b/clang/lib/Frontend/ASTMerge.cpp @@ -32,6 +32,8 @@ bool ASTMergeAction::BeginSourceFileAction(CompilerInstance &CI, void ASTMergeAction::ExecuteAction() { CompilerInstance &CI = getCompilerInstance(); + CI.getDiagnostics().getClient()->BeginSourceFile( + CI.getASTContext().getLangOptions()); CI.getDiagnostics().SetArgToStringFn(&FormatASTNodeDiagnosticArgument, &CI.getASTContext()); for (unsigned I = 0, N = ASTFiles.size(); I != N; ++I) { @@ -68,8 +70,8 @@ void ASTMergeAction::ExecuteAction() { delete Unit; } - - return AdaptedAction->ExecuteAction(); + AdaptedAction->ExecuteAction(); + CI.getDiagnostics().getClient()->EndSourceFile(); } void ASTMergeAction::EndSourceFileAction() { -- cgit v1.1