reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Derived Classes

tools/clang/include/clang/AST/Stmt.h
 1488 class CaseStmt final
 1644 class DefaultStmt : public SwitchCase {

Declarations

gen/tools/clang/include/clang/AST/StmtNodes.inc
  533 ABSTRACT_STMT(SWITCHCASE(SwitchCase, Stmt))
tools/clang/include/clang/Serialization/ASTReader.h
  112 class SwitchCase;
tools/clang/include/clang/Serialization/ASTWriter.h
   92 class SwitchCase;

References

include/llvm/ADT/DenseMapInfo.h
   39   static inline T* getEmptyKey() {
   41     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   45   static inline T* getTombstoneKey() {
   47     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   51   static unsigned getHashValue(const T *PtrVal) {
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
include/llvm/ADT/STLExtras.h
   75       typename std::add_pointer<typename std::add_const<T>::type>::type;
include/llvm/Support/Casting.h
   57   static inline bool doit(const From &Val) {
   58     return To::classof(&Val);
  104   static inline bool doit(const From *Val) {
  106     return isa_impl<To, From>::doit(*Val);
  106     return isa_impl<To, From>::doit(*Val);
  122     return isa_impl_wrap<To, SimpleFrom,
  132     return isa_impl_cl<To,FromTy>::doit(Val);
  142   return isa_impl_wrap<X, const Y,
  172   using ret_type = To *;       // Pointer arg case, return Ty*
  176   using ret_type = const To *; // Constant pointer arg case, return const Ty*
  198   using ret_type = typename cast_retty<To, SimpleFrom>::ret_type;
  204   using ret_type = typename cast_retty_impl<To,FromTy>::ret_type;
  210       To, From, typename simplify_type<From>::SimpleType>::ret_type;
  227   static typename cast_retty<To, FromTy>::ret_type doit(const FromTy &Val) {
  228     typename cast_retty<To, FromTy>::ret_type Res2
  256 inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  263 inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
  265   return cast_convert_val<X, Y*,
  265   return cast_convert_val<X, Y*,
  266                           typename simplify_type<Y*>::SimpleType>::doit(Val);
  305 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  309   return cast<X>(Val);
  337 LLVM_NODISCARD inline typename cast_retty<X, Y>::ret_type dyn_cast(Y &Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  342 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type dyn_cast(Y *Val) {
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  343   return isa<X>(Val) ? cast<X>(Val) : nullptr;
  366 LLVM_NODISCARD inline typename cast_retty<X, Y *>::ret_type
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
  368   return (Val && isa<X>(Val)) ? cast<X>(Val) : nullptr;
include/llvm/Support/PointerLikeTypeTraits.h
   56   static inline void *getAsVoidPointer(T *P) { return P; }
   57   static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
   59   enum { NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value };
   91   typedef PointerLikeTypeTraits<T *> NonConst;
   93   static inline const void *getAsVoidPointer(const T *P) {
   96   static inline const T *getFromVoidPointer(const void *P) {
tools/clang/include/clang/AST/ASTTypeTraits.h
   65     return ASTNodeKind(KindToKindId<T>::Id);
  234   static DynTypedNode create(const T &Node) {
  235     return BaseConverter<T>::create(Node);
  259   const T &getUnchecked() const {
  260     return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer);
  394     static const T *get(ASTNodeKind NodeKind, const char Storage[]) {
  399     static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) {
  401       return *cast<T>(static_cast<const BaseT *>(
  474     : public DynCastPtrConverter<T, Stmt> {};
tools/clang/include/clang/AST/Stmt.h
 1453   SwitchCase *NextSwitchCase = nullptr;
 1463   const SwitchCase *getNextSwitchCase() const { return NextSwitchCase; }
 1464   SwitchCase *getNextSwitchCase() { return NextSwitchCase; }
 1465   void setNextSwitchCase(SwitchCase *SC) { NextSwitchCase = SC; }
 1489     : public SwitchCase,
 1644 class DefaultStmt : public SwitchCase {
 2032   SwitchCase *FirstCase;
 2156   SwitchCase *getSwitchCaseList() { return FirstCase; }
 2157   const SwitchCase *getSwitchCaseList() const { return FirstCase; }
 2158   void setSwitchCaseList(SwitchCase *SC) { FirstCase = SC; }
 2168   void addSwitchCase(SwitchCase *SC) {
tools/clang/include/clang/ASTMatchers/ASTMatchers.h
 2011 extern const internal::VariadicDynCastAllOfMatcher<Stmt, SwitchCase> switchCase;
 6155   for (const SwitchCase *SC = Node.getSwitchCaseList(); SC;
tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h
  302   virtual bool matches(const T &Node,
  309     return matches(DynNode.getUnchecked<T>(), Finder, Builder);
  345   DynTypedMatcher(MatcherInterface<T> *Implementation)
  346       : SupportedKind(ast_type_traits::ASTNodeKind::getFromNodeKind<T>()),
  436     return canConvertTo(ast_type_traits::ASTNodeKind::getFromNodeKind<T>());
  445   template <typename T> Matcher<T> convertTo() const {
  447     return unconditionalConvertTo<T>();
  454   template <typename T> Matcher<T> unconditionalConvertTo() const;
  479 class WrapperMatcherInterface : public MatcherInterface<T> {
  499   explicit Matcher(MatcherInterface<T> *Implementation)
  507           typename std::enable_if<std::is_base_of<From, T>::value &&
  508                                !std::is_same<From, T>::value>::type * = nullptr)
  520             std::is_same<T, QualType>::value &&
  529     static_assert(std::is_base_of<To, T>::value, "Invalid dynCast call.");
  534   bool matches(const T &Node,
  581     return Other.dynCastTo(ast_type_traits::ASTNodeKind::getFromNodeKind<T>());
  994   bool matchesChildOf(const T &Node, const DynTypedMatcher &Matcher,
  997     static_assert(std::is_base_of<Decl, T>::value ||
  998                   std::is_base_of<Stmt, T>::value ||
  999                   std::is_base_of<NestedNameSpecifier, T>::value ||
 1000                   std::is_base_of<NestedNameSpecifierLoc, T>::value ||
 1001                   std::is_base_of<TypeLoc, T>::value ||
 1002                   std::is_base_of<QualType, T>::value,
 1146     template <typename To> operator Matcher<To>() const {
 1243   operator Matcher<T>() const {
 1245                ast_type_traits::ASTNodeKind::getFromNodeKind<T>())
 1246         .template unconditionalConvertTo<T>();
 1255 class BindableMatcher : public Matcher<T> {
 1257   explicit BindableMatcher(const Matcher<T> &M) : Matcher<T>(M) {}
 1258   explicit BindableMatcher(MatcherInterface<T> *Implementation)
 1265   Matcher<T> bind(StringRef ID) const {
 1304 class ForEachMatcher : public WrapperMatcherInterface<T> {
 1312   bool matches(const T& Node, ASTMatchFinder* Finder,
 1370 inline Matcher<T> DynTypedMatcher::unconditionalConvertTo() const {
 1376 BindableMatcher<T> makeAllOfComposite(
 1377     ArrayRef<const Matcher<T> *> InnerMatchers) {
 1388   using PI = llvm::pointee_iterator<const Matcher<T> *const *>;
 1395           ast_type_traits::ASTNodeKind::getFromNodeKind<T>(),
 1397           .template unconditionalConvertTo<T>());
 1408     ArrayRef<const Matcher<InnerT> *> InnerMatchers) {
 1557     : public VariadicFunction<BindableMatcher<SourceT>, Matcher<TargetT>,
 1558                               makeDynCastAllOfComposite<SourceT, TargetT>> {
tools/clang/include/clang/ASTMatchers/Dynamic/VariantValue.h
  199   ast_matchers::internal::Matcher<T> getTypedMatcher() const {
  202         ->template convertTo<T>();
  227       : MatcherOps(ast_type_traits::ASTNodeKind::getFromNodeKind<T>()) {}
  228   typedef ast_matchers::internal::Matcher<T> MatcherT;
  232     return DynTypedMatcher(Matcher.convertTo<T>());
tools/clang/include/clang/Serialization/ASTReader.h
  945   using SwitchCaseMapTy = llvm::DenseMap<unsigned, SwitchCase *>;
 2344   void RecordSwitchCaseID(SwitchCase *SC, unsigned ID);
 2347   SwitchCase *getSwitchCaseWithID(unsigned ID);
 2675   void recordSwitchCaseID(SwitchCase *SC, unsigned ID) {
 2680   SwitchCase *getSwitchCaseWithID(unsigned ID) {
tools/clang/include/clang/Serialization/ASTWriter.h
  429   llvm::DenseMap<SwitchCase *, unsigned> SwitchCaseIDs;
  669   unsigned RecordSwitchCaseID(SwitchCase *S);
  672   unsigned getSwitchCaseID(SwitchCase *S);
tools/clang/lib/ARCMigrate/TransProtectedScope.cpp
   41   SwitchCase *SC;
   50   CaseInfo(SwitchCase *S, SourceRange Range)
   63     SwitchCase *Curr = S->getSwitchCaseList();
   87   Stmt *getCaseParent(SwitchCase *S) {
   89     while (Parent && (isa<SwitchCase>(Parent) || isa<LabelStmt>(Parent)))
tools/clang/lib/AST/ASTImporter.cpp
  162     Expected<T *> import(T *From) {
  162     Expected<T *> import(T *From) {
  166       return cast_or_null<T>(*ToOrErr);
  170     Expected<T *> import(const T *From) {
  170     Expected<T *> import(const T *From) {
 5869   SwitchCase *LastChainedSwitchCase = nullptr;
 5870   for (SwitchCase *SC = S->getSwitchCaseList(); SC != nullptr;
 5872     Expected<SwitchCase *> ToSCOrErr = import(SC);
tools/clang/lib/AST/ExprConstant.cpp
 4364                                    const SwitchCase *SC = nullptr);
 4369                                        const SwitchCase *Case = nullptr) {
 4419   const SwitchCase *Found = nullptr;
 4420   for (const SwitchCase *SC = SS->getSwitchCaseList(); SC;
 4465                                    const Stmt *S, const SwitchCase *Case) {
 4848     return EvaluateStmt(Result, Info, cast<SwitchCase>(S)->getSubStmt(), Case);
tools/clang/lib/AST/Interp/ByteCodeStmtGen.h
   44   using CaseMap = llvm::DenseMap<const SwitchCase *, LabelTy>;
tools/clang/lib/AST/Stmt.cpp
  160     else if (const auto *SC = dyn_cast<SwitchCase>(S))
  160     else if (const auto *SC = dyn_cast<SwitchCase>(S))
tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
  706 const internal::VariadicDynCastAllOfMatcher<Stmt, SwitchCase> switchCase;
tools/clang/lib/ASTMatchers/Dynamic/Marshallers.h
   75     return Value.isMatcher() && Value.getMatcher().hasTypedMatcher<T>();
   78   static ast_matchers::internal::Matcher<T> get(const VariantValue &Value) {
   79     return Value.getMatcher().getTypedMatcher<T>();
   83     return ArgKind(ast_type_traits::ASTNodeKind::getFromNodeKind<T>());
  466       ast_matchers::internal::VariadicDynCastAllOfMatcher<BaseT, DerivedT> Func,
  469         DerivedKind(ast_type_traits::ASTNodeKind::getFromNodeKind<DerivedT>()) {
  778     ast_matchers::internal::VariadicDynCastAllOfMatcher<BaseT, DerivedT>
tools/clang/lib/Analysis/UninitializedValues.cpp
  678               if (!Label || !isa<SwitchCase>(Label))
tools/clang/lib/CodeGen/Address.h
  108 template <class U> inline U cast(CodeGen::Address addr) {
tools/clang/lib/CodeGen/CGStmt.cpp
 1378                                             const SwitchCase *Case,
 1387   if (const SwitchCase *SC = dyn_cast<SwitchCase>(S)) {
 1387   if (const SwitchCase *SC = dyn_cast<SwitchCase>(S)) {
 1536                                        const SwitchCase *&ResultCase) {
 1539   const SwitchCase *Case = S.getSwitchCaseList();
 1596     const SwitchCase *Case = nullptr;
 1651     for (const SwitchCase *Case = S.getSwitchCaseList();
tools/clang/lib/CodeGen/CodeGenFunction.cpp
 1264   if (isa<SwitchCase>(S) && !IgnoreCaseStmts)
tools/clang/lib/CodeGen/CodeGenPGO.cpp
  617   void VisitSwitchCase(const SwitchCase *S) {
tools/clang/lib/CodeGen/CoverageMappingGen.cpp
 1148   void VisitSwitchCase(const SwitchCase *S) {
tools/clang/lib/CodeGen/VarBypassDetector.cpp
  117       if (const SwitchCase *SC = dyn_cast<SwitchCase>(SubStmt))
  117       if (const SwitchCase *SC = dyn_cast<SwitchCase>(SubStmt))
  144       for (const SwitchCase *SC = SS->getSwitchCaseList(); SC;
tools/clang/lib/Sema/AnalysisBasedWarnings.cpp
 1066         if (L && isa<SwitchCase>(L) && ReachableBlocks.insert(B).second)
 1099         const SwitchCase *SW = dyn_cast_or_null<SwitchCase>(P->getLabel());
 1099         const SwitchCase *SW = dyn_cast_or_null<SwitchCase>(P->getLabel());
 1204       if (const SwitchCase *SW = dyn_cast_or_null<SwitchCase>(B.getLabel()))
 1204       if (const SwitchCase *SW = dyn_cast_or_null<SwitchCase>(B.getLabel()))
 1205         if (!isa<SwitchCase>(SW->getSubStmt()))
 1273     if (!Label || !isa<SwitchCase>(Label))
tools/clang/lib/Sema/JumpDiagnostics.cpp
  584       if (SwitchCase *SC = dyn_cast<SwitchCase>(SubStmt))
  584       if (SwitchCase *SC = dyn_cast<SwitchCase>(SubStmt))
  630     for (SwitchCase *SC = SS->getSwitchCaseList(); SC;
tools/clang/lib/Sema/SemaCodeComplete.cpp
 4989   for (SwitchCase *SC = Switch->getSwitchCaseList(); SC;
tools/clang/lib/Sema/SemaDeclAttr.cpp
 8147     return cast<SwitchCase>(Parent)->getSubStmt() == S;
tools/clang/lib/Sema/SemaStmt.cpp
  905   for (SwitchCase *SC = SS->getSwitchCaseList(); SC && !HasDependentValue;
tools/clang/lib/Sema/SemaStmtAttr.cpp
   30     if (isa<SwitchCase>(St)) {
tools/clang/lib/Serialization/ASTReader.cpp
 9724 void ASTReader::RecordSwitchCaseID(SwitchCase *SC, unsigned ID) {
 9731 SwitchCase *ASTReader::getSwitchCaseWithID(unsigned ID) {
tools/clang/lib/Serialization/ASTReaderStmt.cpp
  171 void ASTStmtReader::VisitSwitchCase(SwitchCase *S) {
  259   SwitchCase *PrevSC = nullptr;
  261     SwitchCase *SC = Record.getSwitchCaseWithID(Record.readInt());
tools/clang/lib/Serialization/ASTWriterStmt.cpp
   90 void ASTStmtWriter::VisitSwitchCase(SwitchCase *S) {
  178   for (SwitchCase *SC = S->getSwitchCaseList(); SC;
 2374 unsigned ASTWriter::RecordSwitchCaseID(SwitchCase *S) {
 2382 unsigned ASTWriter::getSwitchCaseID(SwitchCase *S) {
tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp
 3109       if (P && (isa<SwitchCase>(P) || isa<LabelStmt>(P)))
tools/clang/lib/Tooling/Refactoring/Extract/SourceExtraction.cpp
   45   if(const auto *Case = dyn_cast<SwitchCase>(S))
   45   if(const auto *Case = dyn_cast<SwitchCase>(S))
tools/clang/tools/extra/clang-tidy/bugprone/BranchCloneCheck.cpp
  178       if (isa<SwitchCase>(S))
tools/clang/tools/extra/clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
   55   const SwitchCase *CurrentCase = Switch->getSwitchCaseList();
tools/clang/tools/extra/clangd/refactor/tweaks/ExtractVariable.cpp
  345   if (llvm::isa<SwitchCase>(Outer))
usr/include/c++/7.4.0/type_traits
  215     : public __is_void_helper<typename remove_cv<_Tp>::type>::type
  326     : public __is_integral_helper<typename remove_cv<_Tp>::type>::type
  354     : public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type
  381     : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
  567     : public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type
  581     : public __or_<is_lvalue_reference<_Tp>,
  582                    is_rvalue_reference<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  602                           is_void<_Tp>>>::type
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  631     : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  798       typedef decltype(__test<_Tp>(0)) type;
  811                remove_all_extents<_Tp>::type>::type
  825     : public __is_destructible_safe<_Tp>::type
 1447     : public __and_<is_destructible<_Tp>, integral_constant<bool,
 1554     { typedef _Tp     type; };
 1558     { typedef _Tp     type; };
 1563     { typedef _Tp     type; };
 1574       remove_const<typename remove_volatile<_Tp>::type>::type     type;
 1580     { typedef _Tp const     type; };
 1629     { typedef _Tp   type; };
 1659     { typedef _Tp&&   type; };
 1955     { typedef _Tp     type; };
 1983     { typedef _Up     type; };
 1999     { typedef typename remove_reference<_Tp>::type*     type; };
 2003     : public __add_pointer_helper<_Tp>