#include "ImplicitWideningOfMultiplicationResultCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchersMacros.h"
#include "clang/Lex/Lexer.h"
#include <optional>
usingnamespaceclang::ast_matchers;
namespace clang::tidy::bugprone {
namespace {
AST_MATCHER(ImplicitCastExpr, isPartOfExplicitCast) { … }
AST_MATCHER(Expr, containsErrors) { … }
}
static const Expr *getLHSOfMulBinOp(const Expr *E) { … }
ImplicitWideningOfMultiplicationResultCheck::
ImplicitWideningOfMultiplicationResultCheck(StringRef Name,
ClangTidyContext *Context)
: … { … }
void ImplicitWideningOfMultiplicationResultCheck::registerPPCallbacks(
const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) { … }
void ImplicitWideningOfMultiplicationResultCheck::storeOptions(
ClangTidyOptions::OptionMap &Opts) { … }
std::optional<FixItHint>
ImplicitWideningOfMultiplicationResultCheck::includeStddefHeader(
SourceLocation File) { … }
void ImplicitWideningOfMultiplicationResultCheck::handleImplicitCastExpr(
const ImplicitCastExpr *ICE) { … }
void ImplicitWideningOfMultiplicationResultCheck::handlePointerOffsetting(
const Expr *E) { … }
void ImplicitWideningOfMultiplicationResultCheck::registerMatchers(
MatchFinder *Finder) { … }
void ImplicitWideningOfMultiplicationResultCheck::check(
const MatchFinder::MatchResult &Result) { … }
}