summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 26ae4b1f7f8..48f115fd3e3 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -166,6 +166,8 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
CI.createASTContext();
llvm::OwningPtr<ASTConsumer> Consumer(CreateASTConsumer(CI, Filename));
+ if (!Consumer)
+ goto failure;
CI.getASTContext().setASTMutationListener(Consumer->GetASTMutationListener());
OpenPOWER on IntegriCloud