[PATCH] D32923: [clang-tidy] Use cxxStdInitializerListExpr in modernize-use-emplace

Jakub Kuderski via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 5 16:13:46 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL302317: [clang-tidy] Use cxxStdInitializerListExpr in modernize-use-emplace (authored by kuhar).

Changed prior to commit:
  https://reviews.llvm.org/D32923?vs=98024&id=98034#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32923

Files:
  clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp


Index: clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp
@@ -20,12 +20,6 @@
   return Node.hasExplicitTemplateArgs();
 }
 
-namespace impl {
-// FIXME: This matcher should be replaced by a matcher from ASTMatcher.h
-const ast_matchers::internal::VariadicDynCastAllOfMatcher<Stmt,
-    CXXStdInitializerListExpr> cxxStdInitializerListExpr;
-} // namespace impl
-
 const auto DefaultContainersWithPushBack =
     "::std::vector; ::std::list; ::std::deque";
 const auto DefaultSmartPointers =
@@ -81,9 +75,7 @@
   auto IsPrivateCtor = hasDeclaration(cxxConstructorDecl(isPrivate()));
 
   auto HasInitList = anyOf(has(ignoringImplicit(initListExpr())),
-                           has(impl::cxxStdInitializerListExpr()));
-  // FIXME: Replace internal C++ initializer list matcher with one from
-  // ASTMatchers.h
+                           has(cxxStdInitializerListExpr()));
 
   // FIXME: Discard 0/NULL (as nullptr), static inline const data members,
   // overloaded functions and template names.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32923.98034.patch
Type: text/x-patch
Size: 1221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170505/f2f7b94b/attachment-0001.bin>


More information about the cfe-commits mailing list