clang  6.0.0svn
Macros | Functions
StmtPrinter.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.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/ExprOpenMP.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/Format.h"
#include "clang/AST/StmtNodes.inc"
#include "clang/Basic/OpenMPKinds.def"
#include "clang/Basic/Builtins.def"
#include "clang/Basic/OperatorKinds.def"
#include "clang/Basic/TokenKinds.def"
Include dependency graph for StmtPrinter.cpp:

Go to the source code of this file.

Macros

#define ABSTRACT_STMT(CLASS)
 
#define STMT(CLASS, PARENT)   void Visit##CLASS(CLASS *Node);
 
#define OPENMP_CLAUSE(Name, Class)   void Visit##Class(Class *S);
 
#define BUILTIN(ID, TYPE, ATTRS)
 
#define ATOMIC_BUILTIN(ID, TYPE, ATTRS)
 
#define OVERLOADED_OPERATOR(Name, Spelling, Token, Unary, Binary, MemberOnly)   Spelling,
 
#define TYPE_TRAIT_1(Spelling, Name, Key)   case clang::UTT_##Name: return #Spelling;
 
#define TYPE_TRAIT_2(Spelling, Name, Key)   case clang::BTT_##Name: return #Spelling;
 
#define TYPE_TRAIT_N(Spelling, Name, Key)   case clang::TT_##Name: return #Spelling;
 

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. More...
 
static void PrintFloatingLiteral (raw_ostream &OS, FloatingLiteral *Node, bool PrintSuffix)
 
static bool isImplicitThis (const Expr *E)
 
static const char * getTypeTraitName (TypeTrait TT)
 
static const char * getTypeTraitName (ArrayTypeTrait ATT)
 
static const char * getExpressionTraitName (ExpressionTrait ET)
 

Macro Definition Documentation

◆ ABSTRACT_STMT

#define ABSTRACT_STMT (   CLASS)

Definition at line 108 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 
)

◆ OPENMP_CLAUSE

#define OPENMP_CLAUSE (   Name,
  Class 
)    void Visit##Class(Class *S);

Definition at line 608 of file StmtPrinter.cpp.

◆ OVERLOADED_OPERATOR

#define OVERLOADED_OPERATOR (   Name,
  Spelling,
  Token,
  Unary,
  Binary,
  MemberOnly 
)    Spelling,

◆ STMT

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

Definition at line 109 of file StmtPrinter.cpp.

◆ TYPE_TRAIT_1

#define TYPE_TRAIT_1 (   Spelling,
  Name,
  Key 
)    case clang::UTT_##Name: return #Spelling;

◆ TYPE_TRAIT_2

#define TYPE_TRAIT_2 (   Spelling,
  Name,
  Key 
)    case clang::BTT_##Name: return #Spelling;

◆ TYPE_TRAIT_N

#define TYPE_TRAIT_N (   Spelling,
  Name,
  Key 
)    case clang::TT_##Name: return #Spelling;

Function Documentation

◆ getExpressionTraitName()

static const char* getExpressionTraitName ( ExpressionTrait  ET)
static

◆ getTypeTraitName() [1/2]

static const char* getTypeTraitName ( TypeTrait  TT)
static

Definition at line 2454 of file StmtPrinter.cpp.

Referenced by getExpressionTraitName().

◆ getTypeTraitName() [2/2]

static const char* getTypeTraitName ( ArrayTypeTrait  ATT)
static

Definition at line 2467 of file StmtPrinter.cpp.

References clang::ATT_ArrayExtent, and clang::ATT_ArrayRank.

◆ isImplicitSelf()

static bool isImplicitSelf ( const Expr E)
static

◆ isImplicitThis()

static bool isImplicitThis ( const Expr E)
static

Definition at line 1688 of file StmtPrinter.cpp.

References clang::DesignatedInitExpr::designators(), clang::ExtVectorElementExpr::getAccessor(), clang::DesignatedInitExpr::getArrayIndex(), clang::DesignatedInitExpr::getArrayRangeEnd(), clang::DesignatedInitExpr::getArrayRangeStart(), clang::Type::getAsCXXRecordDecl(), clang::ObjCIsaExpr::getBase(), clang::MemberExpr::getBase(), clang::DesignatedInitUpdateExpr::getBase(), clang::ExtVectorElementExpr::getBase(), clang::BinaryConditionalOperator::getCommon(), clang::ConditionalOperator::getCond(), clang::ChooseExpr::getCond(), clang::ShuffleVectorExpr::getExpr(), clang::ParenListExpr::getExpr(), clang::BinaryConditionalOperator::getFalseExpr(), clang::InitListExpr::getInit(), clang::DesignatedInitExpr::getInit(), clang::CompoundLiteralExpr::getInitializer(), clang::AddrLabelExpr::getLabel(), clang::BinaryOperator::getLHS(), clang::ConditionalOperator::getLHS(), clang::ChooseExpr::getLHS(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getMemberNameInfo(), clang::IdentifierInfo::getName(), clang::NamedDecl::getName(), clang::ParenListExpr::getNumExprs(), clang::InitListExpr::getNumInits(), clang::ShuffleVectorExpr::getNumSubExprs(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getOpcodeStr(), clang::MemberExpr::getQualifier(), clang::BinaryOperator::getRHS(), clang::ConditionalOperator::getRHS(), clang::ChooseExpr::getRHS(), clang::ConvertVectorExpr::getSrcExpr(), clang::CastExpr::getSubExpr(), clang::VAArgExpr::getSubExpr(), clang::ArrayInitLoopExpr::getSubExpr(), clang::StmtExpr::getSubStmt(), clang::InitListExpr::getSyntacticForm(), clang::PseudoObjectExpr::getSyntacticForm(), clang::Expr::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::DesignatedInitUpdateExpr::getUpdater(), clang::MemberExpr::hasExplicitTemplateArgs(), clang::MemberExpr::hasTemplateKeyword(), clang::ObjCIsaExpr::isArrow(), clang::MemberExpr::isArrow(), clang::Type::isRecordType(), clang::QualType::print(), clang::Decl::print(), clang::printTemplateArgumentList(), clang::PrintingPolicy::SuppressImplicitBase, and clang::MemberExpr::template_arguments().

◆ printExprAsWritten()

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

◆ PrintFloatingLiteral()

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

Definition at line 1501 of file StmtPrinter.cpp.

References clang::PrintingPolicy::Alignof, clang::OffsetOfNode::Array, clang::OffsetOfNode::Base, clang::PrintingPolicy::ConstantsAsWritten, clang::CallExpr::getArg(), clang::UnaryExprOrTypeTraitExpr::getArgumentExpr(), clang::UnaryExprOrTypeTraitExpr::getArgumentType(), clang::OffsetOfNode::getArrayExprIndex(), clang::Type::getAs(), clang::GenericSelectionExpr::getAssocExpr(), clang::GenericSelectionExpr::getAssocType(), clang::OMPArraySectionExpr::getBase(), clang::CallExpr::getCallee(), clang::OMPArraySectionExpr::getColonLoc(), clang::OffsetOfExpr::getComponent(), clang::GenericSelectionExpr::getControllingExpr(), clang::OffsetOfNode::getFieldName(), clang::OffsetOfExpr::getIndexExpr(), getKind(), clang::OffsetOfNode::getKind(), clang::UnaryExprOrTypeTraitExpr::getKind(), clang::OMPArraySectionExpr::getLength(), clang::ArraySubscriptExpr::getLHS(), clang::OMPArraySectionExpr::getLowerBound(), clang::IdentifierInfo::getName(), clang::CallExpr::getNumArgs(), clang::GenericSelectionExpr::getNumAssocs(), clang::OffsetOfExpr::getNumComponents(), clang::UnaryOperator::getOpcode(), clang::UnaryOperator::getOpcodeStr(), clang::ArraySubscriptExpr::getRHS(), clang::ImaginaryLiteral::getSubExpr(), clang::ParenExpr::getSubExpr(), clang::UnaryOperator::getSubExpr(), clang::TypeSourceInfo::getType(), clang::Expr::getType(), clang::OffsetOfExpr::getTypeSourceInfo(), clang::FloatingLiteral::getValue(), Id, clang::UnaryExprOrTypeTraitExpr::isArgumentType(), clang::QualType::isNull(), clang::UnaryOperator::isPostfix(), clang::SourceLocation::isValid(), clang::StringLiteral::outputString(), clang::QualType::print(), printExprAsWritten(), clang::T, clang::UETT_AlignOf, clang::UETT_OpenMPRequiredSimdAlign, clang::UETT_SizeOf, clang::UETT_VecStep, and clang::PrintingPolicy::UnderscoreAlignof.