mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1170388 - Removed an outdated workaround for old clang versions in the static analysis plugin. r=mystor
This commit is contained in:
parent
8f1c29e597
commit
4ae6af1589
@ -708,33 +708,6 @@ AST_MATCHER(MemberExpr, isAddRefOrRelease) {
|
|||||||
/// This matcher will select classes which are refcounted.
|
/// This matcher will select classes which are refcounted.
|
||||||
AST_MATCHER(QualType, isRefCounted) { return isClassRefCounted(Node); }
|
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<NodeType>(ID) == &Node) {
|
|
||||||
haveMatchingResult = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Visitor visitor(Node, ID, haveMatchingResult);
|
|
||||||
bindings.visitMatches(&visitor);
|
|
||||||
return haveMatchingResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
AST_MATCHER(CXXRecordDecl, hasRefCntMember) {
|
AST_MATCHER(CXXRecordDecl, hasRefCntMember) {
|
||||||
return isClassRefCounted(&Node) && getClassRefCntMember(&Node);
|
return isClassRefCounted(&Node) && getClassRefCntMember(&Node);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user