[PATCH] D55044: [clang-tidy] check for Abseil make_unique

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 12 18:24:57 PST 2018


Eugene.Zelenko added inline comments.


================
Comment at: clang-tidy/abseil/MakeUniqueCheck.cpp:28
+      recordType(hasDeclaration(classTemplateSpecializationDecl(
+          hasName("::std::unique_ptr"), templateArgumentCountIs(2),
+          hasTemplateArgument(
----------------
EricWF wrote:
> Does this catch `std::__1::unique_ptr`, where `__1` is an inline namespace? (Either way, we should add a test)
> 
> Maybe it's better to first filter declarations using an `isInStdNamespace` matcher and then check for the name `unique_ptr`.
Tests for other checks don't contain libc++ specific, so if problems existed they were resolved long time ago.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55044/new/

https://reviews.llvm.org/D55044





More information about the cfe-commits mailing list