clang
7.0.0
|
Stmt - This represents one statement. More...
#include "clang/AST/Stmt.h"
Classes | |
class | CallExprBitfields |
class | CastExprBitfields |
class | CharacterLiteralBitfields |
class | CoawaitExprBitfields |
class | CompoundStmtBitfields |
struct | ConstExprIterator |
Const iterator for iterating over Stmt * arrays that contain only Expr *. More... | |
class | DeclRefExprBitfields |
struct | EmptyShell |
A placeholder type used to construct an empty shell of a type, that will be filled in later (e.g., by some de-serialization). More... | |
class | ExprBitfields |
struct | ExprIterator |
Iterator for iterating over Stmt * arrays that contain only Expr *. More... | |
class | ExprWithCleanupsBitfields |
class | FloatingLiteralBitfields |
class | IfStmtBitfields |
class | InitListExprBitfields |
class | ObjCIndirectCopyRestoreExprBitfields |
class | OpaqueValueExprBitfields |
class | PseudoObjectExprBitfields |
class | StmtBitfields |
class | TypeTraitExprBitfields |
class | UnaryExprOrTypeTraitExprBitfields |
Public Types | |
enum | StmtClass { NoStmtClass = 0 } |
using | child_iterator = StmtIterator |
Child Iterators: All subclasses must implement 'children' to permit easy iteration over the substatements/subexpessions of an AST node. More... | |
using | const_child_iterator = ConstStmtIterator |
using | child_range = llvm::iterator_range< child_iterator > |
using | const_child_range = llvm::iterator_range< const_child_iterator > |
Public Member Functions | |
void * | operator new (size_t bytes, const ASTContext &C, unsigned alignment=8) |
void * | operator new (size_t bytes, const ASTContext *C, unsigned alignment=8) |
void * | operator new (size_t bytes, void *mem) noexcept |
void | operator delete (void *, const ASTContext &, unsigned) noexcept |
void | operator delete (void *, const ASTContext *, unsigned) noexcept |
void | operator delete (void *, size_t) noexcept |
void | operator delete (void *, void *) noexcept |
Stmt (StmtClass SC) | |
StmtClass | getStmtClass () const |
const char * | getStmtClassName () const |
SourceRange | getSourceRange () const LLVM_READONLY |
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. More... | |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getBeginLoc () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
SourceLocation | getEndLoc () const LLVM_READONLY |
void | dump () const |
Dumps the specified AST fragment and all subtrees to llvm::errs() . More... | |
void | dump (SourceManager &SM) const |
void | dump (raw_ostream &OS, SourceManager &SM) const |
void | dump (raw_ostream &OS) const |
void | dumpColor () const |
dumpColor - same as dump(), but forces color highlighting. More... | |
void | dumpPretty (const ASTContext &Context) const |
dumpPretty/printPretty - These two methods do a "pretty print" of the AST back to its original source language syntax. More... | |
void | printPretty (raw_ostream &OS, PrinterHelper *Helper, const PrintingPolicy &Policy, unsigned Indentation=0, const ASTContext *Context=nullptr) const |
void | viewAST () const |
viewAST - Visualize an AST rooted at this Stmt* using GraphViz. More... | |
Stmt * | IgnoreImplicit () |
Skip past any implicit AST nodes which might surround this statement, such as ExprWithCleanups or ImplicitCastExpr nodes. More... | |
const Stmt * | IgnoreImplicit () const |
Stmt * | IgnoreContainers (bool IgnoreCaptured=false) |
Skip no-op (attributed, compound) container stmts and skip captured stmt at the top, if IgnoreCaptured is true. More... | |
const Stmt * | IgnoreContainers (bool IgnoreCaptured=false) const |
const Stmt * | stripLabelLikeStatements () const |
Strip off all label-like statements. More... | |
Stmt * | stripLabelLikeStatements () |
child_range | children () |
const_child_range | children () const |
child_iterator | child_begin () |
child_iterator | child_end () |
const_child_iterator | child_begin () const |
const_child_iterator | child_end () const |
void | Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context, bool Canonical) const |
Produce a unique representation of the given statement. More... | |
void | ProcessODRHash (llvm::FoldingSetNodeID &ID, ODRHash &Hash) const |
Calculate a unique representation for a statement that is stable across compiler invocations. More... | |
Static Public Member Functions | |
static void | addStmtClass (const StmtClass s) |
static void | EnableStatistics () |
static void | PrintStats () |
Protected Types | |
enum | { NumStmtBits = 8 } |
enum | { NumExprBits = 17 } |
enum | APFloatSemantics { IEEEhalf, IEEEsingle, IEEEdouble, x87DoubleExtended, IEEEquad, PPCDoubleDouble } |
Protected Member Functions | |
void * | operator new (size_t bytes) noexcept |
void | operator delete (void *data) noexcept |
Stmt (StmtClass SC, EmptyShell) | |
Construct an empty statement. More... | |
Friends | |
class | ASTStmtReader |
class | ASTStmtWriter |
using clang::Stmt::child_range = llvm::iterator_range<child_iterator> |
using clang::Stmt::const_child_range = llvm::iterator_range<const_child_iterator> |
|
protected |
|
inlineexplicitprotected |
Construct an empty statement.
Definition at line 379 of file Stmt.h.
Referenced by clang::CXXTryStmt::Create(), clang::CoroutineBodyStmt::Create(), clang::SEHExceptStmt::Create(), clang::SEHTryStmt::getFinallyHandler(), clang::ReturnStmt::getRetValue(), and clang::ObjCForCollectionStmt::ObjCForCollectionStmt().
|
static |
Definition at line 104 of file Stmt.cpp.
References StmtClassNameTable::Counter, and getStmtInfoTableEntry().
|
inline |
Definition at line 468 of file Stmt.h.
References clang::children().
Referenced by llvm::GraphTraits< clang::Stmt * >::child_begin(), llvm::GraphTraits< const clang::Stmt * >::child_begin(), clang::OMPExecutableDirective::getAssociatedStmt(), clang::OMPLoopDirective::getCalcLastIteration(), clang::OMPLoopDirective::getCombinedCond(), clang::OMPLoopDirective::getCombinedEnsureUpperBound(), clang::OMPLoopDirective::getCombinedInit(), clang::OMPLoopDirective::getCombinedLowerBoundVariable(), clang::OMPLoopDirective::getCombinedNextLowerBound(), clang::OMPLoopDirective::getCombinedNextUpperBound(), clang::OMPLoopDirective::getCombinedUpperBoundVariable(), clang::OMPLoopDirective::getCond(), clang::OMPLoopDirective::getDistInc(), clang::OMPLoopDirective::getEnsureUpperBound(), clang::OMPAtomicDirective::getExpr(), clang::DesignatedInitExpr::Designator::getFieldName(), clang::OMPLoopDirective::getInc(), clang::OMPLoopDirective::getInit(), clang::OMPLoopDirective::getIsLastIterVariable(), clang::OMPLoopDirective::getIterationVariable(), clang::OMPLoopDirective::getLastIteration(), clang::OMPLoopDirective::getLowerBoundVariable(), clang::OMPLoopDirective::getNextLowerBound(), clang::OMPLoopDirective::getNextUpperBound(), clang::OMPLoopDirective::getNumIterations(), clang::OMPLoopDirective::getPreCond(), clang::OMPLoopDirective::getPreInits(), clang::OMPLoopDirective::getPrevEnsureUpperBound(), clang::OMPLoopDirective::getPrevLowerBoundVariable(), clang::OMPLoopDirective::getPrevUpperBoundVariable(), clang::OMPTaskgroupDirective::getReductionRef(), clang::OMPLoopDirective::getStrideVariable(), clang::OMPAtomicDirective::getUpdateExpr(), clang::OMPLoopDirective::getUpperBoundVariable(), clang::OMPAtomicDirective::getV(), clang::OMPAtomicDirective::getX(), isIdenticalStmt(), clang::OMPLoopDirective::setCalcLastIteration(), clang::OMPLoopDirective::setCombinedCond(), clang::OMPLoopDirective::setCombinedEnsureUpperBound(), clang::OMPLoopDirective::setCombinedInit(), clang::OMPLoopDirective::setCombinedLowerBoundVariable(), clang::OMPLoopDirective::setCombinedNextLowerBound(), clang::OMPLoopDirective::setCombinedNextUpperBound(), clang::OMPLoopDirective::setCombinedUpperBoundVariable(), clang::OMPLoopDirective::setCond(), clang::OMPLoopDirective::setDistInc(), clang::OMPLoopDirective::setEnsureUpperBound(), clang::OMPLoopDirective::setInc(), clang::OMPLoopDirective::setInit(), clang::OMPLoopDirective::setIsLastIterVariable(), clang::OMPLoopDirective::setIterationVariable(), clang::OMPLoopDirective::setLastIteration(), clang::OMPLoopDirective::setLowerBoundVariable(), clang::OMPLoopDirective::setNextLowerBound(), clang::OMPLoopDirective::setNextUpperBound(), clang::OMPLoopDirective::setNumIterations(), clang::OMPLoopDirective::setPreCond(), clang::OMPLoopDirective::setPreInits(), clang::OMPLoopDirective::setPrevEnsureUpperBound(), clang::OMPLoopDirective::setPrevLowerBoundVariable(), clang::OMPLoopDirective::setPrevUpperBoundVariable(), clang::OMPLoopDirective::setStrideVariable(), and clang::OMPLoopDirective::setUpperBoundVariable().
|
inline |
Definition at line 471 of file Stmt.h.
References clang::children().
|
inline |
Definition at line 469 of file Stmt.h.
References clang::children().
Referenced by llvm::GraphTraits< clang::Stmt * >::child_end(), llvm::GraphTraits< const clang::Stmt * >::child_end(), and isIdenticalStmt().
|
inline |
Definition at line 472 of file Stmt.h.
References clang::children().
Stmt::child_range Stmt::children | ( | ) |
Definition at line 227 of file Stmt.cpp.
References NoStmtClass, clang::ast_matchers::stmt, and v.
Referenced by clang::Sema::ActOnOpenMPThreadprivateDirective(), BuildUniqueMethodName(), clang::RecursiveASTVisitor< CallGraph >::getStmtChildren(), reversePropagateIntererstingSymbols(), SearchForReturnInStmt(), seenBeforeRec(), clang::CloneConstraint::splitCloneGroups(), and Write_RethrowObject().
|
inline |
Definition at line 463 of file Stmt.h.
References clang::children().
LLVM_DUMP_METHOD void Stmt::dump | ( | ) | const |
Dumps the specified AST fragment and all subtrees to llvm::errs()
.
Definition at line 2793 of file ASTDumper.cpp.
References P.
LLVM_DUMP_METHOD void Stmt::dump | ( | SourceManager & | SM | ) | const |
Definition at line 2779 of file ASTDumper.cpp.
References dump().
LLVM_DUMP_METHOD void Stmt::dump | ( | raw_ostream & | OS, |
SourceManager & | SM | ||
) | const |
Definition at line 2783 of file ASTDumper.cpp.
References P.
LLVM_DUMP_METHOD void Stmt::dump | ( | raw_ostream & | OS | ) | const |
Definition at line 2788 of file ASTDumper.cpp.
References P.
LLVM_DUMP_METHOD void Stmt::dumpColor | ( | ) | const |
dumpColor - same as dump(), but forces color highlighting.
Definition at line 2798 of file ASTDumper.cpp.
References P.
void Stmt::dumpPretty | ( | const ASTContext & | Context | ) | const |
dumpPretty/printPretty - These two methods do a "pretty print" of the AST back to its original source language syntax.
Definition at line 2805 of file StmtPrinter.cpp.
References clang::ASTContext::getLangOpts().
SourceLocation Stmt::getBeginLoc | ( | ) | const |
Definition at line 278 of file Stmt.cpp.
References NoStmtClass.
SourceLocation Stmt::getEndLoc | ( | ) | const |
Definition at line 291 of file Stmt.cpp.
References NoStmtClass.
|
inline |
Definition at line 403 of file Stmt.h.
Referenced by clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnLambdaExpr(), clang::arcmt::ObjCMigrateAction::BeginInvocation(), clang::Sema::BuildCStyleCastExpr(), clang::Sema::BuildCXXFunctionalCastExpr(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildMemberInitializer(), CheckFallThroughForBody(), clang::Sema::CheckObjCBridgeRelatedConversions(), clang::Sema::CreateBuiltinBinOp(), clang::InitializationKind::CreateForInit(), CreateIfFixit(), clang::CXXDestructorCall::CXXDestructorCall(), DiagnoseBitwisePrecedence(), clang::Sema::DiagnoseCommaOperator(), DiagnoseConditionalPrecedence(), DiagnoseNarrowingInInitList(), diagnoseNoViableConversion(), DiagnoseShiftCompare(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), clang::CodeGen::CodeGenFunction::GenerateSEHFinallyFunction(), clang::CXXCatchStmt::getEndLoc(), clang::ObjCForCollectionStmt::getEndLoc(), clang::ObjCStringLiteral::getEndLoc(), clang::ObjCAtCatchStmt::getEndLoc(), clang::StmtSequence::getEndLoc(), clang::ObjCAtFinallyStmt::getEndLoc(), clang::CXXForRangeStmt::getEndLoc(), clang::MSDependentExistsStmt::getEndLoc(), clang::ObjCAtThrowStmt::getEndLoc(), clang::ObjCAutoreleasePoolStmt::getEndLoc(), clang::CXXStdInitializerListExpr::getEndLoc(), clang::CaseStmt::getEndLoc(), clang::DefaultStmt::getEndLoc(), clang::LabelStmt::getEndLoc(), clang::OpaqueValueExpr::getEndLoc(), clang::AttributedStmt::getEndLoc(), clang::IfStmt::getEndLoc(), clang::SwitchStmt::getEndLoc(), clang::WhileStmt::getEndLoc(), clang::CXXBindTemporaryExpr::getEndLoc(), clang::ForStmt::getEndLoc(), clang::IndirectGotoStmt::getEndLoc(), clang::CXXConstructExpr::getEndLoc(), clang::ReturnStmt::getEndLoc(), clang::ImaginaryLiteral::getEndLoc(), clang::ObjCIndirectCopyRestoreExpr::getEndLoc(), clang::UnaryOperator::getEndLoc(), clang::SEHFinallyStmt::getEndLoc(), clang::SEHTryStmt::getEndLoc(), clang::CXXDeleteExpr::getEndLoc(), clang::CompoundLiteralExpr::getEndLoc(), clang::ExprWithCleanups::getEndLoc(), clang::CXXUnresolvedConstructExpr::getEndLoc(), clang::DesignatedInitUpdateExpr::getEndLoc(), clang::BlockExpr::getEndLoc(), clang::FieldDecl::getSourceRange(), clang::Expr::isUnusedResultAWarning(), rewriteToDictionaryLiteral(), clang::consumed::ConsumedAnalyzer::run(), scanToNextArgument(), clang::Sema::SemaBuiltinShuffleVector(), and clang::FunctionDecl::setBody().
|
inline |
Definition at line 401 of file Stmt.h.
Referenced by clang::Sema::ActOnCallExpr(), clang::Sema::ActOnFinishCXXInClassMemberInitializer(), clang::Sema::ActOnOpenMPAtomicDirective(), clang::Sema::ActOnOpenMPDistScheduleClause(), clang::Sema::ActOnOpenMPLinearClause(), clang::Sema::ActOnOpenMPParallelSectionsDirective(), clang::Sema::ActOnOpenMPScheduleClause(), clang::Sema::ActOnOpenMPSectionsDirective(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::arcmt::ObjCMigrateAction::BeginInvocation(), buildCaptureDecl(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildMemberInitializer(), BuildNonArrayForRange(), clang::Sema::BuildOverloadedCallExpr(), clang::Sema::buildOverloadedCallSet(), clang::Sema::CanPerformCopyInitialization(), CastForMoving(), checkConditionalVoidType(), clang::Sema::CheckConstexprFunctionBody(), CheckConstexprFunctionStmt(), CheckConvertedConstantExpression(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), checkDirectCallValidity(), CheckEvalInICE(), CheckFallThroughForBody(), CheckICE(), clang::Sema::CheckImplementationIvars(), CheckMoveOnConstruction(), CheckObjCBridgeCFCast(), CheckObjCBridgeNSCast(), clang::Sema::CheckObjCBridgeRelatedCast(), clang::Sema::CheckObjCBridgeRelatedConversions(), CheckObjCCollectionLiteralElement(), checkObjCCollectionLiteralElement(), clang::Sema::checkOpenCLDisabledDecl(), checkOpenCLEnqueueIntType(), checkOpenCLPipeArg(), checkOpenMPLoop(), checkRecursiveFunction(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::CheckTemplateArgument(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), checkVAStartABI(), checkVAStartIsInVariadicFunction(), clang::Sema::CreateBuiltinBinOp(), clang::InitializationKind::CreateForInit(), CreateIfFixit(), clang::Sema::DeduceAutoType(), DiagnoseBitwisePrecedence(), clang::Sema::DiagnoseCommaOperator(), DiagnoseConditionalPrecedence(), clang::Sema::DiagnoseEmptyLoopBody(), diagnoseLogicalNotOnLHSofCheck(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), DiagnoseNarrowingInInitList(), diagnoseNoViableConversion(), DiagnoseShiftCompare(), diagnoseStringPlusChar(), diagnoseStringPlusInt(), DiagnoseSwitchLabelsFallthrough(), diagnoseTautologicalComparison(), clang::Sema::DiagnoseUnexpandedParameterPack(), DiagUninitUse(), evaluateVarDeclInit(), FinishOverloadedCallExpr(), clang::Sema::GatherArgumentsForCall(), clang::CodeGen::CodeGenFunction::GenerateBlockFunction(), clang::OMPArraySectionExpr::getBeginLoc(), clang::StmtSequence::getBeginLoc(), clang::UserDefinedLiteral::getBeginLoc(), clang::CXXStdInitializerListExpr::getBeginLoc(), clang::MSPropertyRefExpr::getBeginLoc(), clang::ObjCSubscriptRefExpr::getBeginLoc(), clang::OpaqueValueExpr::getBeginLoc(), clang::CXXBindTemporaryExpr::getBeginLoc(), clang::CXXConstructExpr::getBeginLoc(), clang::ImaginaryLiteral::getBeginLoc(), clang::ObjCIndirectCopyRestoreExpr::getBeginLoc(), clang::UnaryOperator::getBeginLoc(), clang::CXXPseudoDestructorExpr::getBeginLoc(), clang::CallExpr::getBeginLoc(), clang::CompoundLiteralExpr::getBeginLoc(), clang::ExprWithCleanups::getBeginLoc(), clang::CXXDependentScopeMemberExpr::getBeginLoc(), clang::UnresolvedMemberExpr::getBeginLoc(), clang::PackExpansionExpr::getBeginLoc(), clang::DesignatedInitUpdateExpr::getBeginLoc(), getInitializationLoc(), getStrlenExprArg(), clang::Sema::InstantiateInClassInitializer(), clang::AnalysisDeclContext::isBodyAutosynthesizedFromModelFile(), IsEnumConstOrFromMacro(), IsInitializerListConstructorConversion(), clang::Expr::isUnusedResultAWarning(), IsUserDefinedConversion(), isValidOrderingForOp(), LookThroughTransitiveAssignmentsAndCommaOperators(), LookupMethodInReceiverType(), clang::InitializationSequence::Perform(), clang::Sema::PerformCopyInitialization(), clang::Sema::PerformImplicitConversion(), clang::ento::ExprEngine::processBranch(), clang::ento::ExprEngine::ProcessStmt(), clang::TreeTransform< Derived >::RebuildCXXOperatorCallExpr(), resolveBuiltinNewDeleteOverload(), rewriteToArrayLiteral(), rewriteToDictionaryLiteral(), scanToNextArgument(), clang::Sema::SemaBuiltinShuffleVector(), SemaOpenCLBuiltinEnqueueKernel(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), clang::CodeGen::CodeGenFunction::startOutlinedSEHHelper(), TryClassUnification(), TryCopyInitialization(), TryImplicitConversion(), TryLValueToRValueCast(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), TryUserDefinedConversion(), and Write_RethrowObject().
SourceRange Stmt::getSourceRange | ( | ) | const |
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager.
We assume AST clients will have a pointer to the respective SourceManager.
Definition at line 266 of file Stmt.cpp.
References NoStmtClass.
Referenced by clang::Sema::ActOnCXXFoldExpr(), clang::Sema::ActOnDependentMemberExpr(), clang::Sema::ActOnObjCAtSynchronizedOperand(), clang::Sema::ActOnOpenMPAtomicDirective(), clang::Sema::ActOnOpenMPIsDevicePtrClause(), clang::Sema::ActOnOpenMPThreadprivateDirective(), clang::Sema::ActOnParamDefaultArgument(), clang::Sema::ActOnStartCXXMemberReference(), clang::Sema::ActOnStartLinkageSpecification(), clang::Sema::ActOnStartOfSwitchStmt(), addFixitForObjCARCConversion(), clang::Sema::AddInitializerToDecl(), AnalyzeBitFieldAssignment(), clang::arcmt::ObjCMigrateAction::BeginInvocation(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildInstanceMessage(), clang::Sema::BuildMemberInitializer(), clang::Sema::BuildMemberReferenceExpr(), clang::Sema::BuildMemInitializer(), clang::Sema::BuildObjCAtThrowStmt(), clang::Sema::BuildObjCBridgedCast(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::BuildReturnStmt(), clang::Sema::BuildStaticAssertDeclaration(), CastForMoving(), clang::Sema::checkAllowedCUDAInitializer(), checkArithmeticBinOpPointerOperands(), checkArithmeticIncompletePointerType(), checkBuiltinArgument(), CheckBuiltinTargetSupport(), checkCondition(), checkConditionalVoidType(), CheckConvertedConstantExpression(), CheckCXX98CompatAccessibleCopy(), clang::Sema::checkDeclIsAllowedInOpenMPTarget(), checkEnumComparison(), clang::Sema::CheckExceptionSpecCompatibility(), clang::Sema::CheckExtraCXXDefaultArguments(), clang::Sema::CheckFloatComparison(), CheckFormatString(), CheckIncrementDecrementOperand(), checkIndirectCopyRestoreSource(), CheckIndirectionOperand(), CheckKeyForObjCARCConversion(), checkMapClauseExpressionBase(), checkMapConflicts(), checkMappableExpressionList(), CheckNonNullArgument(), CheckObjCCollectionLiteralElement(), checkObjCCollectionLiteralElement(), clang::Sema::CheckObjCForCollectionOperand(), checkObjCPointerIntrospection(), checkOpenCLConditionVector(), checkOpenCLPipeArg(), checkOpenCLPipePacketType(), checkOpenMPLoop(), clang::Sema::CheckPackExpansion(), checkPointerIntegerMismatch(), checkSimdlenSafelenSpecified(), CheckTemplateArgumentAddressOfObjectOrFunction(), CheckTemplateArgumentIsCompatibleWithParameter(), CheckTemplateArgumentPointerToMember(), checkUnsafeAssignLiteral(), checkUnsafeAssignObject(), clang::Sema::checkUnsafeExprAssigns(), checkVAStartIsInVariadicFunction(), CopyObject(), CreateIfFixit(), clang::Sema::DeduceFunctionTypeFromReturnExpr(), clang::Sema::DiagnoseAlwaysNonNullPointer(), diagnoseAmbiguousConversion(), diagnoseArithmeticOnFunctionPointer(), diagnoseArithmeticOnNullPointer(), diagnoseArithmeticOnTwoFunctionPointers(), diagnoseArithmeticOnTwoVoidPointers(), diagnoseArithmeticOnVoidPointer(), clang::Sema::DiagnoseAutoDeductionFailure(), clang::Sema::DiagnoseCommaOperator(), DiagnoseConditionalPrecedence(), clang::Sema::DiagnoseMultipleUserDefinedConversion(), DiagnoseNarrowingInInitList(), DiagnoseNullConversion(), diagnoseObjCARCConversion(), diagnoseObjCLiteralComparison(), diagnosePointerIncompatibility(), diagnoseRetainCycle(), DiagnoseSelfAssignment(), clang::Sema::DiagnoseSelfMove(), DiagnoseShiftCompare(), diagnoseTautologicalComparison(), DiagUninitUse(), doRewriteToUTF8StringBoxedExpressionHelper(), emitBug(), EmitDiagnosticForLogicalAndInLogicalOr(), clang::CodeGen::CodeGenFunction::emitImplicitAssignmentOperatorBody(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), clang::CodeGen::CodeGenFunction::EmitOMPInnerLoop(), EvaluateArrayTypeTrait(), findRetainCycleOwner(), finishContextualImplicitConversion(), FinishOverloadedCallExpr(), getAsPointeeSymbol(), GetCFNumberSize(), clang::Sema::GetFormatStringType(), getIncrementedVar(), getLengthOnSingleLine(), GetNSSetArgumentIndex(), clang::Sema::getPrintable(), getPrintfFormatArgumentNum(), getPrivateItem(), getReturnTypeForMethod(), clang::CXXStdInitializerListExpr::getSourceRange(), clang::ObjCMethodCall::getSourceRange(), getStrlenExprArg(), clang::Sema::HandleExprPropertyRefExpr(), HandleNeonVectorTypeAttr(), clang::Sema::InvalidLogicalVectorOperands(), isDebuggingContext(), isNonNegativeIntegerValue(), isNullPointerValueTemplateArgument(), clang::Expr::isUnusedResultAWarning(), isValidOrderingForOp(), LookThroughTransitiveAssignmentsAndCommaOperators(), LookupMemberExprInRecord(), LookupMethodInReceiverType(), maybePutParensOnReceiver(), objectifyExpr(), clang::InitializationSequence::Perform(), clang::Sema::PerformContextualImplicitConversion(), clang::Sema::PerformImplicitConversion(), printExprAsWritten(), recordConversion(), clang::tooling::replaceStmtWithStmt(), clang::tooling::replaceStmtWithText(), resolveBuiltinNewDeleteOverload(), clang::edit::rewriteObjCRedundantCallWithLiteral(), rewriteToArrayLiteral(), rewriteToArraySubscriptSet(), rewriteToBoolLiteral(), rewriteToCharLiteral(), rewriteToDictionaryLiteral(), rewriteToDictionarySubscriptSet(), rewriteToNumberLiteral(), rewriteToNumericBoxedExpression(), rewriteToSubscriptGetCommon(), SemaBuiltinCommitRWPipe(), SemaBuiltinCpuIs(), SemaBuiltinCpuSupports(), SemaBuiltinPipePackets(), SemaBuiltinReserveRWPipe(), SemaBuiltinRWPipe(), clang::Sema::SemaBuiltinShuffleVector(), clang::Sema::SemaConvertVectorExpr(), SemaOpenCLBuiltinToAddr(), and clang::Sema::VerifyBitField().
|
inline |
Definition at line 391 of file Stmt.h.
References clang::tooling::fixit::internal::getSourceRange().
Referenced by AddVariableConstraints(), clang::CFG::BuildOptions::alwaysAdd(), CheckConstexprFunctionStmt(), checkFormatStringExpr(), CheckICE(), clang::Sema::CheckLiteralKind(), clang::CXXCatchStmt::classof(), clang::ObjCForCollectionStmt::classof(), clang::ObjCStringLiteral::classof(), clang::ObjCBoolLiteralExpr::classof(), clang::CXXTryStmt::classof(), clang::ObjCAtCatchStmt::classof(), clang::OMPArraySectionExpr::classof(), clang::CXXOperatorCallExpr::classof(), clang::ObjCAtFinallyStmt::classof(), clang::ObjCBoxedExpr::classof(), clang::CXXMemberCallExpr::classof(), clang::CXXForRangeStmt::classof(), clang::CUDAKernelCallExpr::classof(), clang::ObjCArrayLiteral::classof(), clang::ObjCAtTryStmt::classof(), clang::CXXNamedCastExpr::classof(), clang::MSDependentExistsStmt::classof(), clang::ObjCAtSynchronizedStmt::classof(), clang::OMPParallelDirective::classof(), clang::CXXStaticCastExpr::classof(), clang::ObjCAtThrowStmt::classof(), clang::CXXDynamicCastExpr::classof(), clang::ObjCAutoreleasePoolStmt::classof(), clang::ObjCDictionaryLiteral::classof(), clang::CoroutineBodyStmt::classof(), clang::CXXReinterpretCastExpr::classof(), clang::ObjCEncodeExpr::classof(), clang::CXXConstCastExpr::classof(), clang::ObjCSelectorExpr::classof(), clang::CoreturnStmt::classof(), clang::ObjCProtocolExpr::classof(), clang::DeclStmt::classof(), clang::CXXBoolLiteralExpr::classof(), clang::ObjCIvarRefExpr::classof(), clang::NullStmt::classof(), clang::CXXNullPtrLiteralExpr::classof(), clang::CompoundStmt::classof(), clang::CXXTypeidExpr::classof(), clang::SwitchCase::classof(), clang::ObjCPropertyRefExpr::classof(), clang::MSPropertyRefExpr::classof(), clang::CaseStmt::classof(), clang::DefaultStmt::classof(), clang::Expr::classof(), clang::MSPropertySubscriptExpr::classof(), clang::ObjCSubscriptRefExpr::classof(), clang::LabelStmt::classof(), clang::OpaqueValueExpr::classof(), clang::CXXUuidofExpr::classof(), clang::AttributedStmt::classof(), clang::OMPLoopDirective::classof(), clang::CXXThisExpr::classof(), clang::IfStmt::classof(), clang::OMPSimdDirective::classof(), clang::CXXThrowExpr::classof(), clang::OMPForDirective::classof(), clang::SwitchStmt::classof(), clang::CXXDefaultArgExpr::classof(), clang::DeclRefExpr::classof(), clang::WhileStmt::classof(), clang::OMPForSimdDirective::classof(), clang::CXXDefaultInitExpr::classof(), clang::DoStmt::classof(), clang::PredefinedExpr::classof(), clang::OMPSectionsDirective::classof(), clang::CXXBindTemporaryExpr::classof(), clang::ForStmt::classof(), clang::OMPSectionDirective::classof(), clang::IntegerLiteral::classof(), clang::GotoStmt::classof(), clang::OMPSingleDirective::classof(), clang::FixedPointLiteral::classof(), clang::IndirectGotoStmt::classof(), clang::ContinueStmt::classof(), clang::OMPMasterDirective::classof(), clang::CXXConstructExpr::classof(), clang::CharacterLiteral::classof(), clang::ObjCMessageExpr::classof(), clang::BreakStmt::classof(), clang::OMPCriticalDirective::classof(), clang::CXXInheritedCtorInitExpr::classof(), clang::ReturnStmt::classof(), clang::ObjCIsaExpr::classof(), clang::FloatingLiteral::classof(), clang::ImaginaryLiteral::classof(), clang::CXXFunctionalCastExpr::classof(), clang::OMPParallelForDirective::classof(), clang::ObjCIndirectCopyRestoreExpr::classof(), clang::AsmStmt::classof(), clang::CXXTemporaryObjectExpr::classof(), clang::ObjCBridgedCastExpr::classof(), clang::OMPParallelForSimdDirective::classof(), clang::ObjCAvailabilityCheckExpr::classof(), clang::OMPParallelSectionsDirective::classof(), clang::StringLiteral::classof(), clang::ParenExpr::classof(), clang::OMPTaskDirective::classof(), clang::OMPTaskyieldDirective::classof(), clang::LambdaExpr::classof(), clang::GCCAsmStmt::classof(), clang::OMPBarrierDirective::classof(), clang::CXXScalarValueInitExpr::classof(), clang::UnaryOperator::classof(), clang::OMPTaskwaitDirective::classof(), clang::MSAsmStmt::classof(), clang::OMPTaskgroupDirective::classof(), clang::SEHExceptStmt::classof(), clang::SEHFinallyStmt::classof(), clang::OMPFlushDirective::classof(), clang::SEHTryStmt::classof(), clang::SEHLeaveStmt::classof(), clang::OMPOrderedDirective::classof(), clang::OffsetOfExpr::classof(), clang::CXXNewExpr::classof(), clang::UnaryExprOrTypeTraitExpr::classof(), clang::CXXDeleteExpr::classof(), clang::OMPAtomicDirective::classof(), clang::ArraySubscriptExpr::classof(), clang::OMPTargetDirective::classof(), clang::CapturedStmt::classof(), clang::OMPTargetDataDirective::classof(), clang::CXXPseudoDestructorExpr::classof(), clang::OMPTargetEnterDataDirective::classof(), clang::CallExpr::classof(), clang::OMPTargetExitDataDirective::classof(), clang::TypeTraitExpr::classof(), clang::OMPTargetParallelDirective::classof(), clang::ArrayTypeTraitExpr::classof(), clang::OMPTargetParallelForDirective::classof(), clang::ExpressionTraitExpr::classof(), clang::OMPTeamsDirective::classof(), clang::OMPCancellationPointDirective::classof(), clang::MemberExpr::classof(), clang::OMPCancelDirective::classof(), clang::OverloadExpr::classof(), clang::CompoundLiteralExpr::classof(), clang::OMPTaskLoopDirective::classof(), clang::UnresolvedLookupExpr::classof(), clang::OMPTaskLoopSimdDirective::classof(), clang::CastExpr::classof(), clang::OMPDistributeDirective::classof(), clang::ImplicitCastExpr::classof(), clang::OMPTargetUpdateDirective::classof(), clang::ExplicitCastExpr::classof(), clang::DependentScopeDeclRefExpr::classof(), clang::CStyleCastExpr::classof(), clang::OMPDistributeParallelForDirective::classof(), clang::ExprWithCleanups::classof(), clang::OMPDistributeParallelForSimdDirective::classof(), clang::OMPDistributeSimdDirective::classof(), clang::CXXUnresolvedConstructExpr::classof(), clang::OMPTargetParallelForSimdDirective::classof(), clang::OMPTargetSimdDirective::classof(), clang::AbstractConditionalOperator::classof(), clang::OMPTeamsDistributeDirective::classof(), clang::ConditionalOperator::classof(), clang::CXXDependentScopeMemberExpr::classof(), clang::OMPTeamsDistributeSimdDirective::classof(), clang::BinaryConditionalOperator::classof(), clang::OMPTeamsDistributeParallelForSimdDirective::classof(), clang::AddrLabelExpr::classof(), clang::UnresolvedMemberExpr::classof(), clang::StmtExpr::classof(), clang::OMPTeamsDistributeParallelForDirective::classof(), clang::ShuffleVectorExpr::classof(), clang::CXXNoexceptExpr::classof(), clang::OMPTargetTeamsDirective::classof(), clang::PackExpansionExpr::classof(), clang::ConvertVectorExpr::classof(), clang::OMPTargetTeamsDistributeDirective::classof(), clang::ChooseExpr::classof(), clang::OMPTargetTeamsDistributeParallelForDirective::classof(), clang::SizeOfPackExpr::classof(), clang::GNUNullExpr::classof(), clang::OMPTargetTeamsDistributeParallelForSimdDirective::classof(), clang::SubstNonTypeTemplateParmExpr::classof(), clang::VAArgExpr::classof(), clang::OMPTargetTeamsDistributeSimdDirective::classof(), clang::SubstNonTypeTemplateParmPackExpr::classof(), clang::FunctionParmPackExpr::classof(), clang::InitListExpr::classof(), clang::MaterializeTemporaryExpr::classof(), clang::CXXFoldExpr::classof(), clang::CoroutineSuspendExpr::classof(), clang::CoawaitExpr::classof(), clang::DependentCoawaitExpr::classof(), clang::CoyieldExpr::classof(), clang::DesignatedInitExpr::classof(), clang::NoInitExpr::classof(), clang::DesignatedInitUpdateExpr::classof(), clang::ImplicitValueInitExpr::classof(), clang::ParenListExpr::classof(), clang::GenericSelectionExpr::classof(), clang::ExtVectorElementExpr::classof(), clang::BlockExpr::classof(), clang::AsTypeExpr::classof(), clang::PseudoObjectExpr::classof(), clang::AtomicExpr::classof(), clang::TypoExpr::classof(), EvaluateStmt(), FindTypeTagExpr(), generateDiagForSwitchOP(), generateMinimalDiagForBlockEdge(), clang::CallEventManager::getCaller(), clang::CXXNamedCastExpr::getCastName(), clang::Expr::getExprLoc(), getLoopCondition(), clang::threadSafety::getSourceLiteralString(), clang::CFGBlock::getTerminatorCondition(), clang::Expr::HasSideEffects(), isConditionForTerminator(), clang::Expr::isConstantInitializer(), isIdenticalStmt(), clang::CXXCtorInitializer::isInClassMemberInitializer(), isInLoop(), isInLoopBody(), isLoop(), clang::Expr::isUnusedResultAWarning(), requiresParensToAddCast(), reversePropagateIntererstingSymbols(), clang::TreeTransform< Derived >::TransformCXXNamedCastExpr(), and visitLocalsRetainedByReferenceBinding().
const char * Stmt::getStmtClassName | ( | ) | const |
Definition at line 75 of file Stmt.cpp.
References getStmtInfoTableEntry(), and StmtClassNameTable::Name.
Referenced by llvm::DOTGraphTraits< const Stmt * >::getNodeLabel(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), and print_elem().
Skip no-op (attributed, compound) container stmts and skip captured stmt at the top, if IgnoreCaptured is true.
Definition at line 133 of file Stmt.cpp.
Referenced by clang::Sema::ActOnOpenMPTargetDirective(), checkOpenMPLoop(), clang::CodeGen::CodeGenFunction::EmitOMPAtomicDirective(), clang::OMPLoopDirective::getBody(), and hasNestedSPMDDirective().
Stmt * Stmt::IgnoreImplicit | ( | ) |
Skip past any implicit AST nodes which might surround this statement, such as ExprWithCleanups or ImplicitCastExpr nodes.
Definition at line 113 of file Stmt.cpp.
Referenced by clang::Expr::IgnoreImplicit().
|
inlineprotectednoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineprotectednoexcept |
void * Stmt::operator new | ( | size_t | bytes, |
const ASTContext & | C, | ||
unsigned | alignment = 8 |
||
) |
|
inline |
|
inlinenoexcept |
void Stmt::printPretty | ( | raw_ostream & | OS, |
PrinterHelper * | Helper, | ||
const PrintingPolicy & | Policy, | ||
unsigned | Indentation = 0 , |
||
const ASTContext * | Context = nullptr |
||
) | const |
Definition at line 2809 of file StmtPrinter.cpp.
References P, and clang::PrinterHelper::~PrinterHelper().
Referenced by clang::Sema::BuildStaticAssertDeclaration(), clang::ento::StringRegion::dumpToStream(), clang::ento::ObjCStringRegion::dumpToStream(), clang::getParameterABISpelling(), clang::operator<<(), clang::TemplateArgument::print(), print_block(), and print_elem().
|
static |
Definition at line 79 of file Stmt.cpp.
References getStmtInfoTableEntry(), and StmtClassInfo.
void Stmt::ProcessODRHash | ( | llvm::FoldingSetNodeID & | ID, |
ODRHash & | Hash | ||
) | const |
Calculate a unique representation for a statement that is stable across compiler invocations.
ID | profile information will be stored in ID. |
Hash | an ODRHash object which will be called where pointers would have been used in the Profile function. |
Definition at line 1999 of file StmtProfile.cpp.
void Stmt::Profile | ( | llvm::FoldingSetNodeID & | ID, |
const ASTContext & | Context, | ||
bool | Canonical | ||
) | const |
Produce a unique representation of the given statement.
ID | once the profiling operation is complete, will contain the unique representation of the given statement. |
Context | the AST context in which the statement resides |
Canonical | whether the profile should be based on the canonical representation of this statement (e.g., where non-type template parameters are identified by index/level rather than their declaration pointers) or the exact representation of the statement as written in the source. |
Definition at line 1993 of file StmtProfile.cpp.
Referenced by clang::CheckEquivalentExceptionSpecImpl(), clang::FunctionProtoType::isTemplateVariadic(), clang::DependentAddressSpaceType::Profile(), clang::DependentSizedExtVectorType::Profile(), clang::DependentVectorType::Profile(), and clang::DependentDecltypeType::Profile().
const Stmt * Stmt::stripLabelLikeStatements | ( | ) | const |
void Stmt::viewAST | ( | ) | const |
viewAST - Visualize an AST rooted at this Stmt* using GraphViz.
Only works on systems with GraphViz (Mac OS X) or dot+gv installed.
Definition at line 21 of file StmtViz.cpp.
|
friend |
|
friend |
union { ... } |
CallExprBitfields clang::Stmt::CallExprBits |
Definition at line 306 of file Stmt.h.
Referenced by clang::CallExpr::CallExpr().
CastExprBitfields clang::Stmt::CastExprBits |
CharacterLiteralBitfields clang::Stmt::CharacterLiteralBits |
CoawaitExprBitfields clang::Stmt::CoawaitBits |
Definition at line 313 of file Stmt.h.
Referenced by clang::CoawaitExpr::CoawaitExpr(), clang::CoawaitExpr::isImplicit(), and clang::CoawaitExpr::setIsImplicit().
CompoundStmtBitfields clang::Stmt::CompoundStmtBits |
Definition at line 298 of file Stmt.h.
Referenced by clang::CompoundStmt::CreateEmpty().
DeclRefExprBitfields clang::Stmt::DeclRefExprBits |
Definition at line 304 of file Stmt.h.
Referenced by computeDeclRefDependence().
ExprBitfields clang::Stmt::ExprBits |
Definition at line 300 of file Stmt.h.
Referenced by clang::AtomicExpr::AtomicExpr(), clang::CallExpr::CallExpr(), computeDeclRefDependence(), clang::OffsetOfExpr::CreateEmpty(), clang::CXXConstructExpr::CXXConstructExpr(), clang::CXXNewExpr::CXXNewExpr(), clang::OverloadExpr::getNamingClass(), clang::ParenListExpr::ParenListExpr(), and clang::ShuffleVectorExpr::ShuffleVectorExpr().
ExprWithCleanupsBitfields clang::Stmt::ExprWithCleanupsBits |
Definition at line 307 of file Stmt.h.
Referenced by clang::ExprWithCleanups::cleanupsHaveSideEffects(), and clang::ExprWithCleanups::getNumObjects().
FloatingLiteralBitfields clang::Stmt::FloatingLiteralBits |
Definition at line 302 of file Stmt.h.
Referenced by clang::FloatingLiteral::getSemantics(), and clang::FloatingLiteral::setSemantics().
IfStmtBitfields clang::Stmt::IfStmtBits |
InitListExprBitfields clang::Stmt::InitListExprBits |
ObjCIndirectCopyRestoreExprBitfields clang::Stmt::ObjCIndirectCopyRestoreExprBits |
Definition at line 310 of file Stmt.h.
Referenced by clang::ObjCIndirectCopyRestoreExpr::shouldCopy().
OpaqueValueExprBitfields clang::Stmt::OpaqueValueExprBits |
PseudoObjectExprBitfields clang::Stmt::PseudoObjectExprBits |
Definition at line 308 of file Stmt.h.
Referenced by clang::PseudoObjectExpr::Create().
StmtBitfields clang::Stmt::StmtBits |
TypeTraitExprBitfields clang::Stmt::TypeTraitExprBits |
Definition at line 312 of file Stmt.h.
Referenced by clang::TypeTraitExpr::getNumArgs(), clang::TypeTraitExpr::getTrait(), clang::TypeTraitExpr::getValue(), and clang::MaterializeTemporaryExpr::setExtendingDecl().
UnaryExprOrTypeTraitExprBitfields clang::Stmt::UnaryExprOrTypeTraitExprBits |