#include "BracesAroundStatementsCheck.h"
#include "../utils/BracesAroundStatement.h"
#include "../utils/LexerUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Lex/Lexer.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::readability {
static tok::TokenKind getTokenKind(SourceLocation Loc, const SourceManager &SM,
const LangOptions &LangOpts) { … }
static SourceLocation
forwardSkipWhitespaceAndComments(SourceLocation Loc, const SourceManager &SM,
const LangOptions &LangOpts) { … }
BracesAroundStatementsCheck::BracesAroundStatementsCheck(
StringRef Name, ClangTidyContext *Context)
: … { … }
void BracesAroundStatementsCheck::storeOptions(
ClangTidyOptions::OptionMap &Opts) { … }
void BracesAroundStatementsCheck::registerMatchers(MatchFinder *Finder) { … }
void BracesAroundStatementsCheck::check(
const MatchFinder::MatchResult &Result) { … }
template <typename IfOrWhileStmt>
SourceLocation
BracesAroundStatementsCheck::findRParenLoc(const IfOrWhileStmt *S,
const SourceManager &SM,
const LangOptions &LangOpts) { … }
bool BracesAroundStatementsCheck::checkStmt(
const MatchFinder::MatchResult &Result, const Stmt *S,
SourceLocation StartLoc, SourceLocation EndLocHint) { … }
void BracesAroundStatementsCheck::onEndOfTranslationUnit() { … }
}