[clang-tidy] Fix make-unique check to work in C++17 mode.
authorHaojian Wu <hokein@google.com>
Mon, 3 Jun 2019 08:14:15 +0000 (08:14 +0000)
committerHaojian Wu <hokein@google.com>
Mon, 3 Jun 2019 08:14:15 +0000 (08:14 +0000)
commitceb0cc54f9d647c2fed3ae878ba91b95f9740777
tree4b6b8a6de1ab4454a458ffd54a38245ffe76b586
parent404a679e1d0c19bf504776fd10aaca411462da5e
[clang-tidy] Fix make-unique check to work in C++17 mode.

Summary:
Previously, we intended to omit the check fix to the case when constructor has
any braced-init-list argument. But the HasListInitializedArgument was not
correct to handle all cases (Foo(Bar{1, 2}) will return false in C++14
mode).

This patch fixes it, corrects the tests, and makes the check to run at C++17 mode.

Reviewers: gribozavr

Subscribers: xazax.hun, cfe-commits

Tags: #clang

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

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