28 const auto *Binop = Result.Nodes.getNodeAs<BinaryOperator>(
"binop");
31 Result.Nodes.getNodeAs<FunctionDecl>(
"function_decl")->getName());
42 std::string LhsReplacement =
44 std::string RhsReplacement =
47 diag(Binop->getBeginLoc(),
"perform comparison in the time domain")
48 << FixItHint::CreateReplacement(Binop->getSourceRange(),
49 (llvm::Twine(LhsReplacement) +
" " +
50 Binop->getOpcodeStr() +
" " +
std::string rewriteExprFromNumberToTime(const ast_matchers::MatchFinder::MatchResult &Result, DurationScale Scale, const Expr *Node)
Assuming Node has a type int representing a time instant of Scale since The Epoch,...