Hi.
In file source/Expression/ASTResultSynthesizer.cpp:98, we have:
CompoundStmt *compound_stmt = dyn_cast(function_body);
bool ret = SynthesizeBodyResult (compound_stmt,
function_decl);
And, in the “SynthesizeBodyResult” function:
bool
ASTResultSynthesizer::SynthesizeBodyResult (CompoundStmt *Body,
DeclContext *DC)
{
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ASTContext &Ctx(*m_ast_context);
CompoundStmt *compound_stmt = dyn_cast(Body);
if (!compound_stmt)
return false;
…
Can’t we remove the second cast? (The method is only called in the above snippet) We can maintain the check (or check it before, right after the dyn_cast).
Regards,nbsp; Filipe