[clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr.
authorMartin Bohme <mboehme@google.com>
Wed, 2 Nov 2016 17:34:47 +0000 (17:34 +0000)
committerMartin Bohme <mboehme@google.com>
Wed, 2 Nov 2016 17:34:47 +0000 (17:34 +0000)
commit5d9d417a082b33d39183c566dc58358b5d7b905a
tree9bb6a59b807b739e4cf420642a29703c50a0c88c
parent6b2bba14a9266c944859fa2af9c5a311ae5c56f9
[clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr.

Summary:
As a unique_ptr or shared_ptr that has been moved from is guaranteed to be null,
we only warn if the pointer is dereferenced.

Reviewers: hokein, alexfh, aaron.ballman

Subscribers: Prazek, cfe-commits

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

llvm-svn: 285842
clang-tools-extra/clang-tidy/misc/UseAfterMoveCheck.cpp
clang-tools-extra/docs/clang-tidy/checks/misc-use-after-move.rst
clang-tools-extra/test/clang-tidy/misc-use-after-move.cpp