|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
Derived Classes
tools/clang/include/clang/AST/Expr.h 3346 class CStyleCastExpr final
tools/clang/include/clang/AST/ExprCXX.h 353 class CXXNamedCastExpr : public ExplicitCastExpr {
1688 class CXXFunctionalCastExpr final
4818 class BuiltinBitCastExpr final
tools/clang/include/clang/AST/ExprObjC.h 1638 class ObjCBridgedCastExpr final
Declarations
gen/tools/clang/include/clang/AST/StmtNodes.inc 825 ABSTRACT_STMT(EXPLICITCASTEXPR(ExplicitCastExpr, CastExpr))
References
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);
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) {
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;
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);
251 const T *get() const {
252 return BaseConverter<T>::get(NodeKind, Storage.buffer);
259 const T &getUnchecked() const {
260 return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer);
394 static const T *get(ASTNodeKind NodeKind, const char Storage[]) {
395 if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind))
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/Expr.h 3347 : public ExplicitCastExpr,
tools/clang/include/clang/AST/ExprCXX.h 353 class CXXNamedCastExpr : public ExplicitCastExpr {
1689 : public ExplicitCastExpr,
4819 : public ExplicitCastExpr,
tools/clang/include/clang/AST/ExprObjC.h 1639 : public ExplicitCastExpr,
tools/clang/include/clang/ASTMatchers/ASTMatchers.h 110 const T *getNodeAs(StringRef ID) const {
111 return MyBoundNodes.getNodeAs<T>(ID);
2337 extern const internal::VariadicDynCastAllOfMatcher<Stmt, ExplicitCastExpr>
4624 internal::GetSourceExpressionMatcher<NodeType>::get(Node);
tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h 160 const T *getNodeAs(StringRef ID) const {
165 return It->second.get<T>();
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>();
479 class WrapperMatcherInterface : public MatcherInterface<T> {
499 explicit Matcher(MatcherInterface<T> *Implementation)
506 Matcher(const Matcher<From> &Other,
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>());
596 inline Matcher<T> makeMatcher(MatcherInterface<T> *Implementation) {
596 inline Matcher<T> makeMatcher(MatcherInterface<T> *Implementation) {
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,
1009 bool matchesDescendantOf(const T &Node,
1013 static_assert(std::is_base_of<Decl, T>::value ||
1014 std::is_base_of<Stmt, T>::value ||
1015 std::is_base_of<NestedNameSpecifier, T>::value ||
1016 std::is_base_of<NestedNameSpecifierLoc, T>::value ||
1017 std::is_base_of<TypeLoc, T>::value ||
1018 std::is_base_of<QualType, T>::value,
1084 std::is_base_of<typename AnyTypeList::head, T>::value ||
1085 TypeListContainsSuperOf<typename AnyTypeList::tail, T>::value;
1146 template <typename To> operator Matcher<To>() const {
1202 operator Matcher<T>() const {
1203 static_assert(TypeListContainsSuperOf<ReturnTypes, T>::value,
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 {
1285 class HasMatcher : public WrapperMatcherInterface<T> {
1290 bool matches(const T &Node, ASTMatchFinder *Finder,
1335 template <typename T> operator Matcher<T>() const {
1337 Op, ast_type_traits::ASTNodeKind::getFromNodeKind<T>(),
1338 getMatchers<T>(std::index_sequence_for<Ps...>()))
1339 .template unconditionalConvertTo<T>();
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) {
1418 class HasDescendantMatcher : public WrapperMatcherInterface<T> {
1426 bool matches(const T &Node, ASTMatchFinder *Finder,
1557 : public VariadicFunction<BindableMatcher<SourceT>, Matcher<TargetT>,
1558 makeDynCastAllOfComposite<SourceT, TargetT>> {
1792 static const Expr *get(const Ty &Node) {
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/StaticAnalyzer/Core/Checker.h 104 ((const CHECKER *)checker)->checkPostStmt(cast<STMT>(S), C);
108 return isa<STMT>(S);
tools/clang/lib/AST/ASTImporter.cpp 576 ExpectedStmt VisitExplicitCastExpr(ExplicitCastExpr *E);
6742 ExpectedStmt ASTNodeImporter::VisitExplicitCastExpr(ExplicitCastExpr *E) {
tools/clang/lib/AST/Expr.cpp 3703 if (const ExplicitCastExpr *CE = dyn_cast<ExplicitCastExpr>(this)) {
3703 if (const ExplicitCastExpr *CE = dyn_cast<ExplicitCastExpr>(this)) {
tools/clang/lib/AST/ExprClassification.cpp 354 return ClassifyUnnamed(Ctx, cast<ExplicitCastExpr>(E)->getTypeAsWritten());
612 if (const auto *CE = dyn_cast<ExplicitCastExpr>(E->IgnoreParens())) {
612 if (const auto *CE = dyn_cast<ExplicitCastExpr>(E->IgnoreParens())) {
tools/clang/lib/AST/ExprConstant.cpp 5186 static bool HandleDynamicCast(EvalInfo &Info, const ExplicitCastExpr *E,
7365 return HandleDynamicCast(Info, cast<ExplicitCastExpr>(E), Result);
7995 return HandleDynamicCast(Info, cast<ExplicitCastExpr>(E), Result);
14129 if (isa<ExplicitCastExpr>(E)) {
tools/clang/lib/AST/ItaniumMangle.cpp 3539 const ExplicitCastExpr *ECE = cast<ExplicitCastExpr>(E);
3539 const ExplicitCastExpr *ECE = cast<ExplicitCastExpr>(E);
4133 auto *Sub = cast<ExplicitCastExpr>(E)->getSubExpr()->IgnoreImplicit();
tools/clang/lib/AST/StmtProfile.cpp 1172 void StmtProfiler::VisitExplicitCastExpr(const ExplicitCastExpr *S) {
tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp 755 const internal::VariadicDynCastAllOfMatcher<Stmt, ExplicitCastExpr>
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>());
361 RetTypes.push_back(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/CodeGen/Address.h 108 template <class U> inline U cast(CodeGen::Address addr) {
tools/clang/lib/CodeGen/CGExpr.cpp 1020 void CodeGenModule::EmitExplicitCastExprType(const ExplicitCastExpr *E,
1046 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(CE))
1046 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(CE))
1066 if (isa<ExplicitCastExpr>(CE)) {
4413 const auto *CE = cast<ExplicitCastExpr>(E);
4413 const auto *CE = cast<ExplicitCastExpr>(E);
tools/clang/lib/CodeGen/CGExprAgg.cpp 681 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E))
681 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E))
tools/clang/lib/CodeGen/CGExprComplex.cpp 178 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E))
178 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E))
tools/clang/lib/CodeGen/CGExprConstant.cpp 1029 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E))
1029 if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E))
tools/clang/lib/CodeGen/CGExprScalar.cpp 570 Value *VisitExplicitCastExpr(ExplicitCastExpr *E) {
2031 if (CI->getMetadata("heapallocsite") && isa<ExplicitCastExpr>(CE))
tools/clang/lib/CodeGen/CodeGenModule.h 1071 void EmitExplicitCastExprType(const ExplicitCastExpr *E,
tools/clang/lib/Sema/SemaChecking.cpp12086 if (auto *CE = dyn_cast<ExplicitCastExpr>(E)) {
12086 if (auto *CE = dyn_cast<ExplicitCastExpr>(E)) {
tools/clang/lib/Sema/SemaExpr.cpp17793 ExplicitCastExpr *castArg = dyn_cast<ExplicitCastExpr>(arg->IgnoreParens());
17793 ExplicitCastExpr *castArg = dyn_cast<ExplicitCastExpr>(arg->IgnoreParens());
tools/clang/lib/Sema/SemaExprObjC.cpp 4321 } else if (ExplicitCastExpr *cast = dyn_cast<ExplicitCastExpr>(realCast)) {
4321 } else if (ExplicitCastExpr *cast = dyn_cast<ExplicitCastExpr>(realCast)) {
tools/clang/lib/Serialization/ASTReaderStmt.cpp 907 void ASTStmtReader::VisitExplicitCastExpr(ExplicitCastExpr *E) {
tools/clang/lib/Serialization/ASTWriterStmt.cpp 822 void ASTStmtWriter::VisitExplicitCastExpr(ExplicitCastExpr *E) {
tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypeChecker.cpp 119 if (const auto *ExplicitCast = dyn_cast<ExplicitCastExpr>(S)) {
119 if (const auto *ExplicitCast = dyn_cast<ExplicitCastExpr>(S)) {
tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp 282 if (isa<ExplicitCastExpr>(CE))
558 if (isa<ExplicitCastExpr>(CE)) {
952 if (const auto *ExplicitCast = dyn_cast<ExplicitCastExpr>(S)) {
952 if (const auto *ExplicitCast = dyn_cast<ExplicitCastExpr>(S)) {
tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp 76 TypeCallPair VisitExplicitCastExpr(const ExplicitCastExpr *E) {
tools/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp 82 check::PostCall, check::PostStmt<ExplicitCastExpr>,
97 void checkPostStmt(const ExplicitCastExpr *CE, CheckerContext &C) const;
931 void NullabilityChecker::checkPostStmt(const ExplicitCastExpr *CE,
tools/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp 322 if (const ExplicitCastExpr *ExCast=dyn_cast_or_null<ExplicitCastExpr>(CastE))
322 if (const ExplicitCastExpr *ExCast=dyn_cast_or_null<ExplicitCastExpr>(CastE))
tools/clang/tools/extra/clang-tidy/abseil/DurationConversionCastCheck.cpp 37 const auto *MatchedCast =
38 Result.Nodes.getNodeAs<ExplicitCastExpr>("cast_expr");
tools/clang/tools/extra/clang-tidy/misc/RedundantExpressionCheck.cpp 120 return cast<ExplicitCastExpr>(Left)->getTypeAsWritten() ==
121 cast<ExplicitCastExpr>(Right)->getTypeAsWritten();
tools/clang/tools/extra/clang-tidy/modernize/RedundantVoidArgCheck.cpp 93 } else if (const auto *ExplicitCast =
94 Nodes.getNodeAs<ExplicitCastExpr>(ExplicitCastId)) {
231 const ExplicitCastExpr *ExplicitCast) {
tools/clang/tools/extra/clang-tidy/modernize/RedundantVoidArgCheck.h 60 const ExplicitCastExpr *ExplicitCast);
tools/clang/tools/extra/clang-tidy/modernize/UseAutoCheck.cpp 480 return cast<ExplicitCastExpr>(Expr)->getTypeAsWritten();
tools/clang/tools/libclang/CIndex.cpp 1992 void VisitExplicitCastExpr(const ExplicitCastExpr *E);
2606 void EnqueueVisitor::VisitExplicitCastExpr(const ExplicitCastExpr *E) {
tools/clang/unittests/Tooling/CastExprTest.cpp 16 std::function<void(ExplicitCastExpr *)> OnExplicitCast;
18 bool VisitExplicitCastExpr(ExplicitCastExpr *Expr) {
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>