Lines Matching defs:TypeLoc

1 //===--- TypeLoc.h - Type Source Info Wrapper -------------------*- C++ -*-===//
11 /// \brief Defines the clang::TypeLoc interface and its subclasses.
33 class Class##TypeLoc;
38 /// A client should use the TypeLoc subclasses through castAs()/getAs()
40 class TypeLoc {
48 /// \brief Convert to the specified TypeLoc type, asserting that this TypeLoc
56 TypeLoc& tl = t;
61 /// \brief Convert to the specified TypeLoc type, returning a null TypeLoc if
62 /// this TypeLoc is not of the desired type.
68 TypeLoc& tl = t;
84 TypeLoc() : Ty(nullptr), Data(nullptr) { }
85 TypeLoc(QualType ty, void *opaqueData)
87 TypeLoc(const Type *ty, void *opaqueData)
143 /// \brief Get the next TypeLoc pointed by this TypeLoc, e.g for "int*" the
144 /// TypeLoc is a PointerLoc and next TypeLoc is for "int".
145 TypeLoc getNextTypeLoc() const {
152 TypeLoc IgnoreParens() const;
164 /// TypeLoc of the same type.
165 void initializeFullCopy(TypeLoc Other) const {
172 /// TypeLoc of the same type. The given size must be the full data
174 void initializeFullCopy(TypeLoc Other, unsigned Size) const {
180 friend bool operator==(const TypeLoc &LHS, const TypeLoc &RHS) {
184 friend bool operator!=(const TypeLoc &LHS, const TypeLoc &RHS) {
189 static bool isKind(const TypeLoc&) {
193 static void initializeImpl(ASTContext &Context, TypeLoc TL,
195 static TypeLoc getNextTypeLocImpl(TypeLoc TL);
196 static TypeLoc IgnoreParensImpl(TypeLoc TL);
197 static SourceRange getLocalSourceRangeImpl(TypeLoc TL);
200 /// \brief Return the TypeLoc for a type source info.
201 inline TypeLoc TypeSourceInfo::getTypeLoc() const {
202 return TypeLoc(Ty, const_cast<void*>(static_cast<const void*>(this + 1)));
207 class UnqualTypeLoc : public TypeLoc {
210 UnqualTypeLoc(const Type *Ty, void *Data) : TypeLoc(Ty, Data) {}
221 friend class TypeLoc;
222 static bool isKind(const TypeLoc &TL) {
232 class QualifiedTypeLoc : public TypeLoc {
240 TypeLoc::getLocalAlignmentForType(QualType(getTypePtr(), 0));
252 TypeLoc getNextTypeLoc() const {
272 friend class TypeLoc;
273 static bool isKind(const TypeLoc &TL) {
278 inline UnqualTypeLoc TypeLoc::getUnqualifiedLoc() const {
284 /// A metaprogramming base class for TypeLoc classes which correspond
286 /// TypeLoc class to correspond to multiple Type classes.
319 friend class TypeLoc;
320 static bool isKind(const TypeLoc &TL) {
342 TypeLoc getNextTypeLoc() const {
383 TypeLoc getInnerTypeLoc() const {
384 return TypeLoc(asDerived()->getInnerType(), getNonLocalData());
409 return TypeLoc::getLocalAlignmentForType(T);
412 TypeLoc getNextTypeLoc(HasNoInnerType _) const {
413 return TypeLoc();
416 TypeLoc getNextTypeLoc(QualType T) const {
417 return TypeLoc(T, getNonLocalData());
426 friend class TypeLoc;
431 static bool isKind(const TypeLoc &TL) {
474 friend class TypeLoc;
475 static bool isKind(const TypeLoc &TL);
718 TypeLoc getModifiedLoc() const {
863 TypeLoc getBaseLoc() const {
965 TypeLoc getInnerLoc() const {
974 inline TypeLoc TypeLoc::IgnoreParens() const {
986 TypeLoc getOriginalLoc() const {
1033 TypeLoc getPointeeLoc() const {
1227 TypeLoc getReturnLoc() const {
1306 TypeLoc getElementLoc() const {
1416 // the TypeLoc, we're okay.
1677 TypeLoc getNamedTypeLoc() const {
1890 TypeLoc getPatternLoc() const {
1906 TypeLoc getValueLoc() const {