diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/UndelegatedConstructor.cpp')
| -rw-r--r-- | clang-tools-extra/clang-tidy/misc/UndelegatedConstructor.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/UndelegatedConstructor.cpp b/clang-tools-extra/clang-tidy/misc/UndelegatedConstructor.cpp index 3fabbe69bb3..0390c235711 100644 --- a/clang-tools-extra/clang-tidy/misc/UndelegatedConstructor.cpp +++ b/clang-tools-extra/clang-tidy/misc/UndelegatedConstructor.cpp @@ -15,9 +15,9 @@ using namespace clang::ast_matchers; namespace clang { -namespace ast_matchers { -AST_MATCHER_P(Stmt, ignoringTemporaryExpr, internal::Matcher<Stmt>, - InnerMatcher) { +namespace { +AST_MATCHER_P(Stmt, ignoringTemporaryExpr, + ast_matchers::internal::Matcher<Stmt>, InnerMatcher) { const Stmt *E = &Node; for (;;) { // Temporaries with non-trivial dtors. @@ -38,12 +38,13 @@ AST_MATCHER_P(Stmt, ignoringTemporaryExpr, internal::Matcher<Stmt>, // Finds a node if it's a base of an already bound node. AST_MATCHER_P(CXXRecordDecl, baseOfBoundNode, std::string, ID) { - return Builder->removeBindings([&](const internal::BoundNodesMap &Nodes) { - const auto *Derived = Nodes.getNodeAs<CXXRecordDecl>(ID); - return Derived != &Node && !Derived->isDerivedFrom(&Node); - }); + return Builder->removeBindings( + [&](const ast_matchers::internal::BoundNodesMap &Nodes) { + const auto *Derived = Nodes.getNodeAs<CXXRecordDecl>(ID); + return Derived != &Node && !Derived->isDerivedFrom(&Node); + }); } -} // namespace ast_matchers +} // namespace namespace tidy { namespace misc { |

