llvm/clang/lib/Tooling/Transformer/SourceCodeBuilders.cpp

//===--- SourceCodeBuilder.cpp ----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "clang/Tooling/Transformer/SourceCodeBuilders.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/ASTMatchers/ASTMatchers.h"
#include "clang/Tooling/Transformer/SourceCode.h"
#include "llvm/ADT/Twine.h"
#include <string>

usingnamespaceclang;
usingnamespacetooling;

const Expr *tooling::reallyIgnoreImplicit(const Expr &E) {}

bool tooling::mayEverNeedParens(const Expr &E) {}

bool tooling::needParensAfterUnaryOperator(const Expr &E) {}

bool tooling::isKnownPointerLikeType(QualType Ty, ASTContext &Context) {}

std::optional<std::string> tooling::buildParens(const Expr &E,
                                                const ASTContext &Context) {}

std::optional<std::string>
tooling::buildDereference(const Expr &E, const ASTContext &Context) {}

std::optional<std::string> tooling::buildAddressOf(const Expr &E,
                                                   const ASTContext &Context) {}

// Append the appropriate access operation (syntactically) to `E`, assuming `E`
// is a non-pointer value.
static std::optional<std::string>
buildAccessForValue(const Expr &E, const ASTContext &Context) {}

// Append the appropriate access operation (syntactically) to `E`, assuming `E`
// is a pointer value.
static std::optional<std::string>
buildAccessForPointer(const Expr &E, const ASTContext &Context) {}

std::optional<std::string> tooling::buildDot(const Expr &E,
                                             const ASTContext &Context) {}

std::optional<std::string> tooling::buildArrow(const Expr &E,
                                               const ASTContext &Context) {}

// If `E` is an overloaded-operator call of kind `K` on an object `O`, returns
// `O`. Otherwise, returns `nullptr`.
static const Expr *maybeGetOperatorObjectArg(const Expr &E,
                                             OverloadedOperatorKind K) {}

static bool treatLikePointer(QualType Ty, PLTClass C, ASTContext &Context) {}

// FIXME: move over the other `maybe` functionality from Stencil. Should all be
// in one place.
std::optional<std::string> tooling::buildAccess(const Expr &RawExpression,
                                                ASTContext &Context,
                                                PLTClass Classification) {}