clang
7.0.0
|
#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/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/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <string>
#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"
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) |
#define ABSTRACT_STMT | ( | CLASS | ) |
Definition at line 140 of file StmtPrinter.cpp.
#define ATOMIC_BUILTIN | ( | ID, | |
TYPE, | |||
ATTRS | |||
) |
#define BUILTIN | ( | ID, | |
TYPE, | |||
ATTRS | |||
) |
#define OPENMP_CLAUSE | ( | Name, | |
Class | |||
) | void Visit##Class(Class *S); |
Definition at line 642 of file StmtPrinter.cpp.
#define OVERLOADED_OPERATOR | ( | Name, | |
Spelling, | |||
Token, | |||
Unary, | |||
Binary, | |||
MemberOnly | |||
) | Spelling, |
#define STMT | ( | CLASS, | |
PARENT | |||
) | void Visit##CLASS(CLASS *Node); |
Definition at line 141 of file StmtPrinter.cpp.
#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; |
|
static |
Definition at line 2540 of file StmtPrinter.cpp.
References clang::ET_IsLValueExpr, clang::ET_IsRValueExpr, clang::TypeTraitExpr::getTrait(), and getTypeTraitName().
|
static |
Definition at line 2519 of file StmtPrinter.cpp.
Referenced by getExpressionTraitName().
|
static |
Definition at line 2532 of file StmtPrinter.cpp.
References clang::ATT_ArrayExtent, and clang::ATT_ArrayRank.
Definition at line 1377 of file StmtPrinter.cpp.
References clang::CharacterLiteral::Ascii, clang::ObjCIvarRefExpr::getBase(), clang::ObjCPropertyRefExpr::getBase(), clang::ObjCSubscriptRefExpr::getBaseExpr(), clang::ObjCPropertyRefExpr::getClassReceiver(), clang::ObjCIvarRefExpr::getDecl(), clang::ObjCPropertyRefExpr::getExplicitProperty(), clang::PredefinedExpr::getIdentType(), clang::PredefinedExpr::getIdentTypeName(), clang::ObjCPropertyRefExpr::getImplicitPropertyGetter(), clang::ObjCPropertyRefExpr::getImplicitPropertySetter(), clang::ObjCSubscriptRefExpr::getKeyExpr(), clang::CharacterLiteral::getKind(), clang::NamedDecl::getName(), clang::SelectorTable::getPropertyNameFromSetterSelector(), clang::ObjCMethodDecl::getSelector(), clang::CharacterLiteral::getValue(), clang::Expr::IgnoreImpCasts(), clang::ObjCIvarRefExpr::isArrow(), clang::ObjCPropertyRefExpr::isClassReceiver(), clang::ObjCPropertyRefExpr::isImplicitProperty(), clang::ObjCPropertyRefExpr::isObjectReceiver(), clang::isPrintable(), clang::ObjCPropertyRefExpr::isSuperReceiver(), clang::ImplicitParamDecl::ObjCSelf, clang::PrintingPolicy::SuppressImplicitBase, clang::CharacterLiteral::UTF16, clang::CharacterLiteral::UTF32, clang::CharacterLiteral::UTF8, and clang::CharacterLiteral::Wide.
Definition at line 1743 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().
|
static |
Prints the given expression using the original source text.
Returns true on success, false otherwise.
Definition at line 1494 of file StmtPrinter.cpp.
References clang::PrintingPolicy::ConstantsAsWritten, clang::Type::getAs(), getKind(), clang::ASTContext::getLangOpts(), clang::ASTContext::getSourceManager(), clang::Stmt::getSourceRange(), clang::Lexer::getSourceText(), clang::CharSourceRange::getTokenRange(), clang::Expr::getType(), clang::APIntStorage::getValue(), clang::FixedPointLiteral::getValueAsString(), and clang::Type::isSignedIntegerType().
Referenced by PrintFloatingLiteral().
|
static |
Definition at line 1554 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::UETT_AlignOf, clang::UETT_OpenMPRequiredSimdAlign, clang::UETT_SizeOf, clang::UETT_VecStep, and clang::PrintingPolicy::UnderscoreAlignof.