[clang-tidy] Fix another crash in make-unique check.
authorHaojian Wu <hokein@google.com>
Wed, 9 Aug 2017 17:03:42 +0000 (17:03 +0000)
committerHaojian Wu <hokein@google.com>
Wed, 9 Aug 2017 17:03:42 +0000 (17:03 +0000)
commitbe5d4487b45e7ec729f4ddfab049289a91d3a7ba
treea4643cad12cf025431cdfe9f3ceb8e6db6309d4b
parent78295067317093d31c8b2d5de087a565d2e9e8d3
[clang-tidy] Fix another crash in make-unique check.

Summary:
The crash happens when calling `reset` method without any preceding
operation like "->" or ".", this could happen in a subclass of the
"std::unique_ptr".

Reviewers: alexfh

Reviewed By: alexfh

Subscribers: JDevlieghere, xazax.hun, cfe-commits

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

llvm-svn: 310496
clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp