summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionParser.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-12-05 22:54:56 +0000
committerZachary Turner <zturner@google.com>2014-12-05 22:54:56 +0000
commit22ac8711a5ae6706bd089597e864dbc77d27c925 (patch)
tree2c3d25d7a988b5507f89d0ce0ef988ca84329141 /lldb/source/Expression/ClangExpressionParser.cpp
parentddac6cbb34d609fb300f2fe58077ee7828c18c19 (diff)
downloadbcm5719-llvm-22ac8711a5ae6706bd089597e864dbc77d27c925.tar.gz
bcm5719-llvm-22ac8711a5ae6706bd089597e864dbc77d27c925.zip
Fix some uninitialized variables in ClangExpressionParser.
Reviewed by: Sean Callanan llvm-svn: 223541
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