summaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTMerge.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-02-10 17:16:49 +0000
committerDouglas Gregor <dgregor@apple.com>2010-02-10 17:16:49 +0000
commit0f962a8e61e1c094a89df17f9d3ad947d31c4e5c (patch)
treeada317fff9f2bf2614e59ee121af2c8c675c410a /lib/Frontend/ASTMerge.cpp
parent6b2accb4793e16b2e93a8c2589f5df702231f17a (diff)
downloadclang-0f962a8e61e1c094a89df17f9d3ad947d31c4e5c.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTMerge.cpp')
-rw-r--r--lib/Frontend/ASTMerge.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Frontend/ASTMerge.cpp b/lib/Frontend/ASTMerge.cpp
index d51647bb16..f2de09a74c 100644
--- a/lib/Frontend/ASTMerge.cpp
+++ b/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() {