[clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique
authorAlexander Kornienko <alexfh@google.com>
Wed, 21 Mar 2018 14:39:24 +0000 (14:39 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 21 Mar 2018 14:39:24 +0000 (14:39 +0000)
commit670c6315acacb0a107e8e2ff1f43a8a54df1cd49
tree957b652c3f2c1cbb73ff07480f5d8e51efc6c262
parent766338ad7f7f3acdfdc0df17d9d189a2f6497beb
[clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

Summary: For a c++11 code, the clang-tidy rule "modernize-make-unique" should return immediately, as std::make_unique is not supported.

Reviewers: hokein, aaron.ballman, ilya-biryukov, alexfh

Reviewed By: hokein, aaron.ballman, alexfh

Subscribers: Quuxplusone, xazax.hun, cfe-commits

Tags: #clang-tools-extra

Patch by Frederic Tingaud!

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

llvm-svn: 328101
clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp
clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h
clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.cpp
clang-tools-extra/clang-tidy/modernize/MakeUniqueCheck.h
clang-tools-extra/test/clang-tidy/modernize-make-unique-cxx11.cpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/modernize-make-unique-cxx14.cpp [new file with mode: 0644]
clang-tools-extra/test/clang-tidy/modernize-make-unique-macros.cpp
clang-tools-extra/test/clang-tidy/modernize-make-unique.cpp