zinovy.nis added inline comments.
================ Comment at: clang-tidy/abseil/AutoMakeUniqueCheck.cpp:21 +void AutoMakeUniqueCheck::registerMatchers(MatchFinder* finder) { + if (!getLangOpts().CPlusPlus) return; + ---------------- 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. ================ Comment at: clang-tidy/abseil/AutoMakeUniqueCheck.cpp:66 + const auto* var_decl = result.Nodes.getNodeAs<VarDecl>("var_decl"); + const auto* make_unique_decl = + result.Nodes.getNodeAs<FunctionDecl>("make_unique_decl"); ---------------- You may move this definition after the next `if`+`return`. ================ Comment at: docs/clang-tidy/checks/abseil-auto-make-unique.rst:10 + + std::unique_ptr<Foo> x = MakeUnique<Foo>(...); + ---------------- `MakeUnique<Foo>`? Maybe `std/abseil::make_unique`? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50852 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits