15 #ifndef LLVM_CLANG_NON_TRIVIAL_TYPE_VISITOR_H 16 #define LLVM_CLANG_NON_TRIVIAL_TYPE_VISITOR_H 25 std::forward<Ts>(Args)...);
28 template <
class... Ts>
33 return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
35 return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
37 return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
39 return asDerived().visitCXXDestructor(FT, std::forward<Ts>(Args)...);
41 return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
44 llvm_unreachable(
"unknown destruction kind");
47 Derived &
asDerived() {
return static_cast<Derived &
>(*this); }
50 template <
class Derived,
class RetTy =
void>
55 std::forward<Ts>(Args)...);
58 template <
class... Ts>
63 return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
65 return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
67 return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
69 return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
72 llvm_unreachable(
"unknown default-initialize kind");
75 Derived &
asDerived() {
return static_cast<Derived &
>(*this); }
78 template <
class Derived,
bool IsMove,
class RetTy =
void>
84 return asDerived().visitWithKind(PCK, FT, std::forward<Ts>(Args)...);
87 template <
class... Ts>
90 asDerived().preVisit(PCK, FT, std::forward<Ts>(Args)...);
94 return asDerived().visitARCStrong(FT, std::forward<Ts>(Args)...);
96 return asDerived().visitARCWeak(FT, std::forward<Ts>(Args)...);
98 return asDerived().visitStruct(FT, std::forward<Ts>(Args)...);
100 return asDerived().visitTrivial(FT, std::forward<Ts>(Args)...);
102 return asDerived().visitVolatileTrivial(FT, std::forward<Ts>(Args)...);
105 llvm_unreachable(
"unknown primitive copy kind");
108 Derived &
asDerived() {
return static_cast<Derived &
>(*this); }
A (possibly-)qualified type.
RetTy visit(QualType FT, Ts &&... Args)
PrimitiveDefaultInitializeKind isNonTrivialToPrimitiveDefaultInitialize() const
Functions to query basic properties of non-trivial C struct types.
C Language Family Type Representation.
The type is a struct containing a field whose type is not PCK_Trivial.
The type would be trivial except that it is volatile-qualified.
The type is an Objective-C retainable pointer type that is qualified with the ARC __strong qualifier...
The type is an Objective-C retainable pointer type that is qualified with the ARC __strong qualifier...
PrimitiveDefaultInitializeKind
The type does not fall into any of the following categories.
The type does not fall into any of the following categories.
RetTy visit(QualType FT, Ts &&... Args)
PrimitiveCopyKind isNonTrivialToPrimitiveDestructiveMove() const
Check if this is a non-trivial type that would cause a C struct transitively containing this type to ...
The type is an Objective-C retainable pointer type that is qualified with the ARC __weak qualifier...
The type is a struct containing a field whose type is neither PCK_Trivial nor PCK_VolatileTrivial.
DestructionKind isDestructedType() const
Returns a nonzero value if objects of this type require non-trivial work to clean up after...
PrimitiveCopyKind isNonTrivialToPrimitiveCopy() const
Check if this is a non-trivial type that would cause a C struct transitively containing this type to ...
The type is an Objective-C retainable pointer type that is qualified with the ARC __weak qualifier...
Dataflow Directional Tag Classes.
RetTy visitWithKind(QualType::PrimitiveCopyKind PCK, QualType FT, Ts &&... Args)
RetTy visitWithKind(QualType::DestructionKind DK, QualType FT, Ts &&... Args)
RetTy visit(QualType FT, Ts &&... Args)
RetTy visitWithKind(QualType::PrimitiveDefaultInitializeKind PDIK, QualType FT, Ts &&... Args)