19 if (
const auto *CXXMethodNode = dyn_cast<CXXMethodDecl>(&Node)) {
20 if (CXXMethodNode->isCopyAssignmentOperator() ||
21 CXXMethodNode->isMoveAssignmentOperator())
24 return Node.isOverloadedOperator();
27 void OverloadedOperatorCheck::registerMatchers(MatchFinder *Finder) {
28 Finder->addMatcher(functionDecl(isFuchsiaOverloadedOperator()).bind(
"decl"),
32 void OverloadedOperatorCheck::check(
const MatchFinder::MatchResult &Result) {
33 const auto *D = Result.Nodes.getNodeAs<FunctionDecl>(
"decl");
34 assert(D &&
"No FunctionDecl captured!");
36 SourceLocation
Loc = D->getLocStart();
38 diag(Loc,
"cannot overload %0") << D;
SourceLocation Loc
'#' location in the include directive
AST_MATCHER(VarDecl, isAsm)