]> granicus.if.org Git - clang/commit
[Sema] Improve the error diagnostic for dot destructor calls on pointer objects
authorAlex Lorenz <arphaman@gmail.com>
Fri, 20 Jan 2017 15:38:58 +0000 (15:38 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 20 Jan 2017 15:38:58 +0000 (15:38 +0000)
commitf1bc8216219c341404fe6cf3f312ba123f186e2b
tree6894d80f4e27ff6d09450bc879f08c8d9e7dc29e
parent3f02d105b54fd0502b54e0d2c9068ca1cd00bf6c
[Sema] Improve the error diagnostic for dot destructor calls on pointer objects

This commit improves the mismatched destructor type error by detecting when the
destructor call has used a '.' instead of a '->' on a pointer to the destructed
type. The diagnostic now suggests to use '->' instead of '.', and adds a fixit
where appropriate.

rdar://28766702

Differential Revision: https://reviews.llvm.org/D25817

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292615 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaExprCXX.cpp
test/CXX/special/class.dtor/p10-0x.cpp
test/FixIt/fixit.cpp
test/FixIt/no-fixit.cpp
test/SemaCXX/pseudo-destructors.cpp