9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FIXITHINTUTILS_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_FIXITHINTUTILS_H
12#include "clang/AST/ASTContext.h"
13#include "clang/AST/Decl.h"
14#include "clang/Sema/DeclSpec.h"
42std::optional<FixItHint>
44 DeclSpec::TQ Qualifier,
bool areParensNeededForStatement(const Stmt &Node)
QualifierTarget
This enum defines which entity is the target for adding the qualifier.
@ Value
Transforming a pointer attaches to the pointee and not the pointer itself.
QualifierPolicy
This enum defines where the qualifier shall be preferably added.
FixItHint changeVarDeclToReference(const VarDecl &Var, ASTContext &Context)
Creates fix to make VarDecl a reference by adding &.
std::optional< FixItHint > addQualifierToVarDecl(const VarDecl &Var, const ASTContext &Context, DeclSpec::TQ Qualifier, QualifierTarget QualTarget, QualifierPolicy QualPolicy)
Creates fix to qualify VarDecl with the specified Qualifier.
std::string formatDereference(const Expr &ExprNode, const ASTContext &Context)