#include "clang/Tooling/Syntax/BuildTree.h"
#include "clang/AST/ASTFwd.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclarationName.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/IgnoreExpr.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/TypeLoc.h"
#include "clang/AST/TypeLocVisitor.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Specifiers.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/LiteralSupport.h"
#include "clang/Tooling/Syntax/Nodes.h"
#include "clang/Tooling/Syntax/TokenBufferTokenManager.h"
#include "clang/Tooling/Syntax/Tokens.h"
#include "clang/Tooling/Syntax/Tree.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include <cstddef>
#include <map>
usingnamespaceclang;
static Expr *IgnoreImplicitConstructorSingleStep(Expr *E) { … }
static Expr *IgnoreCXXFunctionalCastExprWrappingConstructor(Expr *E) { … }
static Expr *IgnoreImplicit(Expr *E) { … }
LLVM_ATTRIBUTE_UNUSED
static bool isImplicitExpr(Expr *E) { … }
namespace {
struct GetStartLoc : TypeLocVisitor<GetStartLoc, SourceLocation> { … };
}
static CallExpr::arg_range dropDefaultArgs(CallExpr::arg_range Args) { … }
static syntax::NodeKind getOperatorNodeKind(const CXXOperatorCallExpr &E) { … }
static SourceLocation getQualifiedNameStart(NamedDecl *D) { … }
static SourceRange getInitializerRange(Decl *D) { … }
static SourceRange getDeclaratorRange(const SourceManager &SM, TypeLoc T,
SourceLocation Name,
SourceRange Initializer) { … }
namespace {
ASTPtr;
class ASTToSyntaxMapping { … };
}
class syntax::TreeBuilder { … };
namespace {
class BuildTreeVisitor : public RecursiveASTVisitor<BuildTreeVisitor> { … };
}
void syntax::TreeBuilder::noticeDeclWithoutSemicolon(Decl *D) { … }
void syntax::TreeBuilder::markChildToken(SourceLocation Loc, NodeRole Role) { … }
void syntax::TreeBuilder::markChildToken(const syntax::Token *T, NodeRole R) { … }
void syntax::TreeBuilder::markChild(syntax::Node *N, NodeRole R) { … }
void syntax::TreeBuilder::markChild(ASTPtr N, NodeRole R) { … }
void syntax::TreeBuilder::markChild(NestedNameSpecifierLoc NNSLoc, NodeRole R) { … }
void syntax::TreeBuilder::markStmtChild(Stmt *Child, NodeRole Role) { … }
void syntax::TreeBuilder::markExprChild(Expr *Child, NodeRole Role) { … }
const syntax::Token *syntax::TreeBuilder::findToken(SourceLocation L) const { … }
syntax::TranslationUnit *syntax::buildSyntaxTree(Arena &A,
TokenBufferTokenManager& TBTM,
ASTContext &Context) { … }