clang 19.0.0git
Macros | Functions
StmtPrinter.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclOpenMP.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/ExprOpenMP.h"
#include "clang/AST/NestedNameSpecifier.h"
#include "clang/AST/OpenMPClause.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtObjC.h"
#include "clang/AST/StmtOpenMP.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/AST/TemplateBase.h"
#include "clang/AST/Type.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/ExpressionTraits.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/JsonSupport.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/Lambda.h"
#include "clang/Basic/OpenMPKinds.h"
#include "clang/Basic/OperatorKinds.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TypeTraits.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <optional>
#include <string>
#include "clang/AST/StmtNodes.inc"
#include "clang/Basic/Builtins.inc"

Go to the source code of this file.

Macros

#define ABSTRACT_STMT(CLASS)
 
#define STMT(CLASS, PARENT)    void Visit##CLASS(CLASS *Node);
 
#define BUILTIN(ID, TYPE, ATTRS)
 
#define ATOMIC_BUILTIN(ID, TYPE, ATTRS)
 

Functions

static bool isImplicitSelf (const Expr *E)
 
static bool printExprAsWritten (raw_ostream &OS, Expr *E, const ASTContext *Context)
 Prints the given expression using the original source text.
 
static void PrintFloatingLiteral (raw_ostream &OS, FloatingLiteral *Node, bool PrintSuffix)
 
static bool isImplicitThis (const Expr *E)
 

Macro Definition Documentation

◆ ABSTRACT_STMT

#define ABSTRACT_STMT (   CLASS)

Definition at line 163 of file StmtPrinter.cpp.

◆ ATOMIC_BUILTIN

#define ATOMIC_BUILTIN (   ID,
  TYPE,
  ATTRS 
)
Value:
case AtomicExpr::AO ## ID: \
Name = #ID "("; \
break;

◆ BUILTIN

#define BUILTIN (   ID,
  TYPE,
  ATTRS 
)

◆ STMT

#define STMT (   CLASS,
  PARENT 
)     void Visit##CLASS(CLASS *Node);

Definition at line 164 of file StmtPrinter.cpp.

Function Documentation

◆ isImplicitSelf()

static bool isImplicitSelf ( const Expr E)
static

Definition at line 1210 of file StmtPrinter.cpp.

◆ isImplicitThis()

static bool isImplicitThis ( const Expr E)
static

Definition at line 1583 of file StmtPrinter.cpp.

◆ printExprAsWritten()

static bool printExprAsWritten ( raw_ostream &  OS,
Expr E,
const ASTContext Context 
)
static

Prints the given expression using the original source text.

Returns true on success, false otherwise.

Definition at line 1276 of file StmtPrinter.cpp.

References clang::ASTContext::getLangOpts(), clang::ASTContext::getSourceManager(), clang::Stmt::getSourceRange(), clang::Lexer::getSourceText(), clang::CharSourceRange::getTokenRange(), and clang::Invalid.

◆ PrintFloatingLiteral()

static void PrintFloatingLiteral ( raw_ostream &  OS,
FloatingLiteral Node,
bool  PrintSuffix 
)
static

Definition at line 1349 of file StmtPrinter.cpp.

References clang::BuiltinType::getKind(), and Node.