diff options
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendAction.cpp | 2 |
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()); |