Home
last modified time | relevance | path

Searched refs:SwitchStmt (Results 1 – 25 of 59) sorted by relevance

123

/llvm-project-15.0.7/clang-tools-extra/clang-tidy/hicpp/
H A DMultiwayPathsCoveredCheck.cpp51 static std::pair<std::size_t, bool> countCaseLabels(const SwitchStmt *Switch) { in countCaseLabels()
98 const auto *Switch = Result.Nodes.getNodeAs<SwitchStmt>("switch"); in check()
128 const SwitchStmt *Switch, std::size_t CaseCount) { in handleSwitchWithDefault()
139 const SwitchStmt *Switch, std::size_t CaseCount, in handleSwitchWithoutDefault()
H A DMultiwayPathsCoveredCheck.h34 void handleSwitchWithDefault(const SwitchStmt *Switch, std::size_t CaseCount);
36 const SwitchStmt *Switch, std::size_t CaseCount,
/llvm-project-15.0.7/clang/lib/CodeGen/
H A DVarBypassDetector.cpp70 if (const Stmt *Init = cast<SwitchStmt>(S)->getInit()) { in BuildScopeInformation()
75 if (const VarDecl *Var = cast<SwitchStmt>(S)->getConditionVariable()) { in BuildScopeInformation()
143 } else if (const SwitchStmt *SS = dyn_cast<SwitchStmt>(St)) { in Detect()
H A DCodeGenPGO.cpp98 SwitchStmt, enumerator
288 return PGOHash::SwitchStmt; in DEFINE_NESTABLE_TRAVERSAL()
619 void VisitSwitchStmt(const SwitchStmt *S) { in VisitSwitchStmt()
/llvm-project-15.0.7/clang-tools-extra/clangd/refactor/tweaks/
H A DPopulateSwitch.cpp74 const SwitchStmt *Switch = nullptr;
96 Switch = CA->ASTNode.get<SwitchStmt>(); in REGISTER_TWEAK()
99 Switch = Parent->ASTNode.get<SwitchStmt>(); in REGISTER_TWEAK()
/llvm-project-15.0.7/clang/lib/AST/
H A DStmt.cpp1050 SwitchStmt::SwitchStmt(const ASTContext &Ctx, Stmt *Init, VarDecl *Var, in SwitchStmt() function in SwitchStmt
1071 SwitchStmt::SwitchStmt(EmptyShell Empty, bool HasInit, bool HasVar) in SwitchStmt() function in SwitchStmt
1078 SwitchStmt *SwitchStmt::Create(const ASTContext &Ctx, Stmt *Init, VarDecl *Var, in Create()
1085 alignof(SwitchStmt)); in Create()
1086 return new (Mem) SwitchStmt(Ctx, Init, Var, Cond, LParenLoc, RParenLoc); in Create()
1089 SwitchStmt *SwitchStmt::CreateEmpty(const ASTContext &Ctx, bool HasInit, in CreateEmpty()
1093 alignof(SwitchStmt)); in CreateEmpty()
1094 return new (Mem) SwitchStmt(EmptyShell(), HasInit, HasVar); in CreateEmpty()
1097 VarDecl *SwitchStmt::getConditionVariable() { in getConditionVariable()
1104 void SwitchStmt::setConditionVariable(const ASTContext &Ctx, VarDecl *V) { in setConditionVariable()
H A DParentMap.cpp206 return DirectChild == cast<SwitchStmt>(P)->getCond(); in isConsumedExpr()
/llvm-project-15.0.7/clang/test/CodeGenCXX/
H A Dattr-likelihood-if-branch-weights.cpp128 void SwitchStmt() { in SwitchStmt() function
/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/Extract/
H A DSourceExtraction.cpp43 if(const auto *Switch = dyn_cast<SwitchStmt>(S)) in isSemicolonRequiredAfter()
/llvm-project-15.0.7/clang/lib/Sema/
H A DJumpDiagnostics.cpp349 if (Stmt *Init = cast<SwitchStmt>(S)->getInit()) { in BuildScopeInformation()
353 if (VarDecl *Var = cast<SwitchStmt>(S)->getConditionVariable()) { in BuildScopeInformation()
679 SwitchStmt *SS = cast<SwitchStmt>(Jump); in VerifyJumps()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/utils/
H A DExprSequence.cpp160 } else if (const auto *TheSwitchStmt = dyn_cast<SwitchStmt>(Parent)) { in getSequenceSuccessor()
/llvm-project-15.0.7/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
H A DCoreEngine.h567 const SwitchStmt *getSwitch() const { in getSwitch()
568 return cast<SwitchStmt>(Src->getTerminator()); in getSwitch()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DBranchCloneCheck.cpp172 if (const auto *SS = Result.Nodes.getNodeAs<SwitchStmt>("switch")) { in check()
/llvm-project-15.0.7/clang/lib/Analysis/
H A DProgramPoint.cpp151 if (isa<SwitchStmt>(T)) { in printJson()
H A DCFG.cpp608 CFGBlock *VisitSwitchStmt(SwitchStmt *S);
2335 return VisitSwitchStmt(cast<SwitchStmt>(S)); in Visit()
4262 CFGBlock *CFGBuilder::VisitSwitchStmt(SwitchStmt *Terminator) { in VisitSwitchStmt()
5318 if (const SwitchStmt *S = in FilterEdge()
5319 dyn_cast_or_null<SwitchStmt>(From->getTerminatorStmt())) { in FilterEdge()
5386 cast<SwitchStmt>(stmt)->getConditionVariable(); in StmtPrinterHelper()
5497 void VisitSwitchStmt(SwitchStmt *Terminator) { in VisitSwitchStmt()
6221 E = cast<SwitchStmt>(Terminator)->getCond(); in getTerminatorCondition()
/llvm-project-15.0.7/clang/lib/ARCMigrate/
H A DTransProtectedScope.cpp63 bool VisitSwitchStmt(SwitchStmt *S) { in VisitSwitchStmt()
/llvm-project-15.0.7/clang/lib/StaticAnalyzer/Checkers/
H A DErrnoChecker.cpp94 CondFound = (S == cast<SwitchStmt>(ParentS)->getCond()); in isInCondition()
/llvm-project-15.0.7/clang/include/clang/Sema/
H A DScopeInfo.h59 class SwitchStmt; variable
196 using SwitchInfo = llvm::PointerIntPair<SwitchStmt*, 1, bool>;
/llvm-project-15.0.7/clang/include/clang/AST/
H A DStmt.h183 friend class SwitchStmt; in alignas() local
2182 class SwitchStmt final : public Stmt,
2183 private llvm::TrailingObjects<SwitchStmt, Stmt *> {
2223 SwitchStmt(const ASTContext &Ctx, Stmt *Init, VarDecl *Var, Expr *Cond,
2227 explicit SwitchStmt(EmptyShell Empty, bool HasInit, bool HasVar);
2231 static SwitchStmt *Create(const ASTContext &Ctx, Stmt *Init, VarDecl *Var,
2237 static SwitchStmt *CreateEmpty(const ASTContext &Ctx, bool HasInit,
2294 return const_cast<SwitchStmt *>(this)->getConditionVariable(); in getConditionVariable()
H A DTextNodeDumper.h244 void VisitSwitchStmt(const SwitchStmt *Node);
H A DJSONNodeDumper.h315 void VisitSwitchStmt(const SwitchStmt *SS);
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cppcoreguidelines/
H A DPreferMemberInitializerCheck.cpp21 return isa<IfStmt, SwitchStmt, ForStmt, WhileStmt, DoStmt, ReturnStmt, in isControlStatement()
/llvm-project-15.0.7/clang-tools-extra/clangd/
H A DXRefs.cpp1025 else if (D.get<SwitchStmt>()) in filterAndTraverse()
1093 SourceRange findCaseBounds(const SwitchStmt &Switch, SourceLocation Loc, in findCaseBounds()
1183 if (const auto *SS = P->ASTNode.get<SwitchStmt>()) { in relatedControlFlow()
1879 QualType VisitSwitchStmt(const SwitchStmt *S) { in typeForNode()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DLoopConvertUtils.cpp812 isa<SwitchStmt>(CurrStmtParent)) in VisitDeclStmt()
/llvm-project-15.0.7/clang/include/clang/Basic/
H A DStmtNodes.td13 def SwitchStmt : StmtNode<Stmt>;

123