[Lldb-commits] [lldb] r223541 - Fix some uninitialized variables in ClangExpressionParser.

Zachary Turner zturner at google.com
Fri Dec 5 14:54:56 PST 2014


Author: zturner
Date: Fri Dec  5 16:54:56 2014
New Revision: 223541

URL: http://llvm.org/viewvc/llvm-project?rev=223541&view=rev
Log:
Fix some uninitialized variables in ClangExpressionParser.

Reviewed by: Sean Callanan

Modified:
    lldb/trunk/source/Expression/ClangExpressionParser.cpp

Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=223541&r1=223540&r2=223541&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Fri Dec  5 16:54:56 2014
@@ -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::ClangExpressionPa
                                               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 &st
 
     int num_errors = 0;
     
-    if (m_pp_callbacks->hasErrors())
+    if (m_pp_callbacks && m_pp_callbacks->hasErrors())
     {
         num_errors++;
         





More information about the lldb-commits mailing list