Differential D75626 Diff 248234 lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
Changeset View
Changeset View
Standalone View
Standalone View
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
Show First 20 Lines • Show All 987 Lines • ▼ Show 20 Lines | void ClangExpressionDeclMap::LookupLocalVarNamespace( | ||||
TypeSystemClang *frame_ast = llvm::dyn_cast_or_null<TypeSystemClang>( | TypeSystemClang *frame_ast = llvm::dyn_cast_or_null<TypeSystemClang>( | ||||
frame_decl_context.GetTypeSystem()); | frame_decl_context.GetTypeSystem()); | ||||
if (!frame_ast) | if (!frame_ast) | ||||
return; | return; | ||||
clang::NamespaceDecl *namespace_decl = | clang::NamespaceDecl *namespace_decl = | ||||
m_clang_ast_context->GetUniqueNamespaceDeclaration( | m_clang_ast_context->GetUniqueNamespaceDeclaration( | ||||
g_lldb_local_vars_namespace_cstr, nullptr); | g_lldb_local_vars_namespace_cstr, nullptr, 0); | ||||
shafik: We are passing around `0` everywhere and it is not obvious what it means at all.
Can we name… | |||||
aprantlAuthorUnsubmitted This is just an intermediate step and gets replaced in https://reviews.llvm.org/D75488 aprantl: This is just an intermediate step and gets replaced in https://reviews.llvm.org/D75488 | |||||
if (!namespace_decl) | if (!namespace_decl) | ||||
return; | return; | ||||
name_context.AddNamedDecl(namespace_decl); | name_context.AddNamedDecl(namespace_decl); | ||||
clang::DeclContext *ctxt = clang::Decl::castToDeclContext(namespace_decl); | clang::DeclContext *ctxt = clang::Decl::castToDeclContext(namespace_decl); | ||||
ctxt->setHasExternalVisibleStorage(true); | ctxt->setHasExternalVisibleStorage(true); | ||||
name_context.m_found_local_vars_nsp = true; | name_context.m_found_local_vars_nsp = true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 958 Lines • Show Last 20 Lines |
We are passing around 0 everywhere and it is not obvious what it means at all.
Can we name this somehow or make it a type?