class HasOverloadedOperatorNameMatcher

Declaration

template <typename T, typename ArgT>
class HasOverloadedOperatorNameMatcher { /* full declaration omitted */ };

Description

Matches overloaded operators with a specific name. The type argument ArgT is not used by this matcher but is used by PolymorphicMatcher and should be StringRef.

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:906

Templates

T
ArgT

Member Variables

private std::vector<std::string> Names

Method Overview

Methods

HasOverloadedOperatorNameMatcher<T, ArgT>(
    std::vector<std::string> Names)

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:914

Parameters

std::vector<std::string> Names

bool matchesNode(const T& Node) const

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:917

Parameters

const T& Node

bool matchesSpecialized(
    const clang::CXXOperatorCallExpr& Node) const

Description

CXXOperatorCallExpr exist only for calls to overloaded operators so this function returns true if the call is to an operator of the given name.

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:926

Parameters

const clang::CXXOperatorCallExpr& Node

bool matchesSpecialized(
    const clang::FunctionDecl& Node) const

Description

Returns true only if CXXMethodDecl represents an overloaded operator and has the given operator name.

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:932

Parameters

const clang::FunctionDecl& Node