clayborg added a comment.

In D138259#3940689 <https://reviews.llvm.org/D138259#3940689>, @labath wrote:

> I have a somewhat high level question. Do we actually want 
> (SB)Type::IsTypeComplete to return true for these kinds of types?
>
> For clang's benefit, we have to pretend that the AST objects are complete 
> (and empty), but we're not similarly restricted in our own representations of 
> those types, so we could theoretically just answer `false` here (and possibly 
> have some additional method to indicate that the type is strange in some way).

If we have a forward declaration to a type, it is ok for that type to be 
incomplete. So for a variable like "struct Foo; Foo *foo = ...", it is ok for 
"Foo" to not be complete here. But if we have "Foo foo = ...;" then it isn't ok 
for Foo to not be complete. We need to tell the difference between "a type is 
incomplete and it is ok" and "a type should be complete but isn't and you are 
losing information that should have been available for you to debug".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138259/new/

https://reviews.llvm.org/D138259

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to