#include "FixItHintUtils.h"
#include "LexerUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/Type.h"
#include "clang/Tooling/FixIt.h"
#include <optional>
namespace clang::tidy::utils::fixit {
FixItHint changeVarDeclToReference(const VarDecl &Var, ASTContext &Context) { … }
static bool isValueType(const Type *T) { … }
static bool isValueType(QualType QT) { … }
static bool isMemberOrFunctionPointer(QualType QT) { … }
static bool locDangerous(SourceLocation S) { … }
static std::optional<SourceLocation>
skipLParensBackwards(SourceLocation Start, const ASTContext &Context) { … }
static std::optional<FixItHint> fixIfNotDangerous(SourceLocation Loc,
StringRef Text) { … }
static std::string buildQualifier(DeclSpec::TQ Qualifier,
bool WhitespaceBefore = false) { … }
static std::optional<FixItHint> changeValue(const VarDecl &Var,
DeclSpec::TQ Qualifier,
QualifierTarget QualTarget,
QualifierPolicy QualPolicy,
const ASTContext &Context) { … }
static std::optional<FixItHint> changePointerItself(const VarDecl &Var,
DeclSpec::TQ Qualifier,
const ASTContext &Context) { … }
static std::optional<FixItHint>
changePointer(const VarDecl &Var, DeclSpec::TQ Qualifier, const Type *Pointee,
QualifierTarget QualTarget, QualifierPolicy QualPolicy,
const ASTContext &Context) { … }
static std::optional<FixItHint>
changeReferencee(const VarDecl &Var, DeclSpec::TQ Qualifier, QualType Pointee,
QualifierTarget QualTarget, QualifierPolicy QualPolicy,
const ASTContext &Context) { … }
std::optional<FixItHint> addQualifierToVarDecl(const VarDecl &Var,
const ASTContext &Context,
DeclSpec::TQ Qualifier,
QualifierTarget QualTarget,
QualifierPolicy QualPolicy) { … }
bool areParensNeededForStatement(const Stmt &Node) { … }
static bool needParensAfterUnaryOperator(const Expr &ExprNode) { … }
std::string formatDereference(const Expr &ExprNode, const ASTContext &Context) { … }
}