[LLDB][ExpressionParser] Fix indices inside format-strings passed to LLDB_LOG
llvm::formatv expects the parameter indexes to start with 0. Unfortunately it doesn't detect out-of-bounds accesses in the format string at compile-time, of which we had several inside ClangExpressionDeclMap. This patch fixes these out-of-bounds format accesses. Example output Before ClangExpressionDeclMap::FindExternalVisibleDecls for '$__lldb_class' in a 'TranslationUnit' CEDM::FEVD Searching the root namespace CEDM::FEVD Adding type for $__lldb_class: 1 After ClangExpressionDeclMap::FindExternalVisibleDecls for '$__lldb_class' in a 'TranslationUnit' CEDM::FEVD Searching the root namespace CEDM::FEVD Adding type for $__lldb_class: class (lambda) Patch by Michael Buch! Differential Revision: https://reviews.llvm.org/D128063
Loading
Please sign in to comment