summaryrefslogtreecommitdiffstats
path: root/clang/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
commit2fbe558cfe8de9e6c3fb1a8728e91df3d16d0413 (patch)
treed3c7f32872a510ba108c473bb4640f0df737387a /clang/lib/Frontend/ASTMerge.cpp
parent4a618827de7c540c68685789d1eb9b2b50cdc33f (diff)
downloadbcm5719-llvm-2fbe558cfe8de9e6c3fb1a8728e91df3d16d0413.tar.gz
bcm5719-llvm-2fbe558cfe8de9e6c3fb1a8728e91df3d16d0413.zip
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
Diffstat (limited to 'clang/lib/Frontend/ASTMerge.cpp')
-rw-r--r--clang/lib/Frontend/ASTMerge.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Frontend/ASTMerge.cpp b/clang/lib/Frontend/ASTMerge.cpp
index d51647bb161..f2de09a74cc 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() {
OpenPOWER on IntegriCloud