[Lldb-commits] [lldb] [WIP] [lldb][Progress] Report progress when completing types from DWARF (PR #91452)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Wed May 8 11:07:39 PDT 2024
================
@@ -1411,3 +1414,35 @@ clang::Decl *
ClangASTImporter::ASTImporterDelegate::GetOriginalDecl(clang::Decl *To) {
return m_main.GetDeclOrigin(To).decl;
}
+
+void ClangASTImporter::ASTImporterDelegate::UpdateImportProgress(
----------------
bulbazord wrote:
The assertions in this code are going to blow up only in development builds. In release builds, you'll fall through the first assertion, and return because you try to cast `nullptr` to a NamedDecl (which will give you `nullptr`) and the function will fail silently. The second assertion will fail if `from_ast` or `to_ast` is `nullptr`, but the function doesn't return early there. It will call `getDisplayName` on `from_ast` and `to_ast`, one of which will crash anyway. Maybe we should consider an early return here too? Or maybe the function should return an `llvm::Error`?
https://github.com/llvm/llvm-project/pull/91452
More information about the lldb-commits
mailing list