[PATCH] D50852: [clang-tidy] abseil-auto-make-unique

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 18 12:47:01 PDT 2018


lebedev.ri added inline comments.


================
Comment at: clang-tidy/abseil/AutoMakeUniqueCheck.cpp:21
+void AutoMakeUniqueCheck::registerMatchers(MatchFinder* finder) {
+  if (!getLangOpts().CPlusPlus) return;
+
----------------
zinovy.nis wrote:
> JonasToth wrote:
> > Please clang-format, `return` on next line.
> `auto` first appeared in C++11, so you may use `getLangOpts().CPlusPlus11`
> And `std::make_unique` is a part of C++14, so even `getLangOpts().CPlusPlus14.
I agree on the `auto` part, but it really shouldn't care any further than that.
You can write custom `yournamespace::MakeUnique<>` in C++11.
(As i have already wrote, the list if `MakeUnique` functions-to-be-searched should be a config option.)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D50852





More information about the cfe-commits mailing list