[PATCH] D25817: [Sema] Improve the error diagnostic for dot destructor calls on pointer objects

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 24 12:20:40 PDT 2016


On Fri, Oct 21, 2016 at 3:16 AM Alex Lorenz <arphaman at gmail.com> wrote:

> arphaman updated this revision to Diff 75403.
> arphaman added a comment.
>
> The updated patch improves error handling and adds a test for the fixit.
>
> > If we issue a fixit we should recover as-if the code was written with
> the fixit in. Does this code do that? (can we test it? I know we test some
> fixits - not sure it's necessary/worthwhile to test them all, but maybe we
> have a good idiom for testing that the recovery is correct)
>
> This code does perform recovery, but the constructed AST for the
> destructor calls is different from the AST that would have been constructed
> if the code was correct: we still end up building the pseudo destructor
> expression. I'm not sure how important is that though, so please let me
> know if I should try and make the ASTs the same.
>

I imagine we need the matching AST, but don't know for sure/how the
difference might result in different behavior downstream (CC'd Mr. Smith in
case he can quickly provide an opinion here)


>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D25817
>
> Files:
>   lib/Sema/SemaExprCXX.cpp
>   test/CXX/special/class.dtor/p10-0x.cpp
>   test/FixIt/fixit.cpp
>   test/SemaCXX/pseudo-destructors.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161024/b7ffd2ba/attachment.html>


More information about the cfe-commits mailing list