40 const auto *Call = Result.Nodes.getNodeAs<CallExpr>(
"call");
41 const auto *DeclRef = Result.Nodes.getNodeAs<DeclRefExpr>(
"declref");
44 if (Call->getNumArgs() != 2)
47 const Expr *Arg0 = Call->getArg(0)->IgnoreParenImpCasts();
48 const Expr *Arg1 = Call->getArg(1)->IgnoreParenImpCasts();
53 if (Arg0->getType() != Call->getArg(0)->getType() ||
54 Arg1->getType() != Call->getArg(1)->getType()) {
55 diag(Call->getBeginLoc(),
"for C++11-compatibility, use pair directly")
56 << FixItHint::CreateReplacement(
57 SourceRange(DeclRef->getBeginLoc(), DeclRef->getLAngleLoc()),
60 diag(Call->getBeginLoc(),
61 "for C++11-compatibility, omit template arguments from make_pair")
62 << FixItHint::CreateRemoval(
63 SourceRange(DeclRef->getLAngleLoc(), DeclRef->getRAngleLoc()));