Author: Michael Buch Date: 2026-01-02T18:06:44Z New Revision: aa34f24d62a1305fc84b4255a83fc189eb2cf4ef
URL: https://github.com/llvm/llvm-project/commit/aa34f24d62a1305fc84b4255a83fc189eb2cf4ef DIFF: https://github.com/llvm/llvm-project/commit/aa34f24d62a1305fc84b4255a83fc189eb2cf4ef.diff LOG: [lldb][ClangExpressionDeclMap][NFC] Remove redundant std::string cast `getName` is an `llvm::StringRef`, which we can safely compare against a `const char*`. So there's no need to go via `std::string`. Added: Modified: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp index 9cb8f7a44de61..4bd45a73f5ebc 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -690,8 +690,7 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls( if (const NamespaceDecl *namespace_context = dyn_cast<NamespaceDecl>(context.m_decl_context)) { - if (namespace_context->getName().str() == - std::string(g_lldb_local_vars_namespace_cstr)) { + if (namespace_context->getName() == g_lldb_local_vars_namespace_cstr) { CompilerDeclContext compiler_decl_ctx = m_clang_ast_context->CreateDeclContext( const_cast<clang::DeclContext *>(context.m_decl_context)); _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
