[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
Thu Oct 20 08:02:16 PDT 2016


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)

On Thu, Oct 20, 2016 at 6:47 AM Aaron Ballman <aaron.ballman at gmail.com>
wrote:

> aaron.ballman accepted this revision.
> aaron.ballman added a reviewer: aaron.ballman.
> aaron.ballman added a comment.
> This revision is now accepted and ready to land.
>
> LGTM
>
>
>
> ================
> Comment at: lib/Sema/SemaExprCXX.cpp:6287
> +            Context.hasSameUnqualifiedType(DestructedType,
> +                                           ObjectType->getPointeeType()))
> {
> +          Diag(OpLoc, diag::err_typecheck_member_reference_suggestion)
> ----------------
> You can elide the curly braces.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D25817
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161020/9091b8f8/attachment.html>


More information about the cfe-commits mailing list