Author: eugene
Date: Thu Sep 28 20:15:08 2017
New Revision: 314487

URL: http://llvm.org/viewvc/llvm-project?rev=314487&view=rev
Log:
Fix compilation error

Modified:
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp?rev=314487&r1=314486&r2=314487&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp 
(original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp Thu Sep 
28 20:15:08 2017
@@ -69,7 +69,7 @@ void ClangASTSource::InstallASTContext(c
     // types from any source that we would do lookups in, which includes the
     // persistent AST context as well as the modules and Objective-C runtime
     // AST contexts.
-    
+
     lldbassert(!m_merger_up);
     clang::ExternalASTMerger::ImporterTarget target = {ast_context,
                                                        file_manager};
@@ -114,14 +114,14 @@ void ClangASTSource::InstallASTContext(c
 
       sources.push_back(modules_decl_vendor->GetImporterSource());
     } while (0);
-    
+
     if (!is_shared_context) {
       // Update the scratch AST context's merger to reflect any new sources we
       // might have come across since the last time an expression was parsed.
-      
+
       auto scratch_ast_context = static_cast<ClangASTContextForExpressions*>(
           m_target->GetScratchClangASTContext());
-      
+
       scratch_ast_context->GetMergerUnchecked().AddSources(sources);
 
       sources.push_back({*scratch_ast_context->getASTContext(),
@@ -429,22 +429,22 @@ void ClangASTSource::CompleteType(clang:
     ASTDumper dumper((Decl *)interface_decl);
     dumper.ToLog(log, "      [COID] ");
   }
-  
+
   if (!m_ast_importer_sp) {
     if (HasMerger()) {
       ObjCInterfaceDecl *complete_iface_decl =
         GetCompleteObjCInterface(interface_decl);
-      
+
       if (complete_iface_decl && (complete_iface_decl != interface_decl)) {
         m_merger_up->ForceRecordOrigin(interface_decl, {complete_iface_decl, 
&complete_iface_decl->getASTContext()});
       }
 
       GetMergerUnchecked().CompleteType(interface_decl);
     } else {
-      lldbassert(!"No mechanism for completing a type!"); 
+      lldbassert(!"No mechanism for completing a type!");
     }
     return;
-  }  
+  }
 
   Decl *original_decl = NULL;
   ASTContext *original_ctx = NULL;
@@ -525,7 +525,7 @@ void ClangASTSource::FindExternalLexical
     if (auto *interface_decl = dyn_cast<ObjCInterfaceDecl>(decl_context)) {
       ObjCInterfaceDecl *complete_iface_decl =
          GetCompleteObjCInterface(interface_decl);
-      
+
       if (complete_iface_decl && (complete_iface_decl != interface_decl)) {
         m_merger_up->ForceRecordOrigin(interface_decl, {complete_iface_decl, 
&complete_iface_decl->getASTContext()});
       }
@@ -698,7 +698,7 @@ void ClangASTSource::FindExternalVisible
     dyn_cast<ObjCInterfaceDecl>(context.m_decl_context)) {
       ObjCInterfaceDecl *complete_iface_decl =
       GetCompleteObjCInterface(interface_decl);
-      
+
       if (complete_iface_decl && (complete_iface_decl != interface_decl)) {
         GetMergerUnchecked().ForceRecordOrigin(
             interface_decl,
@@ -1141,12 +1141,12 @@ void ClangASTSource::FindObjCMethodDecls
     if (auto *interface_decl = 
dyn_cast<ObjCInterfaceDecl>(context.m_decl_context)) {
       ObjCInterfaceDecl *complete_iface_decl =
           GetCompleteObjCInterface(interface_decl);
-      
+
       if (complete_iface_decl && (complete_iface_decl != 
context.m_decl_context)) {
         m_merger_up->ForceRecordOrigin(interface_decl, {complete_iface_decl, 
&complete_iface_decl->getASTContext()});
       }
     }
-    
+
     GetMergerUnchecked().FindExternalVisibleDeclsByName(context.m_decl_context,
                                                         context.m_decl_name);
     return;
@@ -2018,7 +2018,7 @@ bool ClangASTSource::ResolveDeclOrigin(c
 }
 
 clang::ExternalASTMerger &ClangASTSource::GetMergerUnchecked() {
-  lldbassert(m_merger_up);
+  lldbassert(m_merger_up != nullptr);
   return *m_merger_up;
 }
 

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=314487&r1=314486&r2=314487&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Thu Sep 28 20:15:08 2017
@@ -1431,7 +1431,7 @@ static TemplateParameterList *CreateTemp
           is_typename, parameter_pack));
     }
   }
-  
+
   if (template_param_infos.packed_args &&
       template_param_infos.packed_args->args.size()) {
     IdentifierInfo *identifier_info = nullptr;
@@ -10126,7 +10126,7 @@ ClangASTContextForExpressions::GetPersis
 
 clang::ExternalASTMerger &
 ClangASTContextForExpressions::GetMergerUnchecked() {
-  lldbassert(m_scratch_ast_source_ap);
+  lldbassert(m_scratch_ast_source_ap != nullptr);
   return m_scratch_ast_source_ap->GetMergerUnchecked();
 }
 


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to