#include "UnrollLoopsCheck.h"
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/ParentMapContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include <cmath>
usingnamespaceclang::ast_matchers;
namespace clang::tidy::altera {
UnrollLoopsCheck::UnrollLoopsCheck(StringRef Name, ClangTidyContext *Context)
: … { … }
void UnrollLoopsCheck::registerMatchers(MatchFinder *Finder) { … }
void UnrollLoopsCheck::check(const MatchFinder::MatchResult &Result) { … }
enum UnrollLoopsCheck::UnrollType
UnrollLoopsCheck::unrollType(const Stmt *Statement, ASTContext *Context) { … }
bool UnrollLoopsCheck::hasKnownBounds(const Stmt *Statement,
const IntegerLiteral *CXXLoopBound,
const ASTContext *Context) { … }
const Expr *UnrollLoopsCheck::getCondExpr(const Stmt *Statement) { … }
bool UnrollLoopsCheck::hasLargeNumIterations(const Stmt *Statement,
const IntegerLiteral *CXXLoopBound,
const ASTContext *Context) { … }
bool UnrollLoopsCheck::extractValue(int &Value, const BinaryOperator *Op,
const ASTContext *Context) { … }
bool UnrollLoopsCheck::exprHasLargeNumIterations(const Expr *Expression,
const ASTContext *Context) const { … }
void UnrollLoopsCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { … }
}