[Lldb-commits] [clang] [lldb] [ASTImporter][lldb] Avoid implicit imports in VisitFieldDecl (PR #107828)

2024-09-17 Thread Andrew Savonichev via lldb-commits
asavonic wrote: > Our idea is summarized in > https://discourse.llvm.org/t/rfc-lldb-more-reliable-completion-of-record-types/77442. > Basically the goal is to guarantee that a call to `getDefinition`, _will_ > fetch the definition. This is something that Clang already does, but we just > neve

[Lldb-commits] [clang] [lldb] [ASTImporter][lldb] Avoid implicit imports in VisitFieldDecl (PR #107828)

2024-09-09 Thread Andrew Savonichev via lldb-commits
asavonic wrote: Thanks Michael, I'm glad I'm not the only one seeing this problem. > > If an implicit import happens between (2) and (3), it may indirectly bring > > the same field into the context. When (3) happens we add it again, > > duplicating the field and breaking the record. This is no

[Lldb-commits] [clang] [lldb] [ASTImporter][lldb] Avoid implicit imports in VisitFieldDecl (PR #107828)

2024-09-09 Thread Andrew Savonichev via lldb-commits
https://github.com/asavonic created https://github.com/llvm/llvm-project/pull/107828 Fields from external sources are typically loaded implicitly by `RecordDecl` or `DeclContext` iterators and other functions (see LoadFieldsFromExternalStorage function and its uses). The assumption is that we