#include "ProTypeVarargCheck.h"
#include "../utils/Matchers.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/PPCallbacks.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/Token.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::cppcoreguidelines {
const internal::VariadicDynCastAllOfMatcher<Stmt, VAArgExpr> VAArgExpr;
static constexpr StringRef AllowedVariadics[] = …;
static constexpr StringRef VaArgWarningMessage = …;
namespace {
AST_MATCHER(QualType, isVAList) { … }
AST_MATCHER_P(AdjustedType, hasOriginalType,
ast_matchers::internal::Matcher<QualType>, InnerType) { … }
class VaArgPPCallbacks : public PPCallbacks { … };
}
void ProTypeVarargCheck::registerMatchers(MatchFinder *Finder) { … }
void ProTypeVarargCheck::registerPPCallbacks(const SourceManager &SM,
Preprocessor *PP,
Preprocessor *ModuleExpanderPP) { … }
static bool hasSingleVariadicArgumentWithValue(const CallExpr *C, uint64_t I) { … }
void ProTypeVarargCheck::check(const MatchFinder::MatchResult &Result) { … }
}