[Lldb-commits] [lldb] fe22e56 - [lldb][NFC] Pass DeclarationName to NameSearchContext by value

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Mon May 25 03:37:41 PDT 2020


Author: Raphael Isemann
Date: 2020-05-25T12:37:22+02:00
New Revision: fe22e5689e94370b8eadef4b7267201cc9fcb2e3

URL: https://github.com/llvm/llvm-project/commit/fe22e5689e94370b8eadef4b7267201cc9fcb2e3
DIFF: https://github.com/llvm/llvm-project/commit/fe22e5689e94370b8eadef4b7267201cc9fcb2e3.diff

LOG: [lldb][NFC] Pass DeclarationName to NameSearchContext by value

DeclarationName is usually passed around by value as it's just a pointer.

Added: 
    

Modified: 
    lldb/source/Plugins/ExpressionParser/Clang/NameSearchContext.h

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/ExpressionParser/Clang/NameSearchContext.h b/lldb/source/Plugins/ExpressionParser/Clang/NameSearchContext.h
index 52d2a19a404b..dc8621dd6aba 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/NameSearchContext.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/NameSearchContext.h
@@ -32,7 +32,7 @@ struct NameSearchContext {
   /// modules.
   ClangASTImporter::NamespaceMapSP m_namespace_map;
   /// The name being looked for.
-  const clang::DeclarationName &m_decl_name;
+  const clang::DeclarationName m_decl_name;
   /// The DeclContext to put declarations into.
   const clang::DeclContext *m_decl_context;
   /// All the types of functions that have been reported, so we don't
@@ -63,7 +63,7 @@ struct NameSearchContext {
   ///     The DeclContext to register Decls in.
   NameSearchContext(TypeSystemClang &clang_ts,
                     llvm::SmallVectorImpl<clang::NamedDecl *> &decls,
-                    clang::DeclarationName &name, const clang::DeclContext *dc)
+                    clang::DeclarationName name, const clang::DeclContext *dc)
       : m_clang_ts(clang_ts), m_decls(decls),
         m_namespace_map(std::make_shared<ClangASTImporter::NamespaceMap>()),
         m_decl_name(name), m_decl_context(dc) {


        


More information about the lldb-commits mailing list