From d0e8abc4381b3a656cde07a7844628535b8d864c Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Thu, 5 Mar 2020 14:13:05 -0800 Subject: [PATCH] [lldb] Fix more typos in log statements in ClangASTSource The indexes need to start at 0 but in D74951 I removed the first parameter and didn't decrement all the indexes. This patch at least makes sure that LLDB logging no longer crashes (but it still deadlocks). --- .../Plugins/ExpressionParser/Clang/ClangASTSource.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp index 0b94b8d4..da25fa3 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -408,22 +408,22 @@ void ClangASTSource::FindExternalLexicalDecls( if (log) { if (const NamedDecl *context_named_decl = dyn_cast(context_decl)) LLDB_LOG(log, - "FindExternalLexicalDecls on (ASTContext*){1} '{2}' in " - "'{3}' (%sDecl*){4}", + "FindExternalLexicalDecls on (ASTContext*){0} '{1}' in " + "'{2}' (%sDecl*){3}", m_ast_context, m_clang_ast_context->getDisplayName(), context_named_decl->getNameAsString().c_str(), context_decl->getDeclKindName(), static_cast(context_decl)); else if (context_decl) LLDB_LOG(log, - "FindExternalLexicalDecls on (ASTContext*){1} '{2}' in " - "({3}Decl*){4}", + "FindExternalLexicalDecls on (ASTContext*){0} '{1}' in " + "({2}Decl*){3}", m_ast_context, m_clang_ast_context->getDisplayName(), context_decl->getDeclKindName(), static_cast(context_decl)); else LLDB_LOG(log, - "FindExternalLexicalDecls on (ASTContext*){1} '{2}' in a " + "FindExternalLexicalDecls on (ASTContext*){0} '{1}' in a " "NULL context", m_ast_context, m_clang_ast_context->getDisplayName()); } @@ -433,7 +433,7 @@ void ClangASTSource::FindExternalLexicalDecls( if (!original.Valid()) return; - LLDB_LOG(log, " FELD Original decl {1} (Decl*){2:x}:\n{3}", + LLDB_LOG(log, " FELD Original decl {0} (Decl*){1:x}:\n{2}", static_cast(original.ctx), static_cast(original.decl), ClangUtil::DumpDecl(original.decl)); @@ -558,7 +558,7 @@ void ClangASTSource::FindExternalVisibleDecls(NameSearchContext &context) { if (!context.m_namespace_map->empty()) { if (log && log->GetVerbose()) - LLDB_LOG(log, " CAS::FEVD Registering namespace map {1} ({2} entries)", + LLDB_LOG(log, " CAS::FEVD Registering namespace map {0} ({1} entries)", context.m_namespace_map.get(), context.m_namespace_map->size()); NamespaceDecl *clang_namespace_decl = -- 2.7.4