#include "../clang-tidy/utils/TransformerClangTidyCheck.h"
#include "ClangTidyTest.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Tooling/Transformer/RangeSelector.h"
#include "clang/Tooling/Transformer/RewriteRule.h"
#include "clang/Tooling/Transformer/Stencil.h"
#include "clang/Tooling/Transformer/Transformer.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <optional>
namespace clang {
namespace tidy {
namespace utils {
namespace {
usingnamespace::clang::ast_matchers;
cat;
change;
IncludeFormat;
makeRule;
node;
noopEdit;
note;
RewriteRuleWith;
RootID;
statement;
RewriteRuleWith<std::string> invertIf() { … }
class IfInverterCheck : public TransformerClangTidyCheck { … };
TEST(TransformerClangTidyCheckTest, Basic) { … }
TEST(TransformerClangTidyCheckTest, DiagnosticsCorrectlyGenerated) { … }
transformer::ASTEdit noReplacementEdit(transformer::RangeSelector Target) { … }
TEST(TransformerClangTidyCheckTest, EmptyReplacement) { … }
TEST(TransformerClangTidyCheckTest, NotesCorrectlyGenerated) { … }
TEST(TransformerClangTidyCheckTest, DiagnosticMessageEscaped) { … }
class IntLitCheck : public TransformerClangTidyCheck { … };
TEST(TransformerClangTidyCheckTest, TwoChangesInOneMacroExpansion) { … }
class BinOpCheck : public TransformerClangTidyCheck { … };
TEST(TransformerClangTidyCheckTest, TwoMatchesInMacroExpansion) { … }
std::optional<RewriteRuleWith<std::string>>
needsObjC(const LangOptions &LangOpts,
const ClangTidyCheck::OptionsView &Options) { … }
class NeedsObjCCheck : public TransformerClangTidyCheck { … };
TEST(TransformerClangTidyCheckTest, DisableByLang) { … }
std::optional<RewriteRuleWith<std::string>>
noSkip(const LangOptions &LangOpts,
const ClangTidyCheck::OptionsView &Options) { … }
class ConfigurableCheck : public TransformerClangTidyCheck { … };
TEST(TransformerClangTidyCheckTest, DisableByConfig) { … }
RewriteRuleWith<std::string> replaceCall(IncludeFormat Format) { … }
template <IncludeFormat Format>
class IncludeCheck : public TransformerClangTidyCheck { … };
TEST(TransformerClangTidyCheckTest, AddIncludeQuoted) { … }
TEST(TransformerClangTidyCheckTest, AddIncludeAngled) { … }
class IncludeOrderCheck : public TransformerClangTidyCheck { … };
TEST(TransformerClangTidyCheckTest, AddIncludeObeysSortStyleLocalOption) { … }
TEST(TransformerClangTidyCheckTest, AddIncludeObeysSortStyleGlobalOption) { … }
}
}
}
}