Home
last modified time | relevance | path

Searched refs:Stmt (Results 1 – 25 of 310) sorted by relevance

12345678910>>...13

/freebsd/contrib/llvm-project/clang/include/clang/AST/
H A DStmtObjC.h23 class ObjCForCollectionStmt : public Stmt {
25 Stmt* SubExprs[END_EXPR]; // SubExprs[ELEM] is an expression or declstmt.
29 ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, Stmt *Body,
32 Stmt(ObjCForCollectionStmtClass, Empty) { } in ObjCForCollectionStmt()
34 Stmt *getElement() { return SubExprs[ELEM]; } in getElement()
38 Stmt *getBody() { return SubExprs[BODY]; } in getBody()
40 const Stmt *getElement() const { return SubExprs[ELEM]; } in getElement()
44 const Stmt *getBody() const { return SubExprs[BODY]; } in getBody()
46 void setElement(Stmt *S) { SubExprs[ELEM] = S; } in setElement()
48 SubExprs[COLLECTION] = reinterpret_cast<Stmt*>(E); in setCollection()
[all …]
H A DParentMap.h17 class Stmt; variable
23 ParentMap(Stmt* ASTRoot);
29 void addStmt(Stmt* S);
34 void setParent(const Stmt *S, const Stmt *Parent);
36 Stmt *getParent(Stmt*) const;
37 Stmt *getParentIgnoreParens(Stmt *) const;
38 Stmt *getParentIgnoreParenCasts(Stmt *) const;
39 Stmt *getParentIgnoreParenImpCasts(Stmt *) const;
40 Stmt *getOuterParenParent(Stmt *) const;
42 const Stmt *getParent(const Stmt* S) const { in getParent()
[all …]
H A DStmtCXX.h28 class CXXCatchStmt : public Stmt {
33 Stmt *HandlerBlock;
36 CXXCatchStmt(SourceLocation catchLoc, VarDecl *exDecl, Stmt *handlerBlock) in CXXCatchStmt()
37 : Stmt(CXXCatchStmtClass), CatchLoc(catchLoc), ExceptionDecl(exDecl), in CXXCatchStmt()
41 : Stmt(CXXCatchStmtClass), ExceptionDecl(nullptr), HandlerBlock(nullptr) {} in CXXCatchStmt()
51 Stmt *getHandlerBlock() const { return HandlerBlock; } in getHandlerBlock()
53 static bool classof(const Stmt *T) { in classof()
68 class CXXTryStmt final : public Stmt,
69 private llvm::TrailingObjects<CXXTryStmt, Stmt *> {
76 size_t numTrailingObjects(OverloadToken<Stmt *>) const { return NumHandlers; } in numTrailingObjects() argument
[all …]
H A DStmt.h84 class alignas(void *) Stmt {
115 friend class Stmt; variable
1313 template<typename T, typename TPtr = T *, typename StmtPtr = Stmt *>
1329 using ConstCastIterator = CastIterator<T, const T *const, const Stmt *const>;
1340 explicit Stmt(StmtClass SC, EmptyShell) : Stmt(SC) {}
1343 Stmt() = delete;
1344 Stmt(const Stmt &) = delete;
1345 Stmt(Stmt &&) = delete;
1346 Stmt &operator=(const Stmt &) = delete;
1347 Stmt &operator=(Stmt &&) = delete;
[all …]
H A DStmtGraphTraits.h23 template <> struct GraphTraits<clang::Stmt *> {
24 using NodeRef = clang::Stmt *;
25 using ChildIteratorType = clang::Stmt::child_iterator;
26 using nodes_iterator = llvm::df_iterator<clang::Stmt *>;
28 static NodeRef getEntryNode(clang::Stmt *S) { return S; }
40 static nodes_iterator nodes_begin(clang::Stmt* S) {
44 static nodes_iterator nodes_end(clang::Stmt* S) {
49 template <> struct GraphTraits<const clang::Stmt *> {
50 using NodeRef = const clang::Stmt *;
51 using ChildIteratorType = clang::Stmt::const_child_iterator;
[all …]
H A DStmtOpenACC.h25 class OpenACCConstructStmt : public Stmt {
46 : Stmt(SC), Kind(K), Range(Start, End), DirectiveLoc(DirectiveLoc) {} in OpenACCConstructStmt()
58 static bool classof(const Stmt *S) { in classof()
84 Stmt *AssociatedStmt = nullptr;
90 SourceLocation End, Stmt *AssocStmt) in OpenACCAssociatedStmtConstruct()
94 void setAssociatedStmt(Stmt *S) { AssociatedStmt = S; } in setAssociatedStmt()
95 Stmt *getAssociatedStmt() { return AssociatedStmt; } in getAssociatedStmt()
96 const Stmt *getAssociatedStmt() const { in getAssociatedStmt()
102 static bool classof(const Stmt *T) { in classof()
154 Stmt *StructuredBlock) in OpenACCComputeConstruct()
[all …]
H A DStmtIterator.h24 class Stmt; variable
37 Stmt **stmt;
43 StmtIteratorBase(Stmt **s) : stmt(s) {} in StmtIteratorBase()
73 Stmt*& GetDeclExpr() const;
89 StmtIteratorImpl(Stmt **s) : StmtIteratorBase(s) {} in StmtIteratorImpl()
128 struct StmtIterator : public StmtIteratorImpl<StmtIterator, Stmt*&> {
130 StmtIterator(Stmt** S) : StmtIteratorImpl<StmtIterator, Stmt*&>(S) {} in StmtIterator()
132 : StmtIteratorImpl<StmtIterator, Stmt*&>(dgi, dge) {} in StmtIterator()
134 : StmtIteratorImpl<StmtIterator, Stmt*&>(t) {} in StmtIterator()
138 : StmtIteratorImpl<StmtIterator, Stmt *&>(RHS) {} in StmtIterator()
[all …]
H A DStmtOpenMP.h142 class OMPCanonicalLoop : public Stmt {
157 Stmt *SubStmts[LastSubStmt + 1] = {};
159 OMPCanonicalLoop() : Stmt(StmtClass::OMPCanonicalLoopClass) {} in OMPCanonicalLoop()
163 static OMPCanonicalLoop *create(const ASTContext &Ctx, Stmt *LoopStmt, in create()
180 static bool classof(const Stmt *S) { in classof()
199 Stmt *getLoopStmt() { return SubStmts[LOOP_STMT]; } in getLoopStmt()
200 const Stmt *getLoopStmt() const { return SubStmts[LOOP_STMT]; } in getLoopStmt()
201 void setLoopStmt(Stmt *S) { in setLoopStmt()
266 class OMPExecutableDirective : public Stmt {
306 : Stmt(SC), Kind(K), StartLoc(std::move(StartLoc)), in OMPExecutableDirective()
[all …]
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DParentMap.cpp22 typedef llvm::DenseMap<Stmt*, Stmt*> MapTy;
29 static void BuildParentMap(MapTy& M, Stmt* S, in BuildParentMap()
35 case Stmt::PseudoObjectExprClass: { in BuildParentMap()
43 for (Stmt *SubStmt : S->children()) in BuildParentMap()
57 case Stmt::BinaryConditionalOperatorClass: { in BuildParentMap()
75 case Stmt::OpaqueValueExprClass: { in BuildParentMap()
88 case Stmt::CapturedStmtClass: in BuildParentMap()
89 for (Stmt *SubStmt : S->children()) { in BuildParentMap()
95 if (Stmt *SubStmt = cast<CapturedStmt>(S)->getCapturedStmt()) { in BuildParentMap()
101 for (Stmt *SubStmt : S->children()) { in BuildParentMap()
[all …]
H A DStmt.cpp56 } StmtClassInfo[Stmt::lastStmtConstant+1];
58 static StmtClassNameTable &getStmtInfoTableEntry(Stmt::StmtClass E) { in getStmtInfoTableEntry()
67 StmtClassInfo[(unsigned)Stmt::CLASS##Class].Name = #CLASS; \ in getStmtInfoTableEntry()
68 StmtClassInfo[(unsigned)Stmt::CLASS##Class].Size = sizeof(CLASS); in getStmtInfoTableEntry()
74 void *Stmt::operator new(size_t bytes, const ASTContext& C, in operator new()
79 const char *Stmt::getStmtClassName() const { in getStmtClassName()
101 void Stmt::PrintStats() { in PrintStats()
103 getStmtInfoTableEntry(Stmt::NullStmtClass); in PrintStats()
107 for (int i = 0; i != Stmt::lastStmtConstant+1; i++) { in PrintStats()
113 for (int i = 0; i != Stmt::lastStmtConstant+1; i++) { in PrintStats()
[all …]
H A DStmtObjC.cpp20 ObjCForCollectionStmt::ObjCForCollectionStmt(Stmt *Elem, Expr *Collect, in ObjCForCollectionStmt()
21 Stmt *Body, SourceLocation FCL, in ObjCForCollectionStmt()
23 : Stmt(ObjCForCollectionStmtClass) { in ObjCForCollectionStmt()
31 ObjCAtTryStmt::ObjCAtTryStmt(SourceLocation atTryLoc, Stmt *atTryStmt, in ObjCAtTryStmt()
32 Stmt **CatchStmts, unsigned NumCatchStmts, in ObjCAtTryStmt()
33 Stmt *atFinallyStmt) in ObjCAtTryStmt()
34 : Stmt(ObjCAtTryStmtClass), AtTryLoc(atTryLoc), in ObjCAtTryStmt()
36 Stmt **Stmts = getStmts(); in ObjCAtTryStmt()
46 SourceLocation atTryLoc, Stmt *atTryStmt, in Create()
47 Stmt **CatchStmts, unsigned NumCatchStmts, in Create()
[all …]
H A DStmtCXX.cpp27 ArrayRef<Stmt *> handlers) { in Create()
28 const size_t Size = totalSizeToAlloc<Stmt *>(handlers.size() + 1); in Create()
35 const size_t Size = totalSizeToAlloc<Stmt *>(numHandlers + 1); in Create()
41 ArrayRef<Stmt *> handlers) in CXXTryStmt()
42 : Stmt(CXXTryStmtClass), TryLoc(tryLoc), NumHandlers(handlers.size()) { in CXXTryStmt()
43 Stmt **Stmts = getStmts(); in CXXTryStmt()
48 CXXForRangeStmt::CXXForRangeStmt(Stmt *Init, DeclStmt *Range, in CXXForRangeStmt()
51 Stmt *Body, SourceLocation FL, in CXXForRangeStmt()
54 : Stmt(CXXForRangeStmtClass), ForLoc(FL), CoawaitLoc(CAL), ColonLoc(CL), in CXXForRangeStmt()
89 std::size_t Size = totalSizeToAlloc<Stmt *>( in Create()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/Analysis/Analyses/
H A DExprMutationAnalyzer.h26 using ResultMap = llvm::DenseMap<const Expr *, const Stmt *>;
42 Analyzer(const Stmt &Stm, ASTContext &Context, Memoized &Memorized) in Analyzer()
45 const Stmt *findMutation(const Expr *Exp);
46 const Stmt *findMutation(const Decl *Dec);
48 const Stmt *findPointeeMutation(const Expr *Exp);
49 const Stmt *findPointeeMutation(const Decl *Dec);
50 static bool isUnevaluated(const Stmt *Smt, const Stmt &Stm,
54 using MutationFinder = const Stmt *(Analyzer::*)(const Expr *);
56 const Stmt *findMutationMemoized(const Expr *Exp,
59 const Stmt *tryEachDeclRef(const Decl *Dec, MutationFinder Finder);
[all …]
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaExceptionSpec.cpp984 static CanThrowResult canSubStmtsThrow(Sema &Self, const Stmt *S) { in canSubStmtsThrow()
986 for (const Stmt *SubStmt : S->children()) { in canSubStmtsThrow()
1111 CanThrowResult Sema::canThrow(const Stmt *S) { in canThrow()
1406 case Stmt::OpenACCComputeConstructClass: in canThrow()
1407 case Stmt::OpenACCLoopConstructClass: in canThrow()
1408 case Stmt::AttributedStmtClass: in canThrow()
1409 case Stmt::BreakStmtClass: in canThrow()
1410 case Stmt::CapturedStmtClass: in canThrow()
1411 case Stmt::CaseStmtClass: in canThrow()
1412 case Stmt::CompoundStmtClass: in canThrow()
[all …]
H A DJumpDiagnostics.cpp72 llvm::DenseMap<Stmt*, unsigned> LabelAndGotoScopes;
73 SmallVector<Stmt*, 16> Jumps;
75 SmallVector<Stmt*, 4> IndirectJumps;
80 JumpScopeChecker(Stmt *Body, Sema &S);
86 void BuildScopeInformation(Stmt *S, unsigned &origParentScope);
92 void DiagnoseIndirectOrAsmJump(Stmt *IG, unsigned IGScope, LabelDecl *Target,
94 void CheckJump(Stmt *From, Stmt *To, SourceLocation DiagLoc,
106 JumpScopeChecker::JumpScopeChecker(Stmt *Body, Sema &s) in JumpScopeChecker()
304 void JumpScopeChecker::BuildScopeInformation(Stmt *S, in BuildScopeInformation()
317 case Stmt::AddrLabelExprClass: in BuildScopeInformation()
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DExprEngine.cpp141 const Stmt *S = getItem().getStmtOrNull(); in printJson()
1004 const Stmt *S, in shouldRemoveDeadBindings()
1030 const Stmt *ReferenceStmt, in removeDead()
1032 const Stmt *DiagnosticStmt, in removeDead()
1109 void ExprEngine::ProcessStmt(const Stmt *currStmt, ExplodedNode *Pred) { in ProcessStmt()
1139 void ExprEngine::ProcessLoopExit(const Stmt* S, ExplodedNode *Pred) { in ProcessLoopExit()
1415 const Stmt *Arg = DE->getArgument(); in ProcessDeleteDtor()
1712 void ExprEngine::Visit(const Stmt *S, ExplodedNode *Pred, in Visit()
1723 case Stmt::CXXDependentScopeMemberExprClass: in Visit()
1724 case Stmt::CXXTryStmtClass: in Visit()
[all …]
H A DBugReporter.cpp182 const Stmt *getParent(const Stmt *S) const { in getParent()
269 generateDiagForGotoOP(const PathDiagnosticConstruct &C, const Stmt *S,
277 generateDiagForBinaryOP(const PathDiagnosticConstruct &C, const Stmt *T,
306 const Stmt *CallSite = CExit.getCalleeContext()->getCallSite(); in getMessage()
548 const Stmt *Start = CF->getStartLocation().asStmt(); in removeEdgesToDefaultInitializers()
549 const Stmt *End = CF->getEndLocation().asStmt(); in removeEdgesToDefaultInitializers()
592 if (const Stmt *S = C.getCurrentNode()->getNextStmtForDiagnostics()) in ExecutionContinues()
629 static const Stmt *getEnclosingParent(const Stmt *S, const ParentMap &PM) { in getEnclosingParent()
633 const Stmt *Parent = PM.getParentIgnoreParens(S); in getEnclosingParent()
638 case Stmt::ForStmtClass: in getEnclosingParent()
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DIdenticalExprChecker.cpp28 static bool isIdenticalStmt(const ASTContext &Ctx, const Stmt *Stmt1,
29 const Stmt *Stmt2, bool IgnoreSideEffects = false);
107 const Stmt *Stmt1 = I->getThen(); in VisitIfStmt()
108 const Stmt *Stmt2 = I->getElse(); in VisitIfStmt()
137 const Stmt *Else = Stmt2; in VisitIfStmt()
306 static bool isIdenticalStmt(const ASTContext &Ctx, const Stmt *Stmt1, in isIdenticalStmt()
307 const Stmt *Stmt2, bool IgnoreSideEffects) { in isIdenticalStmt()
351 case Stmt::CallExprClass: in isIdenticalStmt()
352 case Stmt::ArraySubscriptExprClass: in isIdenticalStmt()
353 case Stmt::ArraySectionExprClass: in isIdenticalStmt()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/Basic/
H A DStmtNodes.td9 def Stmt : StmtNode<?, 1>;
10 def NullStmt : StmtNode<Stmt>;
11 def CompoundStmt : StmtNode<Stmt>;
12 def IfStmt : StmtNode<Stmt>;
13 def SwitchStmt : StmtNode<Stmt>;
14 def WhileStmt : StmtNode<Stmt>;
15 def DoStmt : StmtNode<Stmt>;
16 def ForStmt : StmtNode<Stmt>;
17 def GotoStmt : StmtNode<Stmt>;
18 def IndirectGotoStmt : StmtNode<Stmt>;
[all …]
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGStmt.cpp50 void CodeGenFunction::EmitStopPoint(const Stmt *S) { in EmitStopPoint()
60 void CodeGenFunction::EmitStmt(const Stmt *S, ArrayRef<const Attr *> Attrs) { in EmitStmt()
99 case Stmt::NoStmtClass: in EmitStmt()
100 case Stmt::CXXCatchStmtClass: in EmitStmt()
101 case Stmt::SEHExceptStmtClass: in EmitStmt()
102 case Stmt::SEHFinallyStmtClass: in EmitStmt()
103 case Stmt::MSDependentExistsStmtClass: in EmitStmt()
105 case Stmt::NullStmtClass: in EmitStmt()
106 case Stmt::CompoundStmtClass: in EmitStmt()
107 case Stmt::DeclStmtClass: in EmitStmt()
[all …]
H A DVarBypassDetector.cpp20 void VarBypassDetector::Init(const Stmt *Body) { in Init()
53 bool VarBypassDetector::BuildScopeInformation(const Stmt *S, in BuildScopeInformation()
66 case Stmt::IndirectGotoStmtClass: in BuildScopeInformation()
69 case Stmt::SwitchStmtClass: in BuildScopeInformation()
70 if (const Stmt *Init = cast<SwitchStmt>(S)->getInit()) { in BuildScopeInformation()
82 case Stmt::GotoStmtClass: in BuildScopeInformation()
86 case Stmt::DeclStmtClass: { in BuildScopeInformation()
94 case Stmt::CaseStmtClass: in BuildScopeInformation()
95 case Stmt::DefaultStmtClass: in BuildScopeInformation()
96 case Stmt::LabelStmtClass: in BuildScopeInformation()
[all …]
/freebsd/contrib/llvm-project/clang/lib/Analysis/
H A DReachableCode.cpp52 static bool isTrivialDoWhile(const CFGBlock *B, const Stmt *S) { in isTrivialDoWhile()
55 if (const Stmt *Term = B->getTerminatorStmt()) { in isTrivialDoWhile()
64 static bool isBuiltinUnreachable(const Stmt *S) { in isBuiltinUnreachable()
72 static bool isBuiltinAssumeFalse(const CFGBlock *B, const Stmt *S, in isBuiltinAssumeFalse()
87 static bool isDeadReturn(const CFGBlock *B, const Stmt *S) { in isDeadReturn()
150 static bool isExpandedFromConfigurationMacro(const Stmt *S, in isExpandedFromConfigurationMacro()
189 static bool isConfigurationValue(const Stmt *S, in isConfigurationValue()
215 case Stmt::CallExprClass: { in isConfigurationValue()
220 case Stmt::DeclRefExprClass: in isConfigurationValue()
222 case Stmt::ObjCBoolLiteralExprClass: in isConfigurationValue()
[all …]
H A DExprMutationAnalyzer.cpp105 AST_MATCHER_P(Stmt, canResolveToExpr, const Stmt *, Inner) { in AST_MATCHER_P() argument
129 const ast_matchers::internal::VariadicDynCastAllOfMatcher<Stmt, CXXTypeidExpr>
190 class F = const Stmt *(ExprMutationAnalyzer::Analyzer::*)(const T *)>
191 const Stmt *tryEachMatch(ArrayRef<ast_matchers::BoundNodes> Matches, in tryEachMatch()
195 if (const Stmt *S = (Analyzer->*Finder)(Nodes.getNodeAs<T>(ID))) in tryEachMatch()
203 const Stmt *ExprMutationAnalyzer::Analyzer::findMutation(const Expr *Exp) { in findMutation()
216 const Stmt *ExprMutationAnalyzer::Analyzer::findMutation(const Decl *Dec) { in findMutation()
220 const Stmt *
225 const Stmt *
231 const Stmt *ExprMutationAnalyzer::Analyzer::findMutationMemoized( in findMutationMemoized()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/Sema/
H A DSemaOpenMP.h203 void EndOpenMPDSABlock(Stmt *CurDirective);
209 void ActOnOpenMPLoopInitialization(SourceLocation ForLoc, Stmt *Init);
214 Stmt *AStmt, SourceLocation StartLoc,
384 StmtResult ActOnOpenMPCanonicalLoop(Stmt *AStmt);
389 StmtResult ActOnOpenMPLoopnest(Stmt *AStmt);
401 Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc,
406 Stmt *AStmt, SourceLocation StartLoc,
413 ActOnOpenMPSimdDirective(ArrayRef<OMPClause *> Clauses, Stmt *AStmt,
419 Stmt *AStmt, SourceLocation StartLoc,
424 Stmt *AStmt, SourceLocation StartLoc,
[all …]
/freebsd/contrib/llvm-project/clang/lib/Analysis/FlowSensitive/
H A DAdornedCFG.cpp28 static llvm::DenseMap<const Stmt *, const CFGBlock *>
30 llvm::DenseMap<const Stmt *, const CFGBlock *> StmtToBlock; in buildStmtToBasicBlockMap()
36 auto Stmt = Element.getAs<CFGStmt>(); in buildStmtToBasicBlockMap() local
37 if (!Stmt) in buildStmtToBasicBlockMap()
40 StmtToBlock[Stmt->getStmt()] = Block; in buildStmtToBasicBlockMap()
52 if (const Stmt *TerminatorCond = Block->getTerminatorCondition()) in buildStmtToBasicBlockMap()
69 if (const Stmt *TerminatorStmt = Block->getTerminatorStmt()) in buildStmtToBasicBlockMap()
100 const llvm::DenseMap<const Stmt *, const CFGBlock *> &StmtToBlock) { in buildContainsExprConsumedInDifferentBlock() argument
103 auto CheckChildExprs = [&Result, &StmtToBlock](const Stmt *S, in buildContainsExprConsumedInDifferentBlock()
105 for (const Stmt *Child : S->children()) { in buildContainsExprConsumedInDifferentBlock()
[all …]

12345678910>>...13