[clang-tools-extra] r302317 - [clang-tidy] Use cxxStdInitializerListExpr in modernize-use-emplace
Jakub Kuderski via cfe-commits
cfe-commits at lists.llvm.org
Fri May 5 16:00:38 PDT 2017
Author: kuhar
Date: Fri May 5 18:00:37 2017
New Revision: 302317
URL: http://llvm.org/viewvc/llvm-project?rev=302317&view=rev
Log:
[clang-tidy] Use cxxStdInitializerListExpr in modernize-use-emplace
Summary: Use the cxxStdInitializerListExp matcher from ASTMatchers.h instead of a local one.
Reviewers: aaron.ballman, alexfh, Prazek
Reviewed By: aaron.ballman
Subscribers: xazax.hun, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32923
Modified:
clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp
Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp?rev=302317&r1=302316&r2=302317&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/modernize/UseEmplaceCheck.cpp Fri May 5 18:00:37 2017
@@ -20,12 +20,6 @@ AST_MATCHER(DeclRefExpr, hasExplicitTemp
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 @@ void UseEmplaceCheck::registerMatchers(M
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.
More information about the cfe-commits
mailing list