#ifndef LLVM_CLANG_TOOLING_REFACTORING_REFACTORINGACTIONRULESINTERNAL_H
#define LLVM_CLANG_TOOLING_REFACTORING_REFACTORINGACTIONRULESINTERNAL_H
#include "clang/Basic/LLVM.h"
#include "clang/Tooling/Refactoring/RefactoringActionRule.h"
#include "clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h"
#include "clang/Tooling/Refactoring/RefactoringResultConsumer.h"
#include "clang/Tooling/Refactoring/RefactoringRuleContext.h"
#include "llvm/Support/Error.h"
#include <type_traits>
namespace clang {
namespace tooling {
namespace internal {
inline llvm::Error findError() { … }
inline void ignoreError() { … }
template <typename FirstT, typename... RestT>
void ignoreError(Expected<FirstT> &First, Expected<RestT> &... Rest) { … }
template <typename FirstT, typename... RestT>
llvm::Error findError(Expected<FirstT> &First, Expected<RestT> &... Rest) { … }
template <typename RuleType, typename... RequirementTypes, size_t... Is>
void invokeRuleAfterValidatingRequirements(
RefactoringResultConsumer &Consumer, RefactoringRuleContext &Context,
const std::tuple<RequirementTypes...> &Requirements,
std::index_sequence<Is...>) { … }
inline void visitRefactoringOptionsImpl(RefactoringOptionVisitor &) { … }
template <typename FirstT, typename... RestT>
void visitRefactoringOptionsImpl(RefactoringOptionVisitor &Visitor,
const FirstT &First, const RestT &... Rest) { … }
template <typename... RequirementTypes, size_t... Is>
void visitRefactoringOptions(
RefactoringOptionVisitor &Visitor,
const std::tuple<RequirementTypes...> &Requirements,
std::index_sequence<Is...>) { … }
template <typename Base, typename First, typename... Rest>
struct HasBaseOf : std::conditional_t<HasBaseOf<Base, First>::value ||
HasBaseOf<Base, Rest...>::value,
std::true_type, std::false_type> { … };
HasBaseOf<Base, T>;
template <typename Base, typename First, typename... Rest>
struct AreBaseOf : std::conditional_t<AreBaseOf<Base, First>::value &&
AreBaseOf<Base, Rest...>::value,
std::true_type, std::false_type> { … };
AreBaseOf<Base, T>;
}
template <typename RuleType, typename... RequirementTypes>
std::unique_ptr<RefactoringActionRule>
createRefactoringActionRule(const RequirementTypes &... Requirements) { … }
}
}
#endif