jarin added a comment.

In D83858#2152772 <https://reviews.llvm.org/D83858#2152772>, @teemperor wrote:

> This could cause that `RemoveWrappingTypes` goes into an infinite loop under 
> some situations. Usually this function is reserved for types that are always 
> 'sugar', but TemplateSpecializationTypes are not always sugar (e.g., 
> dependent types are not sugar). And for types that are not sugar, 
> `getLocallyUnqualifiedSingleStepDesugaredType` will return the type that was 
> passed in. So that will make the loop in that function just keep spinning 
> forever.


That sounds some what worrisome indeed. I changed the code to special case the 
TemplateSpecialization case to return if the type cannot be desugared. There 
are two other options:

1. Special case TemplateSpecialization to always return 
`type->getLocallyUnqualifiedSingleStepDesugaredType()`.
2. No special case, but always early return if the type was unchanged. I am 
imagining something like

  



> However I'm not sure though if there is actually a way to get a dependent 
> type into that logic with the normal LLDB APIs. Also Decltype is already 
> suffering from the same problem so I don't think this patch should be blocked 
> over this.
> 
> So beside some minor nits in the inline comments this LGTM, thanks!




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

https://reviews.llvm.org/D83858



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

Reply via email to