clang  12.0.0git
Classes | Functions
BuildTree.cpp File Reference
#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/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/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>
Include dependency graph for BuildTree.cpp:

Go to the source code of this file.

Classes

class  clang::syntax::TreeBuilder
 A helper class for constructing the syntax tree while traversing a clang AST. More...
 

Functions

static LLVM_ATTRIBUTE_UNUSED bool isImplicitExpr (clang::Expr *E)
 
static syntax::NodeKind getOperatorNodeKind (const CXXOperatorCallExpr &E)
 
static SourceRange getDeclaratorRange (const SourceManager &SM, TypeLoc T, SourceLocation Name, SourceRange Initializer)
 Gets the range of declarator as defined by the C++ grammar. More...
 

Function Documentation

◆ getDeclaratorRange()

static SourceRange getDeclaratorRange ( const SourceManager SM,
TypeLoc  T,
SourceLocation  Name,
SourceRange  Initializer 
)
static

Gets the range of declarator as defined by the C++ grammar.

E.g. int a; -> range of a, int *a; -> range of *a, int a[10]; -> range of a[10], int a[1][2][3]; -> range of a[1][2][3], int *a = nullptr -> range of *a = nullptr. FIMXE: Name must be a source range, e.g. for operator+.

Definition at line 206 of file BuildTree.cpp.

◆ getOperatorNodeKind()

static syntax::NodeKind getOperatorNodeKind ( const CXXOperatorCallExpr E)
static

◆ isImplicitExpr()

static LLVM_ATTRIBUTE_UNUSED bool isImplicitExpr ( clang::Expr E)
static