From 4ae6af158944552176ea35316ffcc65c67f32258 Mon Sep 17 00:00:00 2001 From: Botond Ballo Date: Fri, 4 Sep 2015 12:37:33 -0400 Subject: [PATCH] Bug 1170388 - Removed an outdated workaround for old clang versions in the static analysis plugin. r=mystor --- build/clang-plugin/clang-plugin.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/build/clang-plugin/clang-plugin.cpp b/build/clang-plugin/clang-plugin.cpp index 46bdcafd520..f55eda9b2a0 100644 --- a/build/clang-plugin/clang-plugin.cpp +++ b/build/clang-plugin/clang-plugin.cpp @@ -708,33 +708,6 @@ AST_MATCHER(MemberExpr, isAddRefOrRelease) { /// This matcher will select classes which are refcounted. AST_MATCHER(QualType, isRefCounted) { return isClassRefCounted(Node); } -#if CLANG_VERSION_FULL < 304 - -/// The 'equalsBoundeNode' matcher was added in clang 3.4. -/// Since infra runs clang 3.3, we polyfill it here. -AST_POLYMORPHIC_MATCHER_P(equalsBoundNode, std::string, ID) { - BoundNodesTree bindings = Builder->build(); - bool haveMatchingResult = false; - struct Visitor : public BoundNodesTree::Visitor { - const NodeType &Node; - std::string ID; - bool &haveMatchingResult; - Visitor(const NodeType &Node, const std::string &ID, - bool &haveMatchingResult) - : Node(Node), ID(ID), haveMatchingResult(haveMatchingResult) {} - void visitMatch(const BoundNodes &BoundNodesView) override { - if (BoundNodesView.getNodeAs(ID) == &Node) { - haveMatchingResult = true; - } - } - }; - Visitor visitor(Node, ID, haveMatchingResult); - bindings.visitMatches(&visitor); - return haveMatchingResult; -} - -#endif - AST_MATCHER(CXXRecordDecl, hasRefCntMember) { return isClassRefCounted(&Node) && getClassRefCntMember(&Node); }