teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.

In D72413#1811038 <https://reviews.llvm.org/D72413#1811038>, @aprantl wrote:

> In D72413#1810969 <https://reviews.llvm.org/D72413#1810969>, @jingham wrote:
>
> > If we can't make a persistent expression state, are we going to be able to 
> > do anything useful with expressions?  I don't see anything wrong here, but 
> > it seems like we should really be putting up a crunchy frog warning and 
> > erroring out of "expr"directly if we really can't make a type system.
>
>
> I looked at that for a bit, but there is no obvious place where to early exit 
> without refactoring much more of ClangExpressionDeclMap.


FWIW, you could also just add the check to 
`ClangUserExpression::ClangUserExpressionHelper::ResetDeclMap` and return a 
nullptr there. The API is designed to return a nullptr for utility expressions 
on that don't use the DeclMap. That's the only place in upstream LLDB where we 
construct a DeclMap with a target, so if there is a check there then the 
DeclMap doesn't need any further changes and we can just assume there is a 
persistent state in the rest of the code. But it doesn't really make the code 
much better, just this patch smaller.


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

https://reviews.llvm.org/D72413



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

Reply via email to