#include "clang/Tooling/Transformer/Stencil.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTTypeTraits.h"
#include "clang/AST/Expr.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Lex/Lexer.h"
#include "clang/Tooling/Transformer/SourceCode.h"
#include "clang/Tooling/Transformer/SourceCodeBuilders.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include <atomic>
#include <memory>
#include <string>
usingnamespaceclang;
usingnamespacetransformer;
BoundNodes;
MatchFinder;
errc;
Error;
Expected;
StringError;
static llvm::Expected<DynTypedNode> getNode(const BoundNodes &Nodes,
StringRef Id) { … }
static Error printNode(StringRef Id, const MatchFinder::MatchResult &Match,
std::string *Result) { … }
namespace {
class RawTextStencil : public StencilInterface { … };
class DebugPrintNodeStencil : public StencilInterface { … };
enum class UnaryNodeOperator { … };
class UnaryOperationStencil : public StencilInterface { … };
class SelectorStencil : public StencilInterface { … };
class AccessStencil : public StencilInterface { … };
class IfBoundStencil : public StencilInterface { … };
class SelectBoundStencil : public clang::transformer::StencilInterface { … };
class SequenceStencil : public StencilInterface { … };
class RunStencil : public StencilInterface { … };
}
Stencil transformer::detail::makeStencil(StringRef Text) { … }
Stencil transformer::detail::makeStencil(RangeSelector Selector) { … }
Stencil transformer::dPrint(StringRef Id) { … }
Stencil transformer::expression(llvm::StringRef Id) { … }
Stencil transformer::deref(llvm::StringRef ExprId) { … }
Stencil transformer::maybeDeref(llvm::StringRef ExprId) { … }
Stencil transformer::addressOf(llvm::StringRef ExprId) { … }
Stencil transformer::maybeAddressOf(llvm::StringRef ExprId) { … }
Stencil transformer::describe(StringRef Id) { … }
Stencil transformer::access(StringRef BaseId, Stencil Member) { … }
Stencil transformer::ifBound(StringRef Id, Stencil TrueStencil,
Stencil FalseStencil) { … }
Stencil transformer::selectBound(
std::vector<std::pair<std::string, Stencil>> CaseStencils,
Stencil DefaultStencil) { … }
Stencil transformer::run(MatchConsumer<std::string> Fn) { … }
Stencil transformer::catVector(std::vector<Stencil> Parts) { … }