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

Alex Lorenz via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 21 03:16:23 PDT 2016


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.


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 --------------
A non-text attachment was scrubbed...
Name: D25817.75403.patch
Type: text/x-patch
Size: 4986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161021/5818c789/attachment-0001.bin>


More information about the cfe-commits mailing list