if (!ctx_obj_ptr || status.Fail())
return;
- AddThisType(context, TypeFromUser(m_ctx_obj->GetCompilerType()));
+ AddContextClassType(context, TypeFromUser(m_ctx_obj->GetCompilerType()));
m_struct_vars->m_object_pointer_type =
TypeFromUser(ctx_obj_ptr->GetCompilerType());
LLDB_LOG(log, " CEDM::FEVD Adding type for $__lldb_class: {1}",
class_qual_type.getAsString());
- AddThisType(context, class_user_type);
+ AddContextClassType(context, class_user_type);
if (method_decl->isInstance()) {
// self is a pointer to the object
LLDB_LOG(log, " FEVD Adding type for $__lldb_class: {1}",
ClangUtil::GetQualType(pointee_type).getAsString());
- AddThisType(context, pointee_type);
+ AddContextClassType(context, pointee_type);
TypeFromUser this_user_type(this_type->GetFullCompilerType());
m_struct_vars->m_object_pointer_type = this_user_type;
}
}
}
-void ClangExpressionDeclMap::AddThisType(NameSearchContext &context,
- const TypeFromUser &ut) {
+void ClangExpressionDeclMap::AddContextClassType(NameSearchContext &context,
+ const TypeFromUser &ut) {
CompilerType copied_clang_type = GuardedCopyType(ut);
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
/// The type that needs to be created.
void AddOneType(NameSearchContext &context, const TypeFromUser &type);
- /// Generate a Decl for "*this" and add a member function declaration to it
- /// for the expression, then report it.
+ /// Adds the class in which the expression is evaluated to the lookup and
+ /// prepares the class to be used as a context for expression evaluation (for
+ /// example, it creates a fake member function that will contain the
+ /// expression LLDB is trying to evaluate).
///
/// \param[in] context
- /// The NameSearchContext to use when constructing the Decl.
+ /// The NameSearchContext to which the class should be added as a lookup
+ /// result.
///
/// \param[in] type
- /// The type for *this.
- void AddThisType(NameSearchContext &context, const TypeFromUser &type);
+ /// The type of the class that serves as the evaluation context.
+ void AddContextClassType(NameSearchContext &context,
+ const TypeFromUser &type);
/// Move a type out of the current ASTContext into another, but make sure to
/// export all components of the type also.