#include "UseDesignatedInitializersCheck.h"
#include "../utils/DesignatedInitializers.h"
#include "clang/AST/APValue.h"
#include "clang/AST/Decl.h"
#include "clang/AST/Expr.h"
#include "clang/AST/Stmt.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/ASTMatchers/ASTMatchersMacros.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Lex/Lexer.h"
usingnamespaceclang::ast_matchers;
namespace clang::tidy::modernize {
static constexpr char IgnoreSingleElementAggregatesName[] = …;
static constexpr bool IgnoreSingleElementAggregatesDefault = …;
static constexpr char RestrictToPODTypesName[] = …;
static constexpr bool RestrictToPODTypesDefault = …;
static constexpr char IgnoreMacrosName[] = …;
static constexpr bool IgnoreMacrosDefault = …;
static constexpr char StrictCStandardComplianceName[] = …;
static constexpr bool StrictCStandardComplianceDefault = …;
static constexpr char StrictCppStandardComplianceName[] = …;
static constexpr bool StrictCppStandardComplianceDefault = …;
namespace {
struct Designators { … };
unsigned getNumberOfDesignated(const InitListExpr *SyntacticInitList) { … }
AST_MATCHER(CXXRecordDecl, isAggregate) { … }
AST_MATCHER(CXXRecordDecl, isPOD) { … }
AST_MATCHER(InitListExpr, isFullyDesignated) { … }
AST_MATCHER(InitListExpr, hasMoreThanOneElement) { … }
}
UseDesignatedInitializersCheck::UseDesignatedInitializersCheck(
StringRef Name, ClangTidyContext *Context)
: … { … }
void UseDesignatedInitializersCheck::registerMatchers(MatchFinder *Finder) { … }
void UseDesignatedInitializersCheck::check(
const MatchFinder::MatchResult &Result) { … }
void UseDesignatedInitializersCheck::storeOptions(
ClangTidyOptions::OptionMap &Opts) { … }
}