summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r--lldb/source/Expression/ClangExpressionParser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp
index 0b66d57b208..4906108401a 100644
--- a/lldb/source/Expression/ClangExpressionParser.cpp
+++ b/lldb/source/Expression/ClangExpressionParser.cpp
@@ -106,7 +106,7 @@ public:
virtual void moduleImport(SourceLocation import_location,
ModuleIdPath path,
- const clang::Module */*null*/)
+ const clang::Module * /*null*/)
{
std::vector<llvm::StringRef> string_path;
@@ -143,7 +143,8 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope,
bool generate_debug_info) :
m_expr (expr),
m_compiler (),
- m_code_generator ()
+ m_code_generator (),
+ m_pp_callbacks(nullptr)
{
// 1. Create a new compiler instance.
m_compiler.reset(new CompilerInstance());
@@ -405,7 +406,7 @@ ClangExpressionParser::Parse (Stream &stream)
int num_errors = 0;
- if (m_pp_callbacks->hasErrors())
+ if (m_pp_callbacks && m_pp_callbacks->hasErrors())
{
num_errors++;
OpenPOWER on IntegriCloud