[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 26 10:43:44 PST 2018


aaron.ballman added a comment.

This fix is missing test coverage, can you add a C++11 and C++14 test to demonstrate the behavior differences?



================
Comment at: clang-tidy/modernize/MakeSharedCheck.cpp:30
 
+bool MakeSharedCheck::isVersionSupported(const clang::LangOptions &LangOpts) const {
+   return LangOpts.CPlusPlus11;
----------------
You can drop the `clang::` from the parameter type.


================
Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:39
 
+bool MakeUniqueCheck::isVersionSupported(const clang::LangOptions &LangOpts) const {
+   return LangOpts.CPlusPlus14;
----------------
Can drop it here as well.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D43766





More information about the cfe-commits mailing list