clang  15.0.0git
TypeLoc.h
Go to the documentation of this file.
1 //===- TypeLoc.h - Type Source Info Wrapper ---------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// Defines the clang::TypeLoc interface and its subclasses.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_AST_TYPELOC_H
15 #define LLVM_CLANG_AST_TYPELOC_H
16 
19 #include "clang/AST/TemplateBase.h"
20 #include "clang/AST/Type.h"
21 #include "clang/Basic/LLVM.h"
23 #include "clang/Basic/Specifiers.h"
24 #include "llvm/ADT/ArrayRef.h"
25 #include "llvm/Support/Casting.h"
26 #include "llvm/Support/Compiler.h"
27 #include "llvm/Support/MathExtras.h"
28 #include <algorithm>
29 #include <cassert>
30 #include <cstdint>
31 #include <cstring>
32 
33 namespace clang {
34 
35 class Attr;
36 class ASTContext;
37 class CXXRecordDecl;
38 class ConceptDecl;
39 class Expr;
40 class ObjCInterfaceDecl;
41 class ObjCProtocolDecl;
42 class ObjCTypeParamDecl;
43 class ParmVarDecl;
44 class TemplateTypeParmDecl;
45 class UnqualTypeLoc;
46 class UnresolvedUsingTypenameDecl;
47 
48 // Predeclare all the type nodes.
49 #define ABSTRACT_TYPELOC(Class, Base)
50 #define TYPELOC(Class, Base) \
51  class Class##TypeLoc;
52 #include "clang/AST/TypeLocNodes.def"
53 
54 /// Base wrapper for a particular "section" of type source info.
55 ///
56 /// A client should use the TypeLoc subclasses through castAs()/getAs()
57 /// in order to get at the actual information.
58 class TypeLoc {
59 protected:
60  // The correctness of this relies on the property that, for Type *Ty,
61  // QualType(Ty, 0).getAsOpaquePtr() == (void*) Ty
62  const void *Ty = nullptr;
63  void *Data = nullptr;
64 
65 public:
66  TypeLoc() = default;
67  TypeLoc(QualType ty, void *opaqueData)
68  : Ty(ty.getAsOpaquePtr()), Data(opaqueData) {}
69  TypeLoc(const Type *ty, void *opaqueData)
70  : Ty(ty), Data(opaqueData) {}
71 
72  /// Convert to the specified TypeLoc type, asserting that this TypeLoc
73  /// is of the desired type.
74  ///
75  /// \pre T::isKind(*this)
76  template<typename T>
77  T castAs() const {
78  assert(T::isKind(*this));
79  T t;
80  TypeLoc& tl = t;
81  tl = *this;
82  return t;
83  }
84 
85  /// Convert to the specified TypeLoc type, returning a null TypeLoc if
86  /// this TypeLoc is not of the desired type.
87  template<typename T>
88  T getAs() const {
89  if (!T::isKind(*this))
90  return {};
91  T t;
92  TypeLoc& tl = t;
93  tl = *this;
94  return t;
95  }
96 
97  /// Convert to the specified TypeLoc type, returning a null TypeLoc if
98  /// this TypeLoc is not of the desired type. It will consider type
99  /// adjustments from a type that was written as a T to another type that is
100  /// still canonically a T (ignores parens, attributes, elaborated types, etc).
101  template <typename T>
102  T getAsAdjusted() const;
103 
104  /// The kinds of TypeLocs. Equivalent to the Type::TypeClass enum,
105  /// except it also defines a Qualified enum that corresponds to the
106  /// QualifiedLoc class.
108 #define ABSTRACT_TYPE(Class, Base)
109 #define TYPE(Class, Base) \
110  Class = Type::Class,
111 #include "clang/AST/TypeNodes.inc"
113  };
114 
116  if (getType().hasLocalQualifiers()) return Qualified;
117  return (TypeLocClass) getType()->getTypeClass();
118  }
119 
120  bool isNull() const { return !Ty; }
121  explicit operator bool() const { return Ty; }
122 
123  /// Returns the size of type source info data block for the given type.
124  static unsigned getFullDataSizeForType(QualType Ty);
125 
126  /// Returns the alignment of type source info data block for
127  /// the given type.
128  static unsigned getLocalAlignmentForType(QualType Ty);
129 
130  /// Get the type for which this source info wrapper provides
131  /// information.
132  QualType getType() const {
134  }
135 
136  const Type *getTypePtr() const {
138  }
139 
140  /// Get the pointer where source information is stored.
141  void *getOpaqueData() const {
142  return Data;
143  }
144 
145  /// Get the begin source location.
146  SourceLocation getBeginLoc() const;
147 
148  /// Get the end source location.
149  SourceLocation getEndLoc() const;
150 
151  /// Get the full source range.
152  SourceRange getSourceRange() const LLVM_READONLY {
153  return SourceRange(getBeginLoc(), getEndLoc());
154  }
155 
156 
157  /// Get the local source range.
159  return getLocalSourceRangeImpl(*this);
160  }
161 
162  /// Returns the size of the type source info data block.
163  unsigned getFullDataSize() const {
165  }
166 
167  /// Get the next TypeLoc pointed by this TypeLoc, e.g for "int*" the
168  /// TypeLoc is a PointerLoc and next TypeLoc is for "int".
170  return getNextTypeLocImpl(*this);
171  }
172 
173  /// Skips past any qualifiers, if this is qualified.
174  UnqualTypeLoc getUnqualifiedLoc() const; // implemented in this header
175 
176  TypeLoc IgnoreParens() const;
177 
178  /// Find a type with the location of an explicit type qualifier.
179  ///
180  /// The result, if non-null, will be one of:
181  /// QualifiedTypeLoc
182  /// AtomicTypeLoc
183  /// AttributedTypeLoc, for those type attributes that behave as qualifiers
185 
186  /// Get the typeloc of an AutoType whose type will be deduced for a variable
187  /// with an initializer of this type. This looks through declarators like
188  /// pointer types, but not through decltype or typedefs.
190 
191  /// Initializes this to state that every location in this
192  /// type is the given location.
193  ///
194  /// This method exists to provide a simple transition for code that
195  /// relies on location-less types.
196  void initialize(ASTContext &Context, SourceLocation Loc) const {
197  initializeImpl(Context, *this, Loc);
198  }
199 
200  /// Initializes this by copying its information from another
201  /// TypeLoc of the same type.
203  assert(getType() == Other.getType());
204  copy(Other);
205  }
206 
207  /// Initializes this by copying its information from another
208  /// TypeLoc of the same type. The given size must be the full data
209  /// size.
210  void initializeFullCopy(TypeLoc Other, unsigned Size) {
211  assert(getType() == Other.getType());
212  assert(getFullDataSize() == Size);
213  copy(Other);
214  }
215 
216  /// Copies the other type loc into this one.
217  void copy(TypeLoc other);
218 
219  friend bool operator==(const TypeLoc &LHS, const TypeLoc &RHS) {
220  return LHS.Ty == RHS.Ty && LHS.Data == RHS.Data;
221  }
222 
223  friend bool operator!=(const TypeLoc &LHS, const TypeLoc &RHS) {
224  return !(LHS == RHS);
225  }
226 
227  /// Find the location of the nullability specifier (__nonnull,
228  /// __nullable, or __null_unspecifier), if there is one.
230 
231 private:
232  static bool isKind(const TypeLoc&) {
233  return true;
234  }
235 
236  static void initializeImpl(ASTContext &Context, TypeLoc TL,
237  SourceLocation Loc);
238  static TypeLoc getNextTypeLocImpl(TypeLoc TL);
239  static TypeLoc IgnoreParensImpl(TypeLoc TL);
240  static SourceRange getLocalSourceRangeImpl(TypeLoc TL);
241 };
242 
243 /// Return the TypeLoc for a type source info.
245  // TODO: is this alignment already sufficient?
246  return TypeLoc(Ty, const_cast<void*>(static_cast<const void*>(this + 1)));
247 }
248 
249 /// Wrapper of type source information for a type with
250 /// no direct qualifiers.
251 class UnqualTypeLoc : public TypeLoc {
252 public:
253  UnqualTypeLoc() = default;
254  UnqualTypeLoc(const Type *Ty, void *Data) : TypeLoc(Ty, Data) {}
255 
256  const Type *getTypePtr() const {
257  return reinterpret_cast<const Type*>(Ty);
258  }
259 
261  return (TypeLocClass) getTypePtr()->getTypeClass();
262  }
263 
264 private:
265  friend class TypeLoc;
266 
267  static bool isKind(const TypeLoc &TL) {
268  return !TL.getType().hasLocalQualifiers();
269  }
270 };
271 
272 /// Wrapper of type source information for a type with
273 /// non-trivial direct qualifiers.
274 ///
275 /// Currently, we intentionally do not provide source location for
276 /// type qualifiers.
277 class QualifiedTypeLoc : public TypeLoc {
278 public:
279  SourceRange getLocalSourceRange() const { return {}; }
280 
282  unsigned align =
284  auto dataInt = reinterpret_cast<uintptr_t>(Data);
285  dataInt = llvm::alignTo(dataInt, align);
286  return UnqualTypeLoc(getTypePtr(), reinterpret_cast<void*>(dataInt));
287  }
288 
289  /// Initializes the local data of this type source info block to
290  /// provide no information.
292  // do nothing
293  }
294 
295  void copyLocal(TypeLoc other) {
296  // do nothing
297  }
298 
300  return getUnqualifiedLoc();
301  }
302 
303  /// Returns the size of the type source info data block that is
304  /// specific to this type.
305  unsigned getLocalDataSize() const {
306  // In fact, we don't currently preserve any location information
307  // for qualifiers.
308  return 0;
309  }
310 
311  /// Returns the alignment of the type source info data block that is
312  /// specific to this type.
313  unsigned getLocalDataAlignment() const {
314  // We don't preserve any location information.
315  return 1;
316  }
317 
318 private:
319  friend class TypeLoc;
320 
321  static bool isKind(const TypeLoc &TL) {
322  return TL.getType().hasLocalQualifiers();
323  }
324 };
325 
327  if (QualifiedTypeLoc Loc = getAs<QualifiedTypeLoc>())
328  return Loc.getUnqualifiedLoc();
329  return castAs<UnqualTypeLoc>();
330 }
331 
332 /// A metaprogramming base class for TypeLoc classes which correspond
333 /// to a particular Type subclass. It is accepted for a single
334 /// TypeLoc class to correspond to multiple Type classes.
335 ///
336 /// \tparam Base a class from which to derive
337 /// \tparam Derived the class deriving from this one
338 /// \tparam TypeClass the concrete Type subclass associated with this
339 /// location type
340 /// \tparam LocalData the structure type of local location data for
341 /// this type
342 ///
343 /// TypeLocs with non-constant amounts of local data should override
344 /// getExtraLocalDataSize(); getExtraLocalData() will then point to
345 /// this extra memory.
346 ///
347 /// TypeLocs with an inner type should define
348 /// QualType getInnerType() const
349 /// and getInnerTypeLoc() will then point to this inner type's
350 /// location data.
351 ///
352 /// A word about hierarchies: this template is not designed to be
353 /// derived from multiple times in a hierarchy. It is also not
354 /// designed to be used for classes where subtypes might provide
355 /// different amounts of source information. It should be subclassed
356 /// only at the deepest portion of the hierarchy where all children
357 /// have identical source information; if that's an abstract type,
358 /// then further descendents should inherit from
359 /// InheritingConcreteTypeLoc instead.
360 template <class Base, class Derived, class TypeClass, class LocalData>
361 class ConcreteTypeLoc : public Base {
362  friend class TypeLoc;
363 
364  const Derived *asDerived() const {
365  return static_cast<const Derived*>(this);
366  }
367 
368  static bool isKind(const TypeLoc &TL) {
369  return !TL.getType().hasLocalQualifiers() &&
370  Derived::classofType(TL.getTypePtr());
371  }
372 
373  static bool classofType(const Type *Ty) {
374  return TypeClass::classof(Ty);
375  }
376 
377 public:
378  unsigned getLocalDataAlignment() const {
379  return std::max(unsigned(alignof(LocalData)),
380  asDerived()->getExtraLocalDataAlignment());
381  }
382 
383  unsigned getLocalDataSize() const {
384  unsigned size = sizeof(LocalData);
385  unsigned extraAlign = asDerived()->getExtraLocalDataAlignment();
386  size = llvm::alignTo(size, extraAlign);
387  size += asDerived()->getExtraLocalDataSize();
388  return size;
389  }
390 
391  void copyLocal(Derived other) {
392  // Some subclasses have no data to copy.
393  if (asDerived()->getLocalDataSize() == 0) return;
394 
395  // Copy the fixed-sized local data.
396  memcpy(getLocalData(), other.getLocalData(), sizeof(LocalData));
397 
398  // Copy the variable-sized local data. We need to do this
399  // separately because the padding in the source and the padding in
400  // the destination might be different.
401  memcpy(getExtraLocalData(), other.getExtraLocalData(),
402  asDerived()->getExtraLocalDataSize());
403  }
404 
406  return getNextTypeLoc(asDerived()->getInnerType());
407  }
408 
409  const TypeClass *getTypePtr() const {
410  return cast<TypeClass>(Base::getTypePtr());
411  }
412 
413 protected:
414  unsigned getExtraLocalDataSize() const {
415  return 0;
416  }
417 
418  unsigned getExtraLocalDataAlignment() const {
419  return 1;
420  }
421 
422  LocalData *getLocalData() const {
423  return static_cast<LocalData*>(Base::Data);
424  }
425 
426  /// Gets a pointer past the Info structure; useful for classes with
427  /// local data that can't be captured in the Info (e.g. because it's
428  /// of variable size).
429  void *getExtraLocalData() const {
430  unsigned size = sizeof(LocalData);
431  unsigned extraAlign = asDerived()->getExtraLocalDataAlignment();
432  size = llvm::alignTo(size, extraAlign);
433  return reinterpret_cast<char*>(Base::Data) + size;
434  }
435 
436  void *getNonLocalData() const {
437  auto data = reinterpret_cast<uintptr_t>(Base::Data);
438  data += asDerived()->getLocalDataSize();
439  data = llvm::alignTo(data, getNextTypeAlign());
440  return reinterpret_cast<void*>(data);
441  }
442 
443  struct HasNoInnerType {};
444  HasNoInnerType getInnerType() const { return HasNoInnerType(); }
445 
447  return TypeLoc(asDerived()->getInnerType(), getNonLocalData());
448  }
449 
450 private:
451  unsigned getInnerTypeSize() const {
452  return getInnerTypeSize(asDerived()->getInnerType());
453  }
454 
455  unsigned getInnerTypeSize(HasNoInnerType _) const {
456  return 0;
457  }
458 
459  unsigned getInnerTypeSize(QualType _) const {
460  return getInnerTypeLoc().getFullDataSize();
461  }
462 
463  unsigned getNextTypeAlign() const {
464  return getNextTypeAlign(asDerived()->getInnerType());
465  }
466 
467  unsigned getNextTypeAlign(HasNoInnerType _) const {
468  return 1;
469  }
470 
471  unsigned getNextTypeAlign(QualType T) const {
473  }
474 
475  TypeLoc getNextTypeLoc(HasNoInnerType _) const { return {}; }
476 
477  TypeLoc getNextTypeLoc(QualType T) const {
478  return TypeLoc(T, getNonLocalData());
479  }
480 };
481 
482 /// A metaprogramming class designed for concrete subtypes of abstract
483 /// types where all subtypes share equivalently-structured source
484 /// information. See the note on ConcreteTypeLoc.
485 template <class Base, class Derived, class TypeClass>
487  friend class TypeLoc;
488 
489  static bool classofType(const Type *Ty) {
490  return TypeClass::classof(Ty);
491  }
492 
493  static bool isKind(const TypeLoc &TL) {
494  return !TL.getType().hasLocalQualifiers() &&
495  Derived::classofType(TL.getTypePtr());
496  }
497  static bool isKind(const UnqualTypeLoc &TL) {
498  return Derived::classofType(TL.getTypePtr());
499  }
500 
501 public:
502  const TypeClass *getTypePtr() const {
503  return cast<TypeClass>(Base::getTypePtr());
504  }
505 };
506 
509 };
510 
511 /// A reasonable base class for TypeLocs that correspond to
512 /// types that are written as a type-specifier.
513 class TypeSpecTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
514  TypeSpecTypeLoc,
515  Type,
516  TypeSpecLocInfo> {
517 public:
518  enum {
521  };
522 
524  return this->getLocalData()->NameLoc;
525  }
526 
528  this->getLocalData()->NameLoc = Loc;
529  }
530 
532  return SourceRange(getNameLoc(), getNameLoc());
533  }
534 
536  setNameLoc(Loc);
537  }
538 
539 private:
540  friend class TypeLoc;
541 
542  static bool isKind(const TypeLoc &TL);
543 };
544 
547 };
548 
549 /// Wrapper for source info for builtin types.
550 class BuiltinTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
551  BuiltinTypeLoc,
552  BuiltinType,
553  BuiltinLocInfo> {
554 public:
556  return getLocalData()->BuiltinRange.getBegin();
557  }
558 
560  getLocalData()->BuiltinRange = Loc;
561  }
562 
564  SourceRange &BuiltinRange = getLocalData()->BuiltinRange;
565  if (!BuiltinRange.getBegin().isValid()) {
566  BuiltinRange = Range;
567  } else {
568  BuiltinRange.setBegin(std::min(Range.getBegin(), BuiltinRange.getBegin()));
569  BuiltinRange.setEnd(std::max(Range.getEnd(), BuiltinRange.getEnd()));
570  }
571  }
572 
574 
576  return *(static_cast<WrittenBuiltinSpecs*>(getExtraLocalData()));
577  }
579  return *(static_cast<WrittenBuiltinSpecs*>(getExtraLocalData()));
580  }
581 
582  bool needsExtraLocalData() const {
584  return (bk >= BuiltinType::UShort && bk <= BuiltinType::UInt128) ||
585  (bk >= BuiltinType::Short && bk <= BuiltinType::Ibm128) ||
586  bk == BuiltinType::UChar || bk == BuiltinType::SChar;
587  }
588 
589  unsigned getExtraLocalDataSize() const {
590  return needsExtraLocalData() ? sizeof(WrittenBuiltinSpecs) : 0;
591  }
592 
593  unsigned getExtraLocalDataAlignment() const {
594  return needsExtraLocalData() ? alignof(WrittenBuiltinSpecs) : 1;
595  }
596 
598  return getLocalData()->BuiltinRange;
599  }
600 
602  if (needsExtraLocalData())
603  return static_cast<TypeSpecifierSign>(getWrittenBuiltinSpecs().Sign);
604  else
606  }
607 
608  bool hasWrittenSignSpec() const {
610  }
611 
613  if (needsExtraLocalData())
614  getWrittenBuiltinSpecs().Sign = static_cast<unsigned>(written);
615  }
616 
618  if (needsExtraLocalData())
619  return static_cast<TypeSpecifierWidth>(getWrittenBuiltinSpecs().Width);
620  else
622  }
623 
624  bool hasWrittenWidthSpec() const {
626  }
627 
629  if (needsExtraLocalData())
630  getWrittenBuiltinSpecs().Width = static_cast<unsigned>(written);
631  }
632 
634 
635  bool hasWrittenTypeSpec() const {
637  }
638 
640  if (needsExtraLocalData())
641  getWrittenBuiltinSpecs().Type = written;
642  }
643 
644  bool hasModeAttr() const {
645  if (needsExtraLocalData())
647  else
648  return false;
649  }
650 
651  void setModeAttr(bool written) {
652  if (needsExtraLocalData())
653  getWrittenBuiltinSpecs().ModeAttr = written;
654  }
655 
657  setBuiltinLoc(Loc);
658  if (needsExtraLocalData()) {
660  wbs.Sign = static_cast<unsigned>(TypeSpecifierSign::Unspecified);
661  wbs.Width = static_cast<unsigned>(TypeSpecifierWidth::Unspecified);
662  wbs.Type = TST_unspecified;
663  wbs.ModeAttr = false;
664  }
665  }
666 };
667 
668 /// Wrapper for source info for types used via transparent aliases.
669 class UsingTypeLoc : public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
670  UsingTypeLoc, UsingType> {
671 public:
673  return getTypePtr()->getUnderlyingType();
674  }
676 };
677 
678 /// Wrapper for source info for typedefs.
679 class TypedefTypeLoc : public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
680  TypedefTypeLoc,
681  TypedefType> {
682 public:
684  return getTypePtr()->getDecl();
685  }
686 };
687 
688 /// Wrapper for source info for injected class names of class
689 /// templates.
691  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
692  InjectedClassNameTypeLoc,
693  InjectedClassNameType> {
694 public:
696  return getTypePtr()->getDecl();
697  }
698 };
699 
700 /// Wrapper for source info for unresolved typename using decls.
702  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
703  UnresolvedUsingTypeLoc,
704  UnresolvedUsingType> {
705 public:
707  return getTypePtr()->getDecl();
708  }
709 };
710 
711 /// Wrapper for source info for tag types. Note that this only
712 /// records source info for the name itself; a type written 'struct foo'
713 /// should be represented as an ElaboratedTypeLoc. We currently
714 /// only do that when C++ is enabled because of the expense of
715 /// creating an ElaboratedType node for so many type references in C.
716 class TagTypeLoc : public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
717  TagTypeLoc,
718  TagType> {
719 public:
720  TagDecl *getDecl() const { return getTypePtr()->getDecl(); }
721 
722  /// True if the tag was defined in this type specifier.
723  bool isDefinition() const;
724 };
725 
726 /// Wrapper for source info for record types.
727 class RecordTypeLoc : public InheritingConcreteTypeLoc<TagTypeLoc,
728  RecordTypeLoc,
729  RecordType> {
730 public:
731  RecordDecl *getDecl() const { return getTypePtr()->getDecl(); }
732 };
733 
734 /// Wrapper for source info for enum types.
735 class EnumTypeLoc : public InheritingConcreteTypeLoc<TagTypeLoc,
736  EnumTypeLoc,
737  EnumType> {
738 public:
739  EnumDecl *getDecl() const { return getTypePtr()->getDecl(); }
740 };
741 
742 /// Wrapper for template type parameters.
744  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
745  TemplateTypeParmTypeLoc,
746  TemplateTypeParmType> {
747 public:
748  TemplateTypeParmDecl *getDecl() const { return getTypePtr()->getDecl(); }
749 };
750 
753 };
754 
755 /// ProtocolLAngleLoc, ProtocolRAngleLoc, and the source locations for
756 /// protocol qualifiers are stored after Info.
757 class ObjCTypeParamTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
758  ObjCTypeParamTypeLoc,
759  ObjCTypeParamType,
760  ObjCTypeParamTypeLocInfo> {
761  // SourceLocations are stored after Info, one for each protocol qualifier.
762  SourceLocation *getProtocolLocArray() const {
763  return (SourceLocation*)this->getExtraLocalData() + 2;
764  }
765 
766 public:
767  ObjCTypeParamDecl *getDecl() const { return getTypePtr()->getDecl(); }
768 
770  return this->getLocalData()->NameLoc;
771  }
772 
774  this->getLocalData()->NameLoc = Loc;
775  }
776 
778  return getNumProtocols() ?
779  *((SourceLocation*)this->getExtraLocalData()) :
780  SourceLocation();
781  }
782 
784  *((SourceLocation*)this->getExtraLocalData()) = Loc;
785  }
786 
788  return getNumProtocols() ?
789  *((SourceLocation*)this->getExtraLocalData() + 1) :
790  SourceLocation();
791  }
792 
794  *((SourceLocation*)this->getExtraLocalData() + 1) = Loc;
795  }
796 
797  unsigned getNumProtocols() const {
798  return this->getTypePtr()->getNumProtocols();
799  }
800 
801  SourceLocation getProtocolLoc(unsigned i) const {
802  assert(i < getNumProtocols() && "Index is out of bounds!");
803  return getProtocolLocArray()[i];
804  }
805 
806  void setProtocolLoc(unsigned i, SourceLocation Loc) {
807  assert(i < getNumProtocols() && "Index is out of bounds!");
808  getProtocolLocArray()[i] = Loc;
809  }
810 
811  ObjCProtocolDecl *getProtocol(unsigned i) const {
812  assert(i < getNumProtocols() && "Index is out of bounds!");
813  return *(this->getTypePtr()->qual_begin() + i);
814  }
815 
817  return llvm::makeArrayRef(getProtocolLocArray(), getNumProtocols());
818  }
819 
820  void initializeLocal(ASTContext &Context, SourceLocation Loc);
821 
822  unsigned getExtraLocalDataSize() const {
823  if (!this->getNumProtocols()) return 0;
824  // When there are protocol qualifers, we have LAngleLoc and RAngleLoc
825  // as well.
826  return (this->getNumProtocols() + 2) * sizeof(SourceLocation) ;
827  }
828 
829  unsigned getExtraLocalDataAlignment() const {
830  return alignof(SourceLocation);
831  }
832 
834  SourceLocation start = getNameLoc();
836  if (end.isInvalid()) return SourceRange(start, start);
837  return SourceRange(start, end);
838  }
839 };
840 
841 /// Wrapper for substituted template type parameters.
843  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
844  SubstTemplateTypeParmTypeLoc,
845  SubstTemplateTypeParmType> {
846 };
847 
848  /// Wrapper for substituted template type parameters.
850  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
851  SubstTemplateTypeParmPackTypeLoc,
852  SubstTemplateTypeParmPackType> {
853 };
854 
856  const Attr *TypeAttr;
857 };
858 
859 /// Type source information for an attributed type.
860 class AttributedTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
861  AttributedTypeLoc,
862  AttributedType,
863  AttributedLocInfo> {
864 public:
866  return getTypePtr()->getAttrKind();
867  }
868 
869  bool isQualifier() const {
870  return getTypePtr()->isQualifier();
871  }
872 
873  /// The modified type, which is generally canonically different from
874  /// the attribute type.
875  /// int main(int, char**) __attribute__((noreturn))
876  /// ~~~ ~~~~~~~~~~~~~
878  return getInnerTypeLoc();
879  }
880 
881  /// The type attribute.
882  const Attr *getAttr() const {
883  return getLocalData()->TypeAttr;
884  }
885  void setAttr(const Attr *A) {
886  getLocalData()->TypeAttr = A;
887  }
888 
889  template<typename T> const T *getAttrAs() {
890  return dyn_cast_or_null<T>(getAttr());
891  }
892 
894 
896  setAttr(nullptr);
897  }
898 
900  return getTypePtr()->getModifiedType();
901  }
902 };
903 
904 struct BTFTagAttributedLocInfo {}; // Nothing.
905 
906 /// Type source information for an btf_tag attributed type.
908  : public ConcreteTypeLoc<UnqualTypeLoc, BTFTagAttributedTypeLoc,
909  BTFTagAttributedType, BTFTagAttributedLocInfo> {
910 public:
911  TypeLoc getWrappedLoc() const { return getInnerTypeLoc(); }
912 
913  /// The btf_type_tag attribute.
914  const BTFTypeTagAttr *getAttr() const { return getTypePtr()->getAttr(); }
915 
916  template <typename T> T *getAttrAs() {
917  return dyn_cast_or_null<T>(getAttr());
918  }
919 
921 
923 
925 };
926 
933 };
934 
935 // A helper class for defining ObjC TypeLocs that can qualified with
936 // protocols.
937 //
938 // TypeClass basically has to be either ObjCInterfaceType or
939 // ObjCObjectPointerType.
940 class ObjCObjectTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
941  ObjCObjectTypeLoc,
942  ObjCObjectType,
943  ObjCObjectTypeLocInfo> {
944  // TypeSourceInfo*'s are stored after Info, one for each type argument.
945  TypeSourceInfo **getTypeArgLocArray() const {
946  return (TypeSourceInfo**)this->getExtraLocalData();
947  }
948 
949  // SourceLocations are stored after the type argument information, one for
950  // each Protocol.
951  SourceLocation *getProtocolLocArray() const {
952  return (SourceLocation*)(getTypeArgLocArray() + getNumTypeArgs());
953  }
954 
955 public:
957  return this->getLocalData()->TypeArgsLAngleLoc;
958  }
959 
961  this->getLocalData()->TypeArgsLAngleLoc = Loc;
962  }
963 
965  return this->getLocalData()->TypeArgsRAngleLoc;
966  }
967 
969  this->getLocalData()->TypeArgsRAngleLoc = Loc;
970  }
971 
972  unsigned getNumTypeArgs() const {
973  return this->getTypePtr()->getTypeArgsAsWritten().size();
974  }
975 
976  TypeSourceInfo *getTypeArgTInfo(unsigned i) const {
977  assert(i < getNumTypeArgs() && "Index is out of bounds!");
978  return getTypeArgLocArray()[i];
979  }
980 
981  void setTypeArgTInfo(unsigned i, TypeSourceInfo *TInfo) {
982  assert(i < getNumTypeArgs() && "Index is out of bounds!");
983  getTypeArgLocArray()[i] = TInfo;
984  }
985 
987  return this->getLocalData()->ProtocolLAngleLoc;
988  }
989 
991  this->getLocalData()->ProtocolLAngleLoc = Loc;
992  }
993 
995  return this->getLocalData()->ProtocolRAngleLoc;
996  }
997 
999  this->getLocalData()->ProtocolRAngleLoc = Loc;
1000  }
1001 
1002  unsigned getNumProtocols() const {
1003  return this->getTypePtr()->getNumProtocols();
1004  }
1005 
1006  SourceLocation getProtocolLoc(unsigned i) const {
1007  assert(i < getNumProtocols() && "Index is out of bounds!");
1008  return getProtocolLocArray()[i];
1009  }
1010 
1011  void setProtocolLoc(unsigned i, SourceLocation Loc) {
1012  assert(i < getNumProtocols() && "Index is out of bounds!");
1013  getProtocolLocArray()[i] = Loc;
1014  }
1015 
1016  ObjCProtocolDecl *getProtocol(unsigned i) const {
1017  assert(i < getNumProtocols() && "Index is out of bounds!");
1018  return *(this->getTypePtr()->qual_begin() + i);
1019  }
1020 
1021 
1023  return llvm::makeArrayRef(getProtocolLocArray(), getNumProtocols());
1024  }
1025 
1026  bool hasBaseTypeAsWritten() const {
1028  }
1029 
1030  void setHasBaseTypeAsWritten(bool HasBaseType) {
1031  getLocalData()->HasBaseTypeAsWritten = HasBaseType;
1032  }
1033 
1035  return getInnerTypeLoc();
1036  }
1037 
1040  if (start.isInvalid())
1041  start = getProtocolLAngleLoc();
1043  if (end.isInvalid())
1044  end = getTypeArgsRAngleLoc();
1045  return SourceRange(start, end);
1046  }
1047 
1048  void initializeLocal(ASTContext &Context, SourceLocation Loc);
1049 
1050  unsigned getExtraLocalDataSize() const {
1051  return this->getNumTypeArgs() * sizeof(TypeSourceInfo *)
1052  + this->getNumProtocols() * sizeof(SourceLocation);
1053  }
1054 
1055  unsigned getExtraLocalDataAlignment() const {
1056  static_assert(alignof(ObjCObjectTypeLoc) >= alignof(TypeSourceInfo *),
1057  "not enough alignment for tail-allocated data");
1058  return alignof(TypeSourceInfo *);
1059  }
1060 
1062  return getTypePtr()->getBaseType();
1063  }
1064 };
1065 
1069 };
1070 
1071 /// Wrapper for source info for ObjC interfaces.
1072 class ObjCInterfaceTypeLoc : public ConcreteTypeLoc<ObjCObjectTypeLoc,
1073  ObjCInterfaceTypeLoc,
1074  ObjCInterfaceType,
1075  ObjCInterfaceLocInfo> {
1076 public:
1078  return getTypePtr()->getDecl();
1079  }
1080 
1082  return getLocalData()->NameLoc;
1083  }
1084 
1086  getLocalData()->NameLoc = Loc;
1087  }
1088 
1090  return SourceRange(getNameLoc(), getNameEndLoc());
1091  }
1092 
1094  return getLocalData()->NameEndLoc;
1095  }
1096 
1098  getLocalData()->NameEndLoc = Loc;
1099  }
1100 
1102  setNameLoc(Loc);
1103  setNameEndLoc(Loc);
1104  }
1105 };
1106 
1109 };
1110 
1112  : public ConcreteTypeLoc<UnqualTypeLoc, MacroQualifiedTypeLoc,
1113  MacroQualifiedType, MacroQualifiedLocInfo> {
1114 public:
1116  setExpansionLoc(Loc);
1117  }
1118 
1119  TypeLoc getInnerLoc() const { return getInnerTypeLoc(); }
1120 
1122  return getTypePtr()->getMacroIdentifier();
1123  }
1124 
1126  return this->getLocalData()->ExpansionLoc;
1127  }
1128 
1130  this->getLocalData()->ExpansionLoc = Loc;
1131  }
1132 
1134 
1136  return getInnerLoc().getLocalSourceRange();
1137  }
1138 };
1139 
1143 };
1144 
1146  : public ConcreteTypeLoc<UnqualTypeLoc, ParenTypeLoc, ParenType,
1147  ParenLocInfo> {
1148 public:
1150  return this->getLocalData()->LParenLoc;
1151  }
1152 
1154  return this->getLocalData()->RParenLoc;
1155  }
1156 
1158  this->getLocalData()->LParenLoc = Loc;
1159  }
1160 
1162  this->getLocalData()->RParenLoc = Loc;
1163  }
1164 
1166  return SourceRange(getLParenLoc(), getRParenLoc());
1167  }
1168 
1170  setLParenLoc(Loc);
1171  setRParenLoc(Loc);
1172  }
1173 
1175  return getInnerTypeLoc();
1176  }
1177 
1179  return this->getTypePtr()->getInnerType();
1180  }
1181 };
1182 
1184  if (ParenTypeLoc::isKind(*this))
1185  return IgnoreParensImpl(*this);
1186  return *this;
1187 }
1188 
1189 struct AdjustedLocInfo {}; // Nothing.
1190 
1191 class AdjustedTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, AdjustedTypeLoc,
1192  AdjustedType, AdjustedLocInfo> {
1193 public:
1195  return getInnerTypeLoc();
1196  }
1197 
1199  // do nothing
1200  }
1201 
1203  // The inner type is the undecayed type, since that's what we have source
1204  // location information for.
1205  return getTypePtr()->getOriginalType();
1206  }
1207 
1208  SourceRange getLocalSourceRange() const { return {}; }
1209 
1210  unsigned getLocalDataSize() const {
1211  // sizeof(AdjustedLocInfo) is 1, but we don't need its address to be unique
1212  // anyway. TypeLocBuilder can't handle data sizes of 1.
1213  return 0; // No data.
1214  }
1215 };
1216 
1217 /// Wrapper for source info for pointers decayed from arrays and
1218 /// functions.
1220  AdjustedTypeLoc, DecayedTypeLoc, DecayedType> {
1221 };
1222 
1225 };
1226 
1227 /// A base class for
1228 template <class Derived, class TypeClass, class LocalData = PointerLikeLocInfo>
1229 class PointerLikeTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, Derived,
1230  TypeClass, LocalData> {
1231 public:
1233  return this->getLocalData()->StarLoc;
1234  }
1235 
1237  this->getLocalData()->StarLoc = Loc;
1238  }
1239 
1241  return this->getInnerTypeLoc();
1242  }
1243 
1245  return SourceRange(getSigilLoc(), getSigilLoc());
1246  }
1247 
1249  setSigilLoc(Loc);
1250  }
1251 
1253  return this->getTypePtr()->getPointeeType();
1254  }
1255 };
1256 
1257 /// Wrapper for source info for pointers.
1258 class PointerTypeLoc : public PointerLikeTypeLoc<PointerTypeLoc,
1259  PointerType> {
1260 public:
1262  return getSigilLoc();
1263  }
1264 
1266  setSigilLoc(Loc);
1267  }
1268 };
1269 
1270 /// Wrapper for source info for block pointers.
1271 class BlockPointerTypeLoc : public PointerLikeTypeLoc<BlockPointerTypeLoc,
1272  BlockPointerType> {
1273 public:
1275  return getSigilLoc();
1276  }
1277 
1279  setSigilLoc(Loc);
1280  }
1281 };
1282 
1285 };
1286 
1287 /// Wrapper for source info for member pointers.
1288 class MemberPointerTypeLoc : public PointerLikeTypeLoc<MemberPointerTypeLoc,
1289  MemberPointerType,
1290  MemberPointerLocInfo> {
1291 public:
1293  return getSigilLoc();
1294  }
1295 
1297  setSigilLoc(Loc);
1298  }
1299 
1300  const Type *getClass() const {
1301  return getTypePtr()->getClass();
1302  }
1303 
1305  return getLocalData()->ClassTInfo;
1306  }
1307 
1309  getLocalData()->ClassTInfo = TI;
1310  }
1311 
1313  setSigilLoc(Loc);
1314  setClassTInfo(nullptr);
1315  }
1316 
1318  if (TypeSourceInfo *TI = getClassTInfo())
1319  return SourceRange(TI->getTypeLoc().getBeginLoc(), getStarLoc());
1320  else
1321  return SourceRange(getStarLoc());
1322  }
1323 };
1324 
1325 /// Wraps an ObjCPointerType with source location information.
1327  public PointerLikeTypeLoc<ObjCObjectPointerTypeLoc,
1328  ObjCObjectPointerType> {
1329 public:
1331  return getSigilLoc();
1332  }
1333 
1335  setSigilLoc(Loc);
1336  }
1337 };
1338 
1339 class ReferenceTypeLoc : public PointerLikeTypeLoc<ReferenceTypeLoc,
1340  ReferenceType> {
1341 public:
1343  return getTypePtr()->getPointeeTypeAsWritten();
1344  }
1345 };
1346 
1348  public InheritingConcreteTypeLoc<ReferenceTypeLoc,
1349  LValueReferenceTypeLoc,
1350  LValueReferenceType> {
1351 public:
1353  return getSigilLoc();
1354  }
1355 
1357  setSigilLoc(Loc);
1358  }
1359 };
1360 
1362  public InheritingConcreteTypeLoc<ReferenceTypeLoc,
1363  RValueReferenceTypeLoc,
1364  RValueReferenceType> {
1365 public:
1367  return getSigilLoc();
1368  }
1369 
1371  setSigilLoc(Loc);
1372  }
1373 };
1374 
1380 };
1381 
1382 /// Wrapper for source info for functions.
1383 class FunctionTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
1384  FunctionTypeLoc,
1385  FunctionType,
1386  FunctionLocInfo> {
1387  bool hasExceptionSpec() const {
1388  if (auto *FPT = dyn_cast<FunctionProtoType>(getTypePtr())) {
1389  return FPT->hasExceptionSpec();
1390  }
1391  return false;
1392  }
1393 
1394  SourceRange *getExceptionSpecRangePtr() const {
1395  assert(hasExceptionSpec() && "No exception spec range");
1396  // After the Info comes the ParmVarDecl array, and after that comes the
1397  // exception specification information.
1398  return (SourceRange *)(getParmArray() + getNumParams());
1399  }
1400 
1401 public:
1403  return getLocalData()->LocalRangeBegin;
1404  }
1405 
1408  }
1409 
1411  return getLocalData()->LocalRangeEnd;
1412  }
1413 
1415  getLocalData()->LocalRangeEnd = L;
1416  }
1417 
1419  return this->getLocalData()->LParenLoc;
1420  }
1421 
1423  this->getLocalData()->LParenLoc = Loc;
1424  }
1425 
1427  return this->getLocalData()->RParenLoc;
1428  }
1429 
1431  this->getLocalData()->RParenLoc = Loc;
1432  }
1433 
1435  return SourceRange(getLParenLoc(), getRParenLoc());
1436  }
1437 
1439  if (hasExceptionSpec())
1440  return *getExceptionSpecRangePtr();
1441  return {};
1442  }
1443 
1445  if (hasExceptionSpec())
1446  *getExceptionSpecRangePtr() = R;
1447  }
1448 
1450  return llvm::makeArrayRef(getParmArray(), getNumParams());
1451  }
1452 
1453  // ParmVarDecls* are stored after Info, one for each parameter.
1455  return (ParmVarDecl**) getExtraLocalData();
1456  }
1457 
1458  unsigned getNumParams() const {
1459  if (isa<FunctionNoProtoType>(getTypePtr()))
1460  return 0;
1461  return cast<FunctionProtoType>(getTypePtr())->getNumParams();
1462  }
1463 
1464  ParmVarDecl *getParam(unsigned i) const { return getParmArray()[i]; }
1465  void setParam(unsigned i, ParmVarDecl *VD) { getParmArray()[i] = VD; }
1466 
1468  return getInnerTypeLoc();
1469  }
1470 
1473  }
1474 
1476  setLocalRangeBegin(Loc);
1477  setLParenLoc(Loc);
1478  setRParenLoc(Loc);
1479  setLocalRangeEnd(Loc);
1480  for (unsigned i = 0, e = getNumParams(); i != e; ++i)
1481  setParam(i, nullptr);
1482  if (hasExceptionSpec())
1483  setExceptionSpecRange(Loc);
1484  }
1485 
1486  /// Returns the size of the type source info data block that is
1487  /// specific to this type.
1488  unsigned getExtraLocalDataSize() const {
1489  unsigned ExceptSpecSize = hasExceptionSpec() ? sizeof(SourceRange) : 0;
1490  return (getNumParams() * sizeof(ParmVarDecl *)) + ExceptSpecSize;
1491  }
1492 
1493  unsigned getExtraLocalDataAlignment() const { return alignof(ParmVarDecl *); }
1494 
1496 };
1497 
1499  public InheritingConcreteTypeLoc<FunctionTypeLoc,
1500  FunctionProtoTypeLoc,
1501  FunctionProtoType> {
1502 };
1503 
1505  public InheritingConcreteTypeLoc<FunctionTypeLoc,
1506  FunctionNoProtoTypeLoc,
1507  FunctionNoProtoType> {
1508 };
1509 
1513 };
1514 
1515 /// Wrapper for source info for arrays.
1516 class ArrayTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
1517  ArrayTypeLoc,
1518  ArrayType,
1519  ArrayLocInfo> {
1520 public:
1522  return getLocalData()->LBracketLoc;
1523  }
1524 
1526  getLocalData()->LBracketLoc = Loc;
1527  }
1528 
1530  return getLocalData()->RBracketLoc;
1531  }
1532 
1534  getLocalData()->RBracketLoc = Loc;
1535  }
1536 
1539  }
1540 
1541  Expr *getSizeExpr() const {
1542  return getLocalData()->Size;
1543  }
1544 
1545  void setSizeExpr(Expr *Size) {
1546  getLocalData()->Size = Size;
1547  }
1548 
1550  return getInnerTypeLoc();
1551  }
1552 
1555  }
1556 
1558  setLBracketLoc(Loc);
1559  setRBracketLoc(Loc);
1560  setSizeExpr(nullptr);
1561  }
1562 
1564 };
1565 
1567  public InheritingConcreteTypeLoc<ArrayTypeLoc,
1568  ConstantArrayTypeLoc,
1569  ConstantArrayType> {
1570 };
1571 
1573  public InheritingConcreteTypeLoc<ArrayTypeLoc,
1574  IncompleteArrayTypeLoc,
1575  IncompleteArrayType> {
1576 };
1577 
1579  public InheritingConcreteTypeLoc<ArrayTypeLoc,
1580  DependentSizedArrayTypeLoc,
1581  DependentSizedArrayType> {
1582 public:
1584  ArrayTypeLoc::initializeLocal(Context, Loc);
1586  }
1587 };
1588 
1590  public InheritingConcreteTypeLoc<ArrayTypeLoc,
1591  VariableArrayTypeLoc,
1592  VariableArrayType> {
1593 };
1594 
1595 // Location information for a TemplateName. Rudimentary for now.
1598 };
1599 
1604 };
1605 
1607  public ConcreteTypeLoc<UnqualTypeLoc,
1608  TemplateSpecializationTypeLoc,
1609  TemplateSpecializationType,
1610  TemplateSpecializationLocInfo> {
1611 public:
1613  return getLocalData()->TemplateKWLoc;
1614  }
1615 
1617  getLocalData()->TemplateKWLoc = Loc;
1618  }
1619 
1621  return getLocalData()->LAngleLoc;
1622  }
1623 
1625  getLocalData()->LAngleLoc = Loc;
1626  }
1627 
1629  return getLocalData()->RAngleLoc;
1630  }
1631 
1633  getLocalData()->RAngleLoc = Loc;
1634  }
1635 
1636  unsigned getNumArgs() const {
1637  return getTypePtr()->getNumArgs();
1638  }
1639 
1641  getArgInfos()[i] = AI;
1642  }
1643 
1645  return getArgInfos()[i];
1646  }
1647 
1648  TemplateArgumentLoc getArgLoc(unsigned i) const {
1649  return TemplateArgumentLoc(getTypePtr()->getArg(i), getArgLocInfo(i));
1650  }
1651 
1653  return getLocalData()->NameLoc;
1654  }
1655 
1657  getLocalData()->NameLoc = Loc;
1658  }
1659 
1660  /// - Copy the location information from the given info.
1662  unsigned size = getFullDataSize();
1663  assert(size == Loc.getFullDataSize());
1664 
1665  // We're potentially copying Expr references here. We don't
1666  // bother retaining them because TypeSourceInfos live forever, so
1667  // as long as the Expr was retained when originally written into
1668  // the TypeLoc, we're okay.
1669  memcpy(Data, Loc.Data, size);
1670  }
1671 
1673  if (getTemplateKeywordLoc().isValid())
1675  else
1677  }
1678 
1680  setTemplateKeywordLoc(Loc);
1681  setTemplateNameLoc(Loc);
1682  setLAngleLoc(Loc);
1683  setRAngleLoc(Loc);
1684  initializeArgLocs(Context, getNumArgs(), getTypePtr()->getArgs(),
1685  getArgInfos(), Loc);
1686  }
1687 
1688  static void initializeArgLocs(ASTContext &Context, unsigned NumArgs,
1689  const TemplateArgument *Args,
1690  TemplateArgumentLocInfo *ArgInfos,
1691  SourceLocation Loc);
1692 
1693  unsigned getExtraLocalDataSize() const {
1694  return getNumArgs() * sizeof(TemplateArgumentLocInfo);
1695  }
1696 
1697  unsigned getExtraLocalDataAlignment() const {
1698  return alignof(TemplateArgumentLocInfo);
1699  }
1700 
1701 private:
1702  TemplateArgumentLocInfo *getArgInfos() const {
1703  return static_cast<TemplateArgumentLocInfo*>(getExtraLocalData());
1704  }
1705 };
1706 
1711 };
1712 
1714  : public ConcreteTypeLoc<UnqualTypeLoc,
1715  DependentAddressSpaceTypeLoc,
1716  DependentAddressSpaceType,
1717  DependentAddressSpaceLocInfo> {
1718 public:
1719  /// The location of the attribute name, i.e.
1720  /// int * __attribute__((address_space(11)))
1721  /// ^~~~~~~~~~~~~
1723  return getLocalData()->AttrLoc;
1724  }
1726  getLocalData()->AttrLoc = loc;
1727  }
1728 
1729  /// The attribute's expression operand, if it has one.
1730  /// int * __attribute__((address_space(11)))
1731  /// ^~
1733  return getLocalData()->ExprOperand;
1734  }
1736  getLocalData()->ExprOperand = e;
1737  }
1738 
1739  /// The location of the parentheses around the operand, if there is
1740  /// an operand.
1741  /// int * __attribute__((address_space(11)))
1742  /// ^ ^
1744  return getLocalData()->OperandParens;
1745  }
1748  }
1749 
1752  range.setEnd(getAttrOperandParensRange().getEnd());
1753  return range;
1754  }
1755 
1756  /// Returns the type before the address space attribute application
1757  /// area.
1758  /// int * __attribute__((address_space(11))) *
1759  /// ^ ^
1761  return this->getTypePtr()->getPointeeType();
1762  }
1763 
1765  return this->getInnerTypeLoc();
1766  }
1767 
1769  setAttrNameLoc(loc);
1772  setAttrExprOperand(getTypePtr()->getAddrSpaceExpr());
1773  }
1774 };
1775 
1776 //===----------------------------------------------------------------------===//
1777 //
1778 // All of these need proper implementations.
1779 //
1780 //===----------------------------------------------------------------------===//
1781 
1782 // FIXME: size expression and attribute locations (or keyword if we
1783 // ever fully support altivec syntax).
1786 };
1787 
1788 class VectorTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, VectorTypeLoc,
1789  VectorType, VectorTypeLocInfo> {
1790 public:
1791  SourceLocation getNameLoc() const { return this->getLocalData()->NameLoc; }
1792 
1793  void setNameLoc(SourceLocation Loc) { this->getLocalData()->NameLoc = Loc; }
1794 
1796  return SourceRange(getNameLoc(), getNameLoc());
1797  }
1798 
1800  setNameLoc(Loc);
1801  }
1802 
1803  TypeLoc getElementLoc() const { return getInnerTypeLoc(); }
1804 
1805  QualType getInnerType() const { return this->getTypePtr()->getElementType(); }
1806 };
1807 
1808 // FIXME: size expression and attribute locations (or keyword if we
1809 // ever fully support altivec syntax).
1811  : public ConcreteTypeLoc<UnqualTypeLoc, DependentVectorTypeLoc,
1812  DependentVectorType, VectorTypeLocInfo> {
1813 public:
1814  SourceLocation getNameLoc() const { return this->getLocalData()->NameLoc; }
1815 
1816  void setNameLoc(SourceLocation Loc) { this->getLocalData()->NameLoc = Loc; }
1817 
1819  return SourceRange(getNameLoc(), getNameLoc());
1820  }
1821 
1823  setNameLoc(Loc);
1824  }
1825 
1826  TypeLoc getElementLoc() const { return getInnerTypeLoc(); }
1827 
1828  QualType getInnerType() const { return this->getTypePtr()->getElementType(); }
1829 };
1830 
1831 // FIXME: size expression and attribute locations.
1833  : public InheritingConcreteTypeLoc<VectorTypeLoc, ExtVectorTypeLoc,
1834  ExtVectorType> {};
1835 
1836 // FIXME: attribute locations.
1837 // For some reason, this isn't a subtype of VectorType.
1839  : public ConcreteTypeLoc<UnqualTypeLoc, DependentSizedExtVectorTypeLoc,
1840  DependentSizedExtVectorType, VectorTypeLocInfo> {
1841 public:
1842  SourceLocation getNameLoc() const { return this->getLocalData()->NameLoc; }
1843 
1844  void setNameLoc(SourceLocation Loc) { this->getLocalData()->NameLoc = Loc; }
1845 
1847  return SourceRange(getNameLoc(), getNameLoc());
1848  }
1849 
1851  setNameLoc(Loc);
1852  }
1853 
1854  TypeLoc getElementLoc() const { return getInnerTypeLoc(); }
1855 
1856  QualType getInnerType() const { return this->getTypePtr()->getElementType(); }
1857 };
1858 
1864 };
1865 
1866 class MatrixTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, MatrixTypeLoc,
1867  MatrixType, MatrixTypeLocInfo> {
1868 public:
1869  /// The location of the attribute name, i.e.
1870  /// float __attribute__((matrix_type(4, 2)))
1871  /// ^~~~~~~~~~~~~~~~~
1874 
1875  /// The attribute's row operand, if it has one.
1876  /// float __attribute__((matrix_type(4, 2)))
1877  /// ^
1880 
1881  /// The attribute's column operand, if it has one.
1882  /// float __attribute__((matrix_type(4, 2)))
1883  /// ^
1886 
1887  /// The location of the parentheses around the operand, if there is
1888  /// an operand.
1889  /// float __attribute__((matrix_type(4, 2)))
1890  /// ^ ^
1892  return getLocalData()->OperandParens;
1893  }
1896  }
1897 
1900  range.setEnd(getAttrOperandParensRange().getEnd());
1901  return range;
1902  }
1903 
1905  setAttrNameLoc(loc);
1907  setAttrRowOperand(nullptr);
1908  setAttrColumnOperand(nullptr);
1909  }
1910 };
1911 
1913  : public InheritingConcreteTypeLoc<MatrixTypeLoc, ConstantMatrixTypeLoc,
1914  ConstantMatrixType> {};
1915 
1917  : public InheritingConcreteTypeLoc<MatrixTypeLoc,
1918  DependentSizedMatrixTypeLoc,
1919  DependentSizedMatrixType> {};
1920 
1921 // FIXME: location of the '_Complex' keyword.
1922 class ComplexTypeLoc : public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
1923  ComplexTypeLoc,
1924  ComplexType> {
1925 };
1926 
1931 };
1932 
1934 };
1935 
1938 };
1939 
1940 template <class Derived, class TypeClass, class LocalData = TypeofLocInfo>
1942  : public ConcreteTypeLoc<UnqualTypeLoc, Derived, TypeClass, LocalData> {
1943 public:
1945  return this->getLocalData()->TypeofLoc;
1946  }
1947 
1949  this->getLocalData()->TypeofLoc = Loc;
1950  }
1951 
1953  return this->getLocalData()->LParenLoc;
1954  }
1955 
1957  this->getLocalData()->LParenLoc = Loc;
1958  }
1959 
1961  return this->getLocalData()->RParenLoc;
1962  }
1963 
1965  this->getLocalData()->RParenLoc = Loc;
1966  }
1967 
1969  return SourceRange(getLParenLoc(), getRParenLoc());
1970  }
1971 
1973  setLParenLoc(range.getBegin());
1974  setRParenLoc(range.getEnd());
1975  }
1976 
1978  return SourceRange(getTypeofLoc(), getRParenLoc());
1979  }
1980 
1982  setTypeofLoc(Loc);
1983  setLParenLoc(Loc);
1984  setRParenLoc(Loc);
1985  }
1986 };
1987 
1988 class TypeOfExprTypeLoc : public TypeofLikeTypeLoc<TypeOfExprTypeLoc,
1989  TypeOfExprType,
1990  TypeOfExprTypeLocInfo> {
1991 public:
1993  return getTypePtr()->getUnderlyingExpr();
1994  }
1995 
1996  // Reimplemented to account for GNU/C++ extension
1997  // typeof unary-expression
1998  // where there are no parentheses.
2000 };
2001 
2003  : public TypeofLikeTypeLoc<TypeOfTypeLoc, TypeOfType, TypeOfTypeLocInfo> {
2004 public:
2006  return this->getTypePtr()->getUnderlyingType();
2007  }
2008 
2010  return this->getLocalData()->UnderlyingTInfo;
2011  }
2012 
2014  this->getLocalData()->UnderlyingTInfo = TI;
2015  }
2016 
2017  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2018 };
2019 
2020 // decltype(expression) abc;
2021 // ~~~~~~~~ DecltypeLoc
2022 // ~ RParenLoc
2023 // FIXME: add LParenLoc, it is tricky to support due to the limitation of
2024 // annotated-decltype token.
2028 };
2030  : public ConcreteTypeLoc<UnqualTypeLoc, DecltypeTypeLoc, DecltypeType,
2031  DecltypeTypeLocInfo> {
2032 public:
2034 
2037 
2040 
2043  }
2044 
2046  setDecltypeLoc(Loc);
2047  setRParenLoc(Loc);
2048  }
2049 };
2050 
2052  // FIXME: While there's only one unary transform right now, future ones may
2053  // need different representations
2056 };
2057 
2058 class UnaryTransformTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
2059  UnaryTransformTypeLoc,
2060  UnaryTransformType,
2061  UnaryTransformTypeLocInfo> {
2062 public:
2064  void setKWLoc(SourceLocation Loc) { getLocalData()->KWLoc = Loc; }
2065 
2068 
2071 
2073  return getLocalData()->UnderlyingTInfo;
2074  }
2075 
2077  getLocalData()->UnderlyingTInfo = TInfo;
2078  }
2079 
2081  return SourceRange(getKWLoc(), getRParenLoc());
2082  }
2083 
2085  return SourceRange(getLParenLoc(), getRParenLoc());
2086  }
2087 
2089  setLParenLoc(Range.getBegin());
2090  setRParenLoc(Range.getEnd());
2091  }
2092 
2093  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2094 };
2095 
2097  : public InheritingConcreteTypeLoc<TypeSpecTypeLoc, DeducedTypeLoc,
2098  DeducedType> {};
2099 
2107 
2108  // For decltype(auto).
2110 
2111  // Followed by a TemplateArgumentLocInfo[]
2112 };
2113 
2115  : public ConcreteTypeLoc<DeducedTypeLoc,
2116  AutoTypeLoc,
2117  AutoType,
2118  AutoTypeLocInfo> {
2119 public:
2121  return getTypePtr()->getKeyword();
2122  }
2123 
2124  bool isDecltypeAuto() const { return getTypePtr()->isDecltypeAuto(); }
2127 
2128  bool isConstrained() const {
2129  return getTypePtr()->isConstrained();
2130  }
2131 
2133  return getLocalData()->NestedNameSpec;
2134  }
2135 
2137  getLocalData()->NestedNameSpec = NNS;
2138  }
2139 
2141  return getLocalData()->TemplateKWLoc;
2142  }
2143 
2145  getLocalData()->TemplateKWLoc = Loc;
2146  }
2147 
2149  return getLocalData()->ConceptNameLoc;
2150  }
2151 
2153  getLocalData()->ConceptNameLoc = Loc;
2154  }
2155 
2157  return getLocalData()->FoundDecl;
2158  }
2159 
2161  getLocalData()->FoundDecl = D;
2162  }
2163 
2166  }
2167 
2169 
2171  return getLocalData()->LAngleLoc.isValid();
2172  }
2173 
2175  return this->getLocalData()->LAngleLoc;
2176  }
2177 
2179  this->getLocalData()->LAngleLoc = Loc;
2180  }
2181 
2183  return this->getLocalData()->RAngleLoc;
2184  }
2185 
2187  this->getLocalData()->RAngleLoc = Loc;
2188  }
2189 
2190  unsigned getNumArgs() const {
2191  return getTypePtr()->getNumArgs();
2192  }
2193 
2195  getArgInfos()[i] = AI;
2196  }
2197 
2199  return getArgInfos()[i];
2200  }
2201 
2202  TemplateArgumentLoc getArgLoc(unsigned i) const {
2203  return TemplateArgumentLoc(getTypePtr()->getTypeConstraintArguments()[i],
2204  getArgLocInfo(i));
2205  }
2206 
2208  return {isConstrained()
2212  : getConceptNameLoc()))
2213  : getNameLoc(),
2215  }
2216 
2217  void copy(AutoTypeLoc Loc) {
2218  unsigned size = getFullDataSize();
2219  assert(size == Loc.getFullDataSize());
2220  memcpy(Data, Loc.Data, size);
2221  }
2222 
2223  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2224 
2225  unsigned getExtraLocalDataSize() const {
2226  return getNumArgs() * sizeof(TemplateArgumentLocInfo);
2227  }
2228 
2229  unsigned getExtraLocalDataAlignment() const {
2230  return alignof(TemplateArgumentLocInfo);
2231  }
2232 
2233 private:
2234  TemplateArgumentLocInfo *getArgInfos() const {
2235  return static_cast<TemplateArgumentLocInfo*>(getExtraLocalData());
2236  }
2237 };
2238 
2240  : public InheritingConcreteTypeLoc<DeducedTypeLoc,
2241  DeducedTemplateSpecializationTypeLoc,
2242  DeducedTemplateSpecializationType> {
2243 public:
2245  return getNameLoc();
2246  }
2247 
2249  setNameLoc(Loc);
2250  }
2251 };
2252 
2255 
2256  /// Data associated with the nested-name-specifier location.
2258 };
2259 
2260 class ElaboratedTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
2261  ElaboratedTypeLoc,
2262  ElaboratedType,
2263  ElaboratedLocInfo> {
2264 public:
2266  return this->getLocalData()->ElaboratedKWLoc;
2267  }
2268 
2270  this->getLocalData()->ElaboratedKWLoc = Loc;
2271  }
2272 
2274  return NestedNameSpecifierLoc(getTypePtr()->getQualifier(),
2275  getLocalData()->QualifierData);
2276  }
2277 
2279  assert(QualifierLoc.getNestedNameSpecifier()
2280  == getTypePtr()->getQualifier() &&
2281  "Inconsistent nested-name-specifier pointer");
2282  getLocalData()->QualifierData = QualifierLoc.getOpaqueData();
2283  }
2284 
2286  if (getElaboratedKeywordLoc().isValid())
2287  if (getQualifierLoc())
2290  else
2292  else
2293  return getQualifierLoc().getSourceRange();
2294  }
2295 
2296  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2297 
2299  return getInnerTypeLoc();
2300  }
2301 
2303  return getTypePtr()->getNamedType();
2304  }
2305 
2307  unsigned size = getFullDataSize();
2308  assert(size == Loc.getFullDataSize());
2309  memcpy(Data, Loc.Data, size);
2310  }
2311 };
2312 
2313 // This is exactly the structure of an ElaboratedTypeLoc whose inner
2314 // type is some sort of TypeDeclTypeLoc.
2317 };
2318 
2319 class DependentNameTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
2320  DependentNameTypeLoc,
2321  DependentNameType,
2322  DependentNameLocInfo> {
2323 public:
2325  return this->getLocalData()->ElaboratedKWLoc;
2326  }
2327 
2329  this->getLocalData()->ElaboratedKWLoc = Loc;
2330  }
2331 
2333  return NestedNameSpecifierLoc(getTypePtr()->getQualifier(),
2334  getLocalData()->QualifierData);
2335  }
2336 
2338  assert(QualifierLoc.getNestedNameSpecifier()
2339  == getTypePtr()->getQualifier() &&
2340  "Inconsistent nested-name-specifier pointer");
2341  getLocalData()->QualifierData = QualifierLoc.getOpaqueData();
2342  }
2343 
2345  return this->getLocalData()->NameLoc;
2346  }
2347 
2349  this->getLocalData()->NameLoc = Loc;
2350  }
2351 
2353  if (getElaboratedKeywordLoc().isValid())
2355  else
2357  }
2358 
2360  unsigned size = getFullDataSize();
2361  assert(size == Loc.getFullDataSize());
2362  memcpy(Data, Loc.Data, size);
2363  }
2364 
2365  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2366 };
2367 
2372  // followed by a TemplateArgumentLocInfo[]
2373 };
2374 
2376  public ConcreteTypeLoc<UnqualTypeLoc,
2377  DependentTemplateSpecializationTypeLoc,
2378  DependentTemplateSpecializationType,
2379  DependentTemplateSpecializationLocInfo> {
2380 public:
2382  return this->getLocalData()->ElaboratedKWLoc;
2383  }
2384 
2386  this->getLocalData()->ElaboratedKWLoc = Loc;
2387  }
2388 
2390  if (!getLocalData()->QualifierData)
2391  return NestedNameSpecifierLoc();
2392 
2393  return NestedNameSpecifierLoc(getTypePtr()->getQualifier(),
2394  getLocalData()->QualifierData);
2395  }
2396 
2398  if (!QualifierLoc) {
2399  // Even if we have a nested-name-specifier in the dependent
2400  // template specialization type, we won't record the nested-name-specifier
2401  // location information when this type-source location information is
2402  // part of a nested-name-specifier.
2403  getLocalData()->QualifierData = nullptr;
2404  return;
2405  }
2406 
2407  assert(QualifierLoc.getNestedNameSpecifier()
2408  == getTypePtr()->getQualifier() &&
2409  "Inconsistent nested-name-specifier pointer");
2410  getLocalData()->QualifierData = QualifierLoc.getOpaqueData();
2411  }
2412 
2414  return getLocalData()->TemplateKWLoc;
2415  }
2416 
2418  getLocalData()->TemplateKWLoc = Loc;
2419  }
2420 
2422  return this->getLocalData()->NameLoc;
2423  }
2424 
2426  this->getLocalData()->NameLoc = Loc;
2427  }
2428 
2430  return this->getLocalData()->LAngleLoc;
2431  }
2432 
2434  this->getLocalData()->LAngleLoc = Loc;
2435  }
2436 
2438  return this->getLocalData()->RAngleLoc;
2439  }
2440 
2442  this->getLocalData()->RAngleLoc = Loc;
2443  }
2444 
2445  unsigned getNumArgs() const {
2446  return getTypePtr()->getNumArgs();
2447  }
2448 
2450  getArgInfos()[i] = AI;
2451  }
2452 
2454  return getArgInfos()[i];
2455  }
2456 
2457  TemplateArgumentLoc getArgLoc(unsigned i) const {
2458  return TemplateArgumentLoc(getTypePtr()->getArg(i), getArgLocInfo(i));
2459  }
2460 
2462  if (getElaboratedKeywordLoc().isValid())
2464  else if (getQualifierLoc())
2466  else if (getTemplateKeywordLoc().isValid())
2468  else
2470  }
2471 
2473  unsigned size = getFullDataSize();
2474  assert(size == Loc.getFullDataSize());
2475  memcpy(Data, Loc.Data, size);
2476  }
2477 
2478  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2479 
2480  unsigned getExtraLocalDataSize() const {
2481  return getNumArgs() * sizeof(TemplateArgumentLocInfo);
2482  }
2483 
2484  unsigned getExtraLocalDataAlignment() const {
2485  return alignof(TemplateArgumentLocInfo);
2486  }
2487 
2488 private:
2489  TemplateArgumentLocInfo *getArgInfos() const {
2490  return static_cast<TemplateArgumentLocInfo*>(getExtraLocalData());
2491  }
2492 };
2493 
2496 };
2497 
2499  : public ConcreteTypeLoc<UnqualTypeLoc, PackExpansionTypeLoc,
2500  PackExpansionType, PackExpansionTypeLocInfo> {
2501 public:
2503  return this->getLocalData()->EllipsisLoc;
2504  }
2505 
2507  this->getLocalData()->EllipsisLoc = Loc;
2508  }
2509 
2512  }
2513 
2515  setEllipsisLoc(Loc);
2516  }
2517 
2519  return getInnerTypeLoc();
2520  }
2521 
2523  return this->getTypePtr()->getPattern();
2524  }
2525 };
2526 
2529 };
2530 
2531 class AtomicTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, AtomicTypeLoc,
2532  AtomicType, AtomicTypeLocInfo> {
2533 public:
2535  return this->getInnerTypeLoc();
2536  }
2537 
2539  return SourceRange(getKWLoc(), getRParenLoc());
2540  }
2541 
2543  return this->getLocalData()->KWLoc;
2544  }
2545 
2547  this->getLocalData()->KWLoc = Loc;
2548  }
2549 
2551  return this->getLocalData()->LParenLoc;
2552  }
2553 
2555  this->getLocalData()->LParenLoc = Loc;
2556  }
2557 
2559  return this->getLocalData()->RParenLoc;
2560  }
2561 
2563  this->getLocalData()->RParenLoc = Loc;
2564  }
2565 
2567  return SourceRange(getLParenLoc(), getRParenLoc());
2568  }
2569 
2571  setLParenLoc(Range.getBegin());
2572  setRParenLoc(Range.getEnd());
2573  }
2574 
2576  setKWLoc(Loc);
2577  setLParenLoc(Loc);
2578  setRParenLoc(Loc);
2579  }
2580 
2582  return this->getTypePtr()->getValueType();
2583  }
2584 };
2585 
2588 };
2589 
2590 class PipeTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, PipeTypeLoc, PipeType,
2591  PipeTypeLocInfo> {
2592 public:
2593  TypeLoc getValueLoc() const { return this->getInnerTypeLoc(); }
2594 
2596 
2597  SourceLocation getKWLoc() const { return this->getLocalData()->KWLoc; }
2598  void setKWLoc(SourceLocation Loc) { this->getLocalData()->KWLoc = Loc; }
2599 
2601  setKWLoc(Loc);
2602  }
2603 
2604  QualType getInnerType() const { return this->getTypePtr()->getElementType(); }
2605 };
2606 
2607 template <typename T>
2608 inline T TypeLoc::getAsAdjusted() const {
2609  TypeLoc Cur = *this;
2610  while (!T::isKind(Cur)) {
2611  if (auto PTL = Cur.getAs<ParenTypeLoc>())
2612  Cur = PTL.getInnerLoc();
2613  else if (auto ATL = Cur.getAs<AttributedTypeLoc>())
2614  Cur = ATL.getModifiedLoc();
2615  else if (auto ATL = Cur.getAs<BTFTagAttributedTypeLoc>())
2616  Cur = ATL.getWrappedLoc();
2617  else if (auto ETL = Cur.getAs<ElaboratedTypeLoc>())
2618  Cur = ETL.getNamedTypeLoc();
2619  else if (auto ATL = Cur.getAs<AdjustedTypeLoc>())
2620  Cur = ATL.getOriginalLoc();
2621  else if (auto MQL = Cur.getAs<MacroQualifiedTypeLoc>())
2622  Cur = MQL.getInnerLoc();
2623  else
2624  break;
2625  }
2626  return Cur.getAs<T>();
2627 }
2628 class BitIntTypeLoc final
2629  : public InheritingConcreteTypeLoc<TypeSpecTypeLoc, BitIntTypeLoc,
2630  BitIntType> {};
2632  : public InheritingConcreteTypeLoc<TypeSpecTypeLoc, DependentBitIntTypeLoc,
2633  DependentBitIntType> {};
2634 
2636  ObjCProtocolDecl *Protocol = nullptr;
2638 
2639 public:
2641  : Protocol(protocol), Loc(loc) {}
2642  ObjCProtocolDecl *getProtocol() const { return Protocol; }
2643  SourceLocation getLocation() const { return Loc; }
2644 
2645  /// The source range is just the protocol name.
2646  SourceRange getSourceRange() const LLVM_READONLY {
2647  return SourceRange(Loc, Loc);
2648  }
2649 };
2650 
2651 } // namespace clang
2652 
2653 #endif // LLVM_CLANG_AST_TYPELOC_H
clang::MatrixTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1898
clang::SourceRange::setBegin
void setBegin(SourceLocation b)
Definition: SourceLocation.h:222
clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc
void setTemplateKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:2417
clang::DependentTemplateSpecializationLocInfo::LAngleLoc
SourceLocation LAngleLoc
Definition: TypeLoc.h:2370
clang::DecltypeTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2039
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1150
clang::TemplateSpecializationTypeLoc
Definition: TypeLoc.h:1606
clang::FunctionNoProtoTypeLoc
Definition: TypeLoc.h:1504
clang::PointerLikeTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1244
clang::TypeLoc::Data
void * Data
Definition: TypeLoc.h:63
clang::ObjCObjectTypeLoc::getProtocolLAngleLoc
SourceLocation getProtocolLAngleLoc() const
Definition: TypeLoc.h:986
clang::ObjCObjectPointerTypeLoc
Wraps an ObjCPointerType with source location information.
Definition: TypeLoc.h:1326
clang::ParenTypeLoc::getInnerLoc
TypeLoc getInnerLoc() const
Definition: TypeLoc.h:1174
clang::AdjustedTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1208
clang::BuiltinTypeLoc::setBuiltinLoc
void setBuiltinLoc(SourceLocation Loc)
Definition: TypeLoc.h:559
clang::PointerTypeLoc::getStarLoc
SourceLocation getStarLoc() const
Definition: TypeLoc.h:1261
clang::AutoTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:622
clang::FunctionTypeLoc::getNumParams
unsigned getNumParams() const
Definition: TypeLoc.h:1458
clang::DecltypeTypeLoc::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: TypeLoc.h:2033
max
__DEVICE__ int max(int __a, int __b)
Definition: __clang_cuda_math.h:196
clang::PipeTypeLoc::setKWLoc
void setKWLoc(SourceLocation Loc)
Definition: TypeLoc.h:2598
clang::AtomicTypeLoc::getParensRange
SourceRange getParensRange() const
Definition: TypeLoc.h:2566
clang::ArrayTypeLoc::setLBracketLoc
void setLBracketLoc(SourceLocation Loc)
Definition: TypeLoc.h:1525
clang::ArrayLocInfo::LBracketLoc
SourceLocation LBracketLoc
Definition: TypeLoc.h:1511
clang::ParenType::getInnerType
QualType getInnerType() const
Definition: Type.h:2636
clang::UnqualTypeLoc::getTypeLocClass
TypeLocClass getTypeLocClass() const
Definition: TypeLoc.h:260
clang::DependentVectorTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:1814
clang::PointerLikeTypeLoc::setSigilLoc
void setSigilLoc(SourceLocation Loc)
Definition: TypeLoc.h:1236
clang::MatrixTypeLocInfo::OperandParens
SourceRange OperandParens
Definition: TypeLoc.h:1861
clang::ParenTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:1153
clang::BuiltinTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:597
clang::PipeTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2595
clang::DependentVectorTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1818
Specifiers.h
clang::ObjCObjectTypeLocInfo::ProtocolRAngleLoc
SourceLocation ProtocolRAngleLoc
Definition: TypeLoc.h:931
clang::FunctionTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1495
clang::UsingType::getFoundDecl
UsingShadowDecl * getFoundDecl() const
Definition: Type.h:4391
clang::TypeofLikeTypeLoc::getParensRange
SourceRange getParensRange() const
Definition: TypeLoc.h:1968
clang::DecltypeTypeLoc
Definition: TypeLoc.h:2029
clang::TypeOfExprTypeLocInfo
Definition: TypeLoc.h:1933
clang::AdjustedLocInfo
Definition: TypeLoc.h:1189
clang::MatrixTypeLoc::getAttrColumnOperand
Expr * getAttrColumnOperand() const
The attribute's column operand, if it has one.
Definition: TypeLoc.h:1884
clang::FunctionTypeLoc::getParams
ArrayRef< ParmVarDecl * > getParams() const
Definition: TypeLoc.h:1449
clang::ParenTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1178
clang::ElaboratedLocInfo::ElaboratedKWLoc
SourceLocation ElaboratedKWLoc
Definition: TypeLoc.h:2254
clang::AttributedTypeLoc::setAttr
void setAttr(const Attr *A)
Definition: TypeLoc.h:885
clang::TemplateTypeParmType::getDecl
TemplateTypeParmDecl * getDecl() const
Definition: Type.h:4878
clang::interp::align
constexpr size_t align(size_t Size)
Aligns a size to the pointer alignment.
Definition: PrimType.h:57
clang::ConstantMatrixTypeLoc
Definition: TypeLoc.h:1912
clang::DependentTemplateSpecializationTypeLoc::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Definition: TypeLoc.h:2389
clang::AutoTypeLoc::getNestedNameSpecifierLoc
const NestedNameSpecifierLoc & getNestedNameSpecifierLoc() const
Definition: TypeLoc.h:2132
clang::ObjCObjectTypeLocInfo::ProtocolLAngleLoc
SourceLocation ProtocolLAngleLoc
Definition: TypeLoc.h:930
clang::BlockPointerTypeLoc
Wrapper for source info for block pointers.
Definition: TypeLoc.h:1271
clang::ConcreteTypeLoc::getNextTypeLoc
TypeLoc getNextTypeLoc() const
Definition: TypeLoc.h:405
clang::TypeOfExprTypeLoc
Definition: TypeLoc.h:1988
clang::AutoType::isConstrained
bool isConstrained() const
Definition: Type.h:5086
clang::DependentVectorTypeLoc
Definition: TypeLoc.h:1810
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:210
clang::ParenLocInfo::LParenLoc
SourceLocation LParenLoc
Definition: TypeLoc.h:1141
clang::VariableArrayTypeLoc
Definition: TypeLoc.h:1589
clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc
void setTemplateKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:1616
clang::DependentTemplateSpecializationTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:549
clang::DependentAddressSpaceLocInfo::ExprOperand
Expr * ExprOperand
Definition: TypeLoc.h:1708
clang::PointerTypeLoc
Wrapper for source info for pointers.
Definition: TypeLoc.h:1258
clang::AutoType::getTypeConstraintConcept
ConceptDecl * getTypeConstraintConcept() const
Definition: Type.h:5082
clang::TypeLoc::copy
void copy(TypeLoc other)
Copies the other type loc into this one.
Definition: TypeLoc.cpp:167
clang::ObjCObjectTypeLoc::hasBaseTypeAsWritten
bool hasBaseTypeAsWritten() const
Definition: TypeLoc.h:1026
clang::PipeType::getElementType
QualType getElementType() const
Definition: Type.h:6359
clang::ParenTypeLoc::setLParenLoc
void setLParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1157
clang::WrittenBuiltinSpecs::Sign
unsigned Sign
Definition: Specifiers.h:101
clang::PipeTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:2600
clang::ArrayTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1557
clang::TypeSpecLocInfo
Definition: TypeLoc.h:507
clang::TypeSpecifierSign
TypeSpecifierSign
Specifies the signedness of a type, e.g., signed or unsigned.
Definition: Specifiers.h:47
clang::ConcreteTypeLoc::getLocalData
LocalData * getLocalData() const
Definition: TypeLoc.h:422
clang::ReferenceTypeLoc
Definition: TypeLoc.h:1339
clang::DependentSizedArrayTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1583
clang::TST_unspecified
@ TST_unspecified
Definition: Specifiers.h:53
clang::AdjustedTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1202
clang::PipeTypeLoc
Definition: TypeLoc.h:2590
clang::DependentVectorTypeLoc::getElementLoc
TypeLoc getElementLoc() const
Definition: TypeLoc.h:1826
clang::AutoTypeLoc::setFoundDecl
void setFoundDecl(NamedDecl *D)
Definition: TypeLoc.h:2160
clang::VectorTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1793
clang::BuiltinTypeLoc::getWrittenTypeSpec
TypeSpecifierType getWrittenTypeSpec() const
Definition: TypeLoc.cpp:325
clang::AutoTypeLocInfo
Definition: TypeLoc.h:2100
clang::TemplateSpecializationLocInfo::TemplateKWLoc
SourceLocation TemplateKWLoc
Definition: TypeLoc.h:1601
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::ObjCTypeParamTypeLoc::getProtocolLocs
ArrayRef< SourceLocation > getProtocolLocs() const
Definition: TypeLoc.h:816
clang::BuiltinType::Kind
Kind
Definition: Type.h:2506
clang::UnaryTransformTypeLocInfo
Definition: TypeLoc.h:2051
clang::ObjCTypeParamTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:822
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:247
clang::ObjCObjectTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1038
clang::SourceRange::getBegin
SourceLocation getBegin() const
Definition: SourceLocation.h:219
clang::AttributedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation loc)
Definition: TypeLoc.h:895
clang::AttributedTypeLoc::getAttrAs
const T * getAttrAs()
Definition: TypeLoc.h:889
clang::TypeSpecifierWidth::Unspecified
@ Unspecified
clang::BuiltinTypeLoc::expandBuiltinRange
void expandBuiltinRange(SourceRange Range)
Definition: TypeLoc.h:563
clang::MatrixTypeLoc::getAttrNameLoc
SourceLocation getAttrNameLoc() const
The location of the attribute name, i.e.
Definition: TypeLoc.h:1872
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:675
clang::ObjCObjectTypeLoc::setTypeArgTInfo
void setTypeArgTInfo(unsigned i, TypeSourceInfo *TInfo)
Definition: TypeLoc.h:981
clang::DecltypeType::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: Type.h:4532
clang::TemplateSpecializationTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1672
clang::FunctionTypeLoc::setLocalRangeEnd
void setLocalRangeEnd(SourceLocation L)
Definition: TypeLoc.h:1414
clang::PointerLikeTypeLoc
A base class for.
Definition: TypeLoc.h:1229
clang::ConcreteTypeLoc::getLocalDataAlignment
unsigned getLocalDataAlignment() const
Definition: TypeLoc.h:378
clang::ArrayTypeLoc::getBracketsRange
SourceRange getBracketsRange() const
Definition: TypeLoc.h:1537
clang::ObjCProtocolLoc::ObjCProtocolLoc
ObjCProtocolLoc(ObjCProtocolDecl *protocol, SourceLocation loc)
Definition: TypeLoc.h:2640
clang::ObjCInterfaceTypeLoc::setNameEndLoc
void setNameEndLoc(SourceLocation Loc)
Definition: TypeLoc.h:1097
clang::MatrixTypeLoc::setAttrColumnOperand
void setAttrColumnOperand(Expr *e)
Definition: TypeLoc.h:1885
clang::TypeSpecTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:531
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1680
clang::QualifiedTypeLoc::copyLocal
void copyLocal(TypeLoc other)
Definition: TypeLoc.h:295
clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc
void setRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:2441
clang::ConcreteTypeLoc::getLocalDataSize
unsigned getLocalDataSize() const
Definition: TypeLoc.h:383
memcpy
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
Definition: __clang_cuda_device_functions.h:1549
clang::DependentVectorType::getElementType
QualType getElementType() const
Definition: Type.h:3335
clang::BuiltinTypeLoc::hasWrittenTypeSpec
bool hasWrittenTypeSpec() const
Definition: TypeLoc.h:635
clang::TypeLoc::TypeLoc
TypeLoc(const Type *ty, void *opaqueData)
Definition: TypeLoc.h:69
clang::UsingShadowDecl
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition: DeclCXX.h:3207
clang::TagTypeLoc::isDefinition
bool isDefinition() const
True if the tag was defined in this type specifier.
Definition: TypeLoc.cpp:307
clang::BuiltinTypeLoc::hasWrittenSignSpec
bool hasWrittenSignSpec() const
Definition: TypeLoc.h:608
clang::TypeLoc::getFullDataSizeForType
static unsigned getFullDataSizeForType(QualType Ty)
Returns the size of type source info data block for the given type.
Definition: TypeLoc.cpp:93
clang::FunctionTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:1493
clang::UnaryTransformTypeLoc::setParensRange
void setParensRange(SourceRange Range)
Definition: TypeLoc.h:2088
clang::PackExpansionTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:2514
clang::FunctionTypeLoc::getExceptionSpecRange
SourceRange getExceptionSpecRange() const
Definition: TypeLoc.h:1438
clang::TypeSpecTypeLoc::LocalDataAlignment
@ LocalDataAlignment
Definition: TypeLoc.h:520
clang::MatrixTypeLoc::setAttrOperandParensRange
void setAttrOperandParensRange(SourceRange range)
Definition: TypeLoc.h:1894
clang::ObjCTypeParamType::getDecl
ObjCTypeParamDecl * getDecl() const
Definition: Type.h:5861
clang::ParenTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:1149
clang::AttributedTypeLoc::getAttr
const Attr * getAttr() const
The type attribute.
Definition: TypeLoc.h:882
clang::ConcreteTypeLoc::getInnerType
HasNoInnerType getInnerType() const
Definition: TypeLoc.h:444
clang::ObjCObjectTypeLocInfo
Definition: TypeLoc.h:927
clang::TypeLoc::getEndLoc
SourceLocation getEndLoc() const
Get the end source location.
Definition: TypeLoc.cpp:228
clang::DependentSizedExtVectorTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1846
clang::UnaryTransformTypeLocInfo::LParenLoc
SourceLocation LParenLoc
Definition: TypeLoc.h:2054
clang::QualifiedTypeLoc::getNextTypeLoc
TypeLoc getNextTypeLoc() const
Definition: TypeLoc.h:299
clang::UnaryTransformTypeLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:2054
clang::TypeSpecTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:523
clang::TypeOfTypeLoc::getUnderlyingTInfo
TypeSourceInfo * getUnderlyingTInfo() const
Definition: TypeLoc.h:2009
clang::AutoTypeLoc::isConstrained
bool isConstrained() const
Definition: TypeLoc.h:2128
clang::ObjCObjectTypeLoc::getTypeArgTInfo
TypeSourceInfo * getTypeArgTInfo(unsigned i) const
Definition: TypeLoc.h:976
clang::ArrayTypeLoc::getElementLoc
TypeLoc getElementLoc() const
Definition: TypeLoc.h:1549
clang::ObjCTypeParamTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:773
clang::ReferenceType::getPointeeTypeAsWritten
QualType getPointeeTypeAsWritten() const
Definition: Type.h:2780
clang::TypeLoc::initialize
void initialize(ASTContext &Context, SourceLocation Loc) const
Initializes this to state that every location in this type is the given location.
Definition: TypeLoc.h:196
clang::ObjCInterfaceTypeLoc
Wrapper for source info for ObjC interfaces.
Definition: TypeLoc.h:1072
clang::ObjCObjectTypeLoc::getBaseLoc
TypeLoc getBaseLoc() const
Definition: TypeLoc.h:1034
clang::DependentTemplateSpecializationTypeLoc::getTemplateKeywordLoc
SourceLocation getTemplateKeywordLoc() const
Definition: TypeLoc.h:2413
clang::AutoTypeLoc::getArgLocInfo
TemplateArgumentLocInfo getArgLocInfo(unsigned i) const
Definition: TypeLoc.h:2198
clang::ObjCInterfaceType::getDecl
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
Definition: Type.cpp:823
clang::TemplateSpecializationTypeLoc::getArgLoc
TemplateArgumentLoc getArgLoc(unsigned i) const
Definition: TypeLoc.h:1648
clang::ConcreteTypeLoc::getTypePtr
const TypeClass * getTypePtr() const
Definition: TypeLoc.h:409
clang::MacroQualifiedTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1135
clang::ConstantArrayTypeLoc
Definition: TypeLoc.h:1566
clang::UnresolvedUsingTypeLoc::getDecl
UnresolvedUsingTypenameDecl * getDecl() const
Definition: TypeLoc.h:706
clang::ObjCTypeParamTypeLoc::setProtocolLoc
void setProtocolLoc(unsigned i, SourceLocation Loc)
Definition: TypeLoc.h:806
clang::TypeLoc::getOpaqueData
void * getOpaqueData() const
Get the pointer where source information is stored.
Definition: TypeLoc.h:141
clang::TypeofLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:1930
clang::ObjCObjectTypeLoc::setProtocolLoc
void setProtocolLoc(unsigned i, SourceLocation Loc)
Definition: TypeLoc.h:1011
clang::TypeOfTypeLoc::setUnderlyingTInfo
void setUnderlyingTInfo(TypeSourceInfo *TI) const
Definition: TypeLoc.h:2013
clang::DeducedTemplateSpecializationTypeLoc::setTemplateNameLoc
void setTemplateNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:2248
clang::LValueReferenceTypeLoc::setAmpLoc
void setAmpLoc(SourceLocation Loc)
Definition: TypeLoc.h:1356
clang::AtomicTypeLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:2528
clang::MacroQualifiedTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1133
clang::AutoTypeLoc::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Definition: TypeLoc.h:2170
clang::AutoTypeLoc::getFoundDecl
NamedDecl * getFoundDecl() const
Definition: TypeLoc.h:2156
clang::PipeTypeLocInfo::KWLoc
SourceLocation KWLoc
Definition: TypeLoc.h:2587
clang::UsingTypeLoc
Wrapper for source info for types used via transparent aliases.
Definition: TypeLoc.h:669
clang::UnaryTransformTypeLocInfo::KWLoc
SourceLocation KWLoc
Definition: TypeLoc.h:2054
clang::DeducedTypeLoc
Definition: TypeLoc.h:2096
clang::ObjCObjectPointerTypeLoc::getStarLoc
SourceLocation getStarLoc() const
Definition: TypeLoc.h:1330
clang::ExtVectorTypeLoc
Definition: TypeLoc.h:1832
clang::MatrixTypeLoc
Definition: TypeLoc.h:1866
clang::TypeLoc::getTypePtr
const Type * getTypePtr() const
Definition: TypeLoc.h:136
clang::ObjCInterfaceTypeLoc::getNameEndLoc
SourceLocation getNameEndLoc() const
Definition: TypeLoc.h:1093
clang::ObjCProtocolLoc::getLocation
SourceLocation getLocation() const
Definition: TypeLoc.h:2643
clang::AutoTypeLocInfo::TemplateKWLoc
SourceLocation TemplateKWLoc
Definition: TypeLoc.h:2102
clang::AtomicTypeLoc::setParensRange
void setParensRange(SourceRange Range)
Definition: TypeLoc.h:2570
clang::DependentNameTypeLoc::setElaboratedKeywordLoc
void setElaboratedKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:2328
clang::BuiltinTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:589
clang::UnqualTypeLoc
Wrapper of type source information for a type with no direct qualifiers.
Definition: TypeLoc.h:251
clang::EnumDecl
Represents an enum.
Definition: Decl.h:3628
clang::ArrayTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1553
clang::MacroQualifiedTypeLoc::getExpansionLoc
SourceLocation getExpansionLoc() const
Definition: TypeLoc.h:1125
clang::FunctionLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:1378
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1500
clang::ObjCTypeParamTypeLoc::setProtocolRAngleLoc
void setProtocolRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:793
clang::ObjCObjectTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:1050
clang::ElaboratedTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2285
clang::ObjCTypeParamTypeLoc
ProtocolLAngleLoc, ProtocolRAngleLoc, and the source locations for protocol qualifiers are stored aft...
Definition: TypeLoc.h:757
clang::UnaryTransformTypeLoc::getUnderlyingTInfo
TypeSourceInfo * getUnderlyingTInfo() const
Definition: TypeLoc.h:2072
clang::ObjCObjectTypeLoc::getProtocolRAngleLoc
SourceLocation getProtocolRAngleLoc() const
Definition: TypeLoc.h:994
clang::ObjCObjectTypeLoc::setProtocolLAngleLoc
void setProtocolLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:990
clang::ObjCObjectTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:1055
clang::BTFTagAttributedTypeLoc
Type source information for an btf_tag attributed type.
Definition: TypeLoc.h:907
clang::TypeLoc::getBeginLoc
SourceLocation getBeginLoc() const
Get the begin source location.
Definition: TypeLoc.cpp:191
clang::ElaboratedTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:2302
clang::AutoTypeLoc::getLAngleLoc
SourceLocation getLAngleLoc() const
Definition: TypeLoc.h:2174
clang::DependentNameTypeLoc::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Definition: TypeLoc.h:2332
clang::ObjCTypeParamTypeLoc::getProtocolRAngleLoc
SourceLocation getProtocolRAngleLoc() const
Definition: TypeLoc.h:787
clang::FunctionTypeLoc
Wrapper for source info for functions.
Definition: TypeLoc.h:1383
clang::MatrixTypeLocInfo::AttrLoc
SourceLocation AttrLoc
Definition: TypeLoc.h:1860
clang::TemplateSpecializationLocInfo::RAngleLoc
SourceLocation RAngleLoc
Definition: TypeLoc.h:1603
clang::AtomicTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:2575
clang::AutoTypeLocInfo::RAngleLoc
SourceLocation RAngleLoc
Definition: TypeLoc.h:2106
clang::UnresolvedUsingTypenameDecl
Represents a dependent using declaration which was marked with typename.
Definition: DeclCXX.h:3829
clang::TemplateSpecializationTypeLoc::setLAngleLoc
void setLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:1624
clang::TemplateSpecializationTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1679
clang::AutoTypeLoc::isDecltypeAuto
bool isDecltypeAuto() const
Definition: TypeLoc.h:2124
clang::PackExpansionTypeLocInfo::EllipsisLoc
SourceLocation EllipsisLoc
Definition: TypeLoc.h:2495
clang::TypeOfTypeLocInfo::UnderlyingTInfo
TypeSourceInfo * UnderlyingTInfo
Definition: TypeLoc.h:1937
clang::ObjCObjectTypeLoc::setHasBaseTypeAsWritten
void setHasBaseTypeAsWritten(bool HasBaseType)
Definition: TypeLoc.h:1030
clang::DependentAddressSpaceTypeLoc
Definition: TypeLoc.h:1713
clang::ElaboratedTypeLoc::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Definition: TypeLoc.h:2273
clang::PackExpansionTypeLoc
Definition: TypeLoc.h:2498
TemplateBase.h
clang::ObjCTypeParamTypeLocInfo
Definition: TypeLoc.h:751
clang::FunctionTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1475
clang::AutoTypeLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:2109
clang::PackExpansionType::getPattern
QualType getPattern() const
Retrieve the pattern of this pack expansion, which is the type that will be repeatedly instantiated w...
Definition: Type.h:5729
clang::AutoTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2207
clang::TypeofLikeTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1981
clang::DependentAddressSpaceTypeLoc::getInnerType
QualType getInnerType() const
Returns the type before the address space attribute application area.
Definition: TypeLoc.h:1760
clang::MacroQualifiedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1115
clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo
void setArgLocInfo(unsigned i, TemplateArgumentLocInfo AI)
Definition: TypeLoc.h:2449
min
__DEVICE__ int min(int __a, int __b)
Definition: __clang_cuda_math.h:197
clang::MatrixTypeLocInfo::RowOperand
Expr * RowOperand
Definition: TypeLoc.h:1862
clang::ObjCObjectPointerTypeLoc::setStarLoc
void setStarLoc(SourceLocation Loc)
Definition: TypeLoc.h:1334
clang::SubstTemplateTypeParmPackTypeLoc
Wrapper for substituted template type parameters.
Definition: TypeLoc.h:849
clang::DependentTemplateSpecializationTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:2484
clang::AutoTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:2125
clang::FunctionLocInfo::LocalRangeBegin
SourceLocation LocalRangeBegin
Definition: TypeLoc.h:1376
clang::DependentAddressSpaceTypeLoc::getAttrOperandParensRange
SourceRange getAttrOperandParensRange() const
The location of the parentheses around the operand, if there is an operand.
Definition: TypeLoc.h:1743
clang::ObjCObjectTypeLoc::getTypeArgsRAngleLoc
SourceLocation getTypeArgsRAngleLoc() const
Definition: TypeLoc.h:964
clang::BuiltinTypeLoc::setModeAttr
void setModeAttr(bool written)
Definition: TypeLoc.h:651
clang::MatrixTypeLoc::getAttrRowOperand
Expr * getAttrRowOperand() const
The attribute's row operand, if it has one.
Definition: TypeLoc.h:1878
clang::TypeofLikeTypeLoc
Definition: TypeLoc.h:1941
clang::TemplateSpecializationTypeLoc::getTemplateNameLoc
SourceLocation getTemplateNameLoc() const
Definition: TypeLoc.h:1652
clang::QualifiedTypeLoc
Wrapper of type source information for a type with non-trivial direct qualifiers.
Definition: TypeLoc.h:277
clang::DependentTemplateSpecializationTypeLoc::setQualifierLoc
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
Definition: TypeLoc.h:2397
clang::TypeofLikeTypeLoc::setParensRange
void setParensRange(SourceRange range)
Definition: TypeLoc.h:1972
clang::ParenLocInfo
Definition: TypeLoc.h:1140
clang::DependentTemplateSpecializationLocInfo::TemplateKWLoc
SourceLocation TemplateKWLoc
Definition: TypeLoc.h:2369
clang::DependentAddressSpaceTypeLoc::setAttrNameLoc
void setAttrNameLoc(SourceLocation loc)
Definition: TypeLoc.h:1725
clang::MemberPointerLocInfo
Definition: TypeLoc.h:1283
clang::AttributedTypeLoc::getAttrKind
attr::Kind getAttrKind() const
Definition: TypeLoc.h:865
clang::DependentNameTypeLoc::getElaboratedKeywordLoc
SourceLocation getElaboratedKeywordLoc() const
Definition: TypeLoc.h:2324
clang::ObjCTypeParamTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:833
clang::TypeSpecTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:535
clang::AtomicTypeLoc
Definition: TypeLoc.h:2531
clang::BuiltinTypeLoc::getWrittenSignSpec
TypeSpecifierSign getWrittenSignSpec() const
Definition: TypeLoc.h:601
clang::BTFTagAttributedTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:924
clang::FunctionTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Returns the size of the type source info data block that is specific to this type.
Definition: TypeLoc.h:1488
clang::AutoTypeLoc::setTemplateKWLoc
void setTemplateKWLoc(SourceLocation Loc)
Definition: TypeLoc.h:2144
clang::PackExpansionTypeLoc::getEllipsisLoc
SourceLocation getEllipsisLoc() const
Definition: TypeLoc.h:2502
clang::BlockPointerTypeLoc::setCaretLoc
void setCaretLoc(SourceLocation Loc)
Definition: TypeLoc.h:1278
clang::ConceptDecl
Declaration of a C++2a concept.
Definition: DeclTemplate.h:3252
clang::MacroQualifiedType::getMacroIdentifier
const IdentifierInfo * getMacroIdentifier() const
Definition: Type.h:4440
clang::ConcreteTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:418
clang::ObjCTypeParamTypeLoc::getProtocolLAngleLoc
SourceLocation getProtocolLAngleLoc() const
Definition: TypeLoc.h:777
clang::ObjCObjectTypeLoc::getProtocolLoc
SourceLocation getProtocolLoc(unsigned i) const
Definition: TypeLoc.h:1006
clang::SourceRange::getEnd
SourceLocation getEnd() const
Definition: SourceLocation.h:220
clang::TypeofLikeTypeLoc::setLParenLoc
void setLParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1956
clang::ObjCInterfaceTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1085
clang::UnaryTransformTypeLocInfo::UnderlyingTInfo
TypeSourceInfo * UnderlyingTInfo
Definition: TypeLoc.h:2055
clang::DependentTemplateSpecializationLocInfo::RAngleLoc
SourceLocation RAngleLoc
Definition: TypeLoc.h:2371
clang::FunctionTypeLoc::setLocalRangeBegin
void setLocalRangeBegin(SourceLocation L)
Definition: TypeLoc.h:1406
clang::ObjCTypeParamTypeLoc::getNumProtocols
unsigned getNumProtocols() const
Definition: TypeLoc.h:797
clang::DependentAddressSpaceLocInfo
Definition: TypeLoc.h:1707
clang::ObjCInterfaceTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1089
clang::ObjCProtocolQualifiers::qual_begin
qual_iterator qual_begin() const
Definition: Type.h:5792
clang::AttributedTypeLoc::isQualifier
bool isQualifier() const
Definition: TypeLoc.h:869
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:208
clang::DecltypeTypeLocInfo
Definition: TypeLoc.h:2025
clang::TagTypeLoc::getDecl
TagDecl * getDecl() const
Definition: TypeLoc.h:720
clang::DecltypeTypeLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:2027
clang::ObjCObjectTypeLoc::getProtocolLocs
ArrayRef< SourceLocation > getProtocolLocs() const
Definition: TypeLoc.h:1022
clang::ParenTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1165
NestedNameSpecifier.h
clang::ParenTypeLoc
Definition: TypeLoc.h:1145
clang::DependentTemplateSpecializationTypeLoc::copy
void copy(DependentTemplateSpecializationTypeLoc Loc)
Definition: TypeLoc.h:2472
clang::BitIntTypeLoc
Definition: TypeLoc.h:2628
clang::NestedNameSpecifierLoc::getSourceRange
SourceRange getSourceRange() const LLVM_READONLY
Retrieve the source range covering the entirety of this nested-name-specifier.
Definition: NestedNameSpecifier.cpp:410
clang::DependentNameTypeLoc
Definition: TypeLoc.h:2319
clang::DependentAddressSpaceTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation loc)
Definition: TypeLoc.h:1768
clang::AutoTypeLocInfo::FoundDecl
NamedDecl * FoundDecl
Definition: TypeLoc.h:2104
clang::ArrayLocInfo::RBracketLoc
SourceLocation RBracketLoc
Definition: TypeLoc.h:1511
clang::AutoType::getKeyword
AutoTypeKeyword getKeyword() const
Definition: Type.h:5098
clang::AutoTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2126
clang::MemberPointerTypeLoc::getClass
const Type * getClass() const
Definition: TypeLoc.h:1300
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:61
clang::ReferenceTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1342
clang::AutoTypeLoc::setRAngleLoc
void setRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:2186
clang::LValueReferenceTypeLoc::getAmpLoc
SourceLocation getAmpLoc() const
Definition: TypeLoc.h:1352
clang::DependentNameTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:2344
clang::MacroQualifiedTypeLoc::getInnerLoc
TypeLoc getInnerLoc() const
Definition: TypeLoc.h:1119
clang::DependentSizedMatrixTypeLoc
Definition: TypeLoc.h:1916
clang::DependentAddressSpaceLocInfo::AttrLoc
SourceLocation AttrLoc
Definition: TypeLoc.h:1710
clang::ObjCObjectTypeLoc::getTypeArgsLAngleLoc
SourceLocation getTypeArgsLAngleLoc() const
Definition: TypeLoc.h:956
clang::TypeLoc::getContainedAutoTypeLoc
AutoTypeLoc getContainedAutoTypeLoc() const
Get the typeloc of an AutoType whose type will be deduced for a variable with an initializer of this ...
Definition: TypeLoc.cpp:709
clang::TypeSpecifierSign::Unspecified
@ Unspecified
clang::UnaryTransformTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:2069
clang::IncompleteArrayTypeLoc
Definition: TypeLoc.h:1572
clang::WrittenBuiltinSpecs::Type
unsigned Type
Definition: Specifiers.h:99
uintptr_t
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
Definition: opencl-c-base.h:138
clang::AtomicTypeLocInfo::LParenLoc
SourceLocation LParenLoc
Definition: TypeLoc.h:2528
clang::AutoTypeLoc::getArgLoc
TemplateArgumentLoc getArgLoc(unsigned i) const
Definition: TypeLoc.h:2202
clang::FunctionTypeLoc::setExceptionSpecRange
void setExceptionSpecRange(SourceRange R)
Definition: TypeLoc.h:1444
clang::MemberPointerTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1312
clang::AtomicTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2562
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:457
Type.h
clang::VectorTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:1791
clang::BTFTagAttributedLocInfo
Definition: TypeLoc.h:904
clang::ObjCTypeParamTypeLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:752
clang::PackExpansionTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:2522
clang::InjectedClassNameTypeLoc
Wrapper for source info for injected class names of class templates.
Definition: TypeLoc.h:690
bool
#define bool
Definition: stdbool.h:20
clang::ObjCInterfaceLocInfo
Definition: TypeLoc.h:1066
clang::ObjCObjectTypeLoc::getNumProtocols
unsigned getNumProtocols() const
Definition: TypeLoc.h:1002
clang::TypeOfTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:514
clang::TemplateSpecializationTypeLoc::copy
void copy(TemplateSpecializationTypeLoc Loc)
Definition: TypeLoc.h:1661
clang::ConcreteTypeLoc::getNonLocalData
void * getNonLocalData() const
Definition: TypeLoc.h:436
clang::EnumTypeLoc::getDecl
EnumDecl * getDecl() const
Definition: TypeLoc.h:739
clang::MatrixTypeLocInfo
Definition: TypeLoc.h:1859
clang::FunctionTypeLoc::getLocalRangeBegin
SourceLocation getLocalRangeBegin() const
Definition: TypeLoc.h:1402
clang::FunctionTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1471
clang::AtomicTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:2550
clang::VectorTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1799
clang::ArrayTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1563
clang::DependentNameTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:539
clang::AtomicTypeLoc::setLParenLoc
void setLParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2554
clang::RecordTypeLoc
Wrapper for source info for record types.
Definition: TypeLoc.h:727
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3348
clang::DependentVectorTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1828
clang::ElaboratedLocInfo
Definition: TypeLoc.h:2253
clang::ObjCTypeParamTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:470
clang::SourceRange::setEnd
void setEnd(SourceLocation e)
Definition: SourceLocation.h:223
clang::DependentSizedArrayTypeLoc
Definition: TypeLoc.h:1578
clang::MacroQualifiedType::getUnderlyingType
QualType getUnderlyingType() const
Definition: Type.h:4441
clang::ObjCObjectType::getBaseType
QualType getBaseType() const
Gets the base type of this object type.
Definition: Type.h:5955
clang::TypeLoc::operator==
friend bool operator==(const TypeLoc &LHS, const TypeLoc &RHS)
Definition: TypeLoc.h:219
clang::FunctionLocInfo::LocalRangeEnd
SourceLocation LocalRangeEnd
Definition: TypeLoc.h:1379
clang::MacroQualifiedLocInfo
Definition: TypeLoc.h:1107
clang::AdjustedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1198
clang::DependentTemplateSpecializationTypeLoc::getElaboratedKeywordLoc
SourceLocation getElaboratedKeywordLoc() const
Definition: TypeLoc.h:2381
clang::DependentAddressSpaceType::getPointeeType
QualType getPointeeType() const
Definition: Type.h:3174
clang::UnaryTransformTypeLoc::setUnderlyingTInfo
void setUnderlyingTInfo(TypeSourceInfo *TInfo)
Definition: TypeLoc.h:2076
clang::UnaryTransformTypeLoc::setLParenLoc
void setLParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2067
clang::DependentSizedExtVectorTypeLoc::getElementLoc
TypeLoc getElementLoc() const
Definition: TypeLoc.h:1854
clang::BuiltinTypeLoc::getWrittenWidthSpec
TypeSpecifierWidth getWrittenWidthSpec() const
Definition: TypeLoc.h:617
clang::TypeLoc::TypeLocClass
TypeLocClass
The kinds of TypeLocs.
Definition: TypeLoc.h:107
clang::PackExpansionTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2510
clang::FunctionTypeLoc::getLocalRangeEnd
SourceLocation getLocalRangeEnd() const
Definition: TypeLoc.h:1410
clang::PointerLikeLocInfo
Definition: TypeLoc.h:1223
clang::MemberPointerType::getClass
const Type * getClass() const
Definition: Type.h:2874
clang::AttributedTypeLoc
Type source information for an attributed type.
Definition: TypeLoc.h:860
clang::ArrayLocInfo
Definition: TypeLoc.h:1510
clang::NestedNameSpecifierLoc
A C++ nested-name-specifier augmented with source location information.
Definition: NestedNameSpecifier.h:243
clang::ObjCProtocolLoc::getSourceRange
SourceRange getSourceRange() const LLVM_READONLY
The source range is just the protocol name.
Definition: TypeLoc.h:2646
clang::TypeLoc::isNull
bool isNull() const
Definition: TypeLoc.h:120
clang::DependentTemplateSpecializationTypeLoc::getArgLocInfo
TemplateArgumentLocInfo getArgLocInfo(unsigned i) const
Definition: TypeLoc.h:2453
clang::ConcreteTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:414
clang::BuiltinTypeLoc::needsExtraLocalData
bool needsExtraLocalData() const
Definition: TypeLoc.h:582
clang::ParenLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:1142
clang::PointerLikeTypeLoc::getSigilLoc
SourceLocation getSigilLoc() const
Definition: TypeLoc.h:1232
clang::UnqualTypeLoc::UnqualTypeLoc
UnqualTypeLoc(const Type *Ty, void *Data)
Definition: TypeLoc.h:254
clang::UnaryTransformTypeLoc::getKWLoc
SourceLocation getKWLoc() const
Definition: TypeLoc.h:2063
clang::PipeTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:2604
Base
clang::BuiltinTypeLoc::hasModeAttr
bool hasModeAttr() const
Definition: TypeLoc.h:644
clang::AtomicTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:2581
clang::MemberPointerTypeLoc
Wrapper for source info for member pointers.
Definition: TypeLoc.h:1288
clang::ObjCInterfaceTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:1081
clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc
void setTemplateNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:2425
clang::LValueReferenceTypeLoc
Definition: TypeLoc.h:1347
clang::AtomicTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2538
clang::AtomicTypeLocInfo
Definition: TypeLoc.h:2527
clang::TypeofLikeTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:1952
clang::MemberPointerLocInfo::ClassTInfo
TypeSourceInfo * ClassTInfo
Definition: TypeLoc.h:1284
clang::UsingTypeLoc::getUnderlyingType
QualType getUnderlyingType() const
Definition: TypeLoc.h:672
clang::FunctionTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1430
clang::AtomicType::getValueType
QualType getValueType() const
Gets the type contained by this atomic type, i.e.
Definition: Type.h:6329
clang::AutoTypeKeyword
AutoTypeKeyword
Which keyword(s) were used to create an AutoType.
Definition: Type.h:1463
clang::AdjustedTypeLoc
Definition: TypeLoc.h:1191
clang::BlockPointerTypeLoc::getCaretLoc
SourceLocation getCaretLoc() const
Definition: TypeLoc.h:1274
clang::DependentTemplateSpecializationTypeLoc::getTemplateNameLoc
SourceLocation getTemplateNameLoc() const
Definition: TypeLoc.h:2421
clang::RValueReferenceTypeLoc::getAmpAmpLoc
SourceLocation getAmpAmpLoc() const
Definition: TypeLoc.h:1366
clang::DependentSizedExtVectorTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1850
clang::RValueReferenceTypeLoc::setAmpAmpLoc
void setAmpAmpLoc(SourceLocation Loc)
Definition: TypeLoc.h:1370
clang::AttributedLocInfo::TypeAttr
const Attr * TypeAttr
Definition: TypeLoc.h:856
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1196
clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc
void setLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:2433
clang::TypeLoc::findNullabilityLoc
SourceLocation findNullabilityLoc() const
Find the location of the nullability specifier (__nonnull, __nullable, or __null_unspecifier),...
Definition: TypeLoc.cpp:438
clang::Type::getTypeClass
TypeClass getTypeClass() const
Definition: Type.h:1868
clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc
void setElaboratedKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:2385
clang::UnaryTransformTypeLoc::setKWLoc
void setKWLoc(SourceLocation Loc)
Definition: TypeLoc.h:2064
clang::DecayedTypeLoc
Wrapper for source info for pointers decayed from arrays and functions.
Definition: TypeLoc.h:1219
clang::DependentNameTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2352
clang::TagType::getDecl
TagDecl * getDecl() const
Definition: Type.cpp:3543
clang::AutoTypeLoc
Definition: TypeLoc.h:2114
clang::BuiltinTypeLoc::hasWrittenWidthSpec
bool hasWrittenWidthSpec() const
Definition: TypeLoc.h:624
clang::DependentTemplateSpecializationTypeLoc
Definition: TypeLoc.h:2375
clang::TemplateSpecializationLocInfo::LAngleLoc
SourceLocation LAngleLoc
Definition: TypeLoc.h:1602
clang::AttributedTypeLoc::getModifiedLoc
TypeLoc getModifiedLoc() const
The modified type, which is generally canonically different from the attribute type.
Definition: TypeLoc.h:877
clang::BuiltinTypeLoc::getBuiltinLoc
SourceLocation getBuiltinLoc() const
Definition: TypeLoc.h:555
clang::ElaboratedTypeLoc::getElaboratedKeywordLoc
SourceLocation getElaboratedKeywordLoc() const
Definition: TypeLoc.h:2265
clang::BuiltinLocInfo::BuiltinRange
SourceRange BuiltinRange
Definition: TypeLoc.h:546
clang::AutoTypeLoc::getConceptNameInfo
DeclarationNameInfo getConceptNameInfo() const
Definition: TypeLoc.cpp:617
clang::TypeLoc::TypeLoc
TypeLoc()=default
clang::DependentAddressSpaceTypeLoc::setAttrExprOperand
void setAttrExprOperand(Expr *e)
Definition: TypeLoc.h:1735
clang::MacroQualifiedTypeLoc::getMacroIdentifier
const IdentifierInfo * getMacroIdentifier() const
Definition: TypeLoc.h:1121
clang::AutoType::getNumArgs
unsigned getNumArgs() const
Retrieve the number of template arguments.
Definition: Type.h:5072
clang::ObjCTypeParamTypeLoc::setProtocolLAngleLoc
void setProtocolLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:783
clang::DependentTemplateSpecializationType::getNumArgs
unsigned getNumArgs() const
Retrieve the number of template arguments.
Definition: Type.h:5652
clang::DependentBitIntTypeLoc
Definition: TypeLoc.h:2631
clang::QualifiedTypeLoc::getLocalDataAlignment
unsigned getLocalDataAlignment() const
Returns the alignment of the type source info data block that is specific to this type.
Definition: TypeLoc.h:313
clang::DependentNameTypeLoc::setQualifierLoc
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
Definition: TypeLoc.h:2337
clang::NestedNameSpecifierLoc::getOpaqueData
void * getOpaqueData() const
Retrieve the opaque pointer that refers to source-location data.
Definition: NestedNameSpecifier.h:279
clang::AutoTypeLoc::getRAngleLoc
SourceLocation getRAngleLoc() const
Definition: TypeLoc.h:2182
clang::ArrayTypeLoc::getRBracketLoc
SourceLocation getRBracketLoc() const
Definition: TypeLoc.h:1529
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:254
clang::ArrayTypeLoc::getSizeExpr
Expr * getSizeExpr() const
Definition: TypeLoc.h:1541
clang::MemberPointerTypeLoc::setClassTInfo
void setClassTInfo(TypeSourceInfo *TI)
Definition: TypeLoc.h:1308
clang::TemplateSpecializationTypeLoc::setTemplateNameLoc
void setTemplateNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1656
clang::TemplateSpecializationType::getNumArgs
unsigned getNumArgs() const
Retrieve the number of template arguments.
Definition: Type.h:5263
clang::RecordTypeLoc::getDecl
RecordDecl * getDecl() const
Definition: TypeLoc.h:731
clang::AutoTypeLoc::setConceptNameLoc
void setConceptNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:2152
SourceLocation.h
clang::TypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Get the local source range.
Definition: TypeLoc.h:158
clang::TypeofLikeTypeLoc::setTypeofLoc
void setTypeofLoc(SourceLocation Loc)
Definition: TypeLoc.h:1948
clang::SubstTemplateTypeParmTypeLoc
Wrapper for substituted template type parameters.
Definition: TypeLoc.h:842
clang::BuiltinTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:593
clang::UnaryTransformTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:522
clang::TemplateNameLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:1597
clang::AutoTypeLocInfo::NestedNameSpec
NestedNameSpecifierLoc NestedNameSpec
Definition: TypeLoc.h:2101
clang::attr::Kind
Kind
Definition: AttrKinds.h:22
clang::PackExpansionTypeLocInfo
Definition: TypeLoc.h:2494
clang::ArrayLocInfo::Size
Expr * Size
Definition: TypeLoc.h:1512
clang::ElaboratedTypeLoc::getNamedTypeLoc
TypeLoc getNamedTypeLoc() const
Definition: TypeLoc.h:2298
clang::TagTypeLoc
Wrapper for source info for tag types.
Definition: TypeLoc.h:716
clang::TypeLoc::getFullDataSize
unsigned getFullDataSize() const
Returns the size of the type source info data block.
Definition: TypeLoc.h:163
clang::ObjCObjectTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:481
clang::ConcreteTypeLoc
A metaprogramming base class for TypeLoc classes which correspond to a particular Type subclass.
Definition: TypeLoc.h:361
clang::TypeLoc::getAsAdjusted
T getAsAdjusted() const
Convert to the specified TypeLoc type, returning a null TypeLoc if this TypeLoc is not of the desired...
Definition: TypeLoc.h:2608
clang::BuiltinTypeLoc::setWrittenSignSpec
void setWrittenSignSpec(TypeSpecifierSign written)
Definition: TypeLoc.h:612
clang::TypedefType::getDecl
TypedefNameDecl * getDecl() const
Definition: Type.h:4415
clang::FunctionTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:1426
clang::ObjCObjectTypeLoc
Definition: TypeLoc.h:940
clang::AutoTypeLoc::getTemplateKWLoc
SourceLocation getTemplateKWLoc() const
Definition: TypeLoc.h:2140
clang::TypeLoc::getUnqualifiedLoc
UnqualTypeLoc getUnqualifiedLoc() const
Skips past any qualifiers, if this is qualified.
Definition: TypeLoc.h:326
clang::AttributedTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.cpp:497
clang::ElaboratedType::getNamedType
QualType getNamedType() const
Retrieve the type named by the qualified-id.
Definition: Type.h:5523
clang::TypeSpecTypeLoc
A reasonable base class for TypeLocs that correspond to types that are written as a type-specifier.
Definition: TypeLoc.h:513
clang::TypeofLocInfo::TypeofLoc
SourceLocation TypeofLoc
Definition: TypeLoc.h:1928
clang::UnresolvedUsingTypeLoc
Wrapper for source info for unresolved typename using decls.
Definition: TypeLoc.h:701
clang::BTFTagAttributedType::getWrappedType
QualType getWrappedType() const
Definition: Type.h:4812
clang::DecltypeTypeLoc::setDecltypeLoc
void setDecltypeLoc(SourceLocation Loc)
Definition: TypeLoc.h:2036
clang::DependentVectorTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1822
clang::DeducedTemplateSpecializationTypeLoc::getTemplateNameLoc
SourceLocation getTemplateNameLoc() const
Definition: TypeLoc.h:2244
clang::BTFTagAttributedTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.cpp:510
clang::FunctionTypeLoc::setParam
void setParam(unsigned i, ParmVarDecl *VD)
Definition: TypeLoc.h:1465
clang::ArrayTypeLoc::setSizeExpr
void setSizeExpr(Expr *Size)
Definition: TypeLoc.h:1545
clang::FunctionLocInfo::LParenLoc
SourceLocation LParenLoc
Definition: TypeLoc.h:1377
clang::TypeOfExprType::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: Type.h:4465
clang::MacroQualifiedTypeLoc::setExpansionLoc
void setExpansionLoc(SourceLocation Loc)
Definition: TypeLoc.h:1129
clang::EnumTypeLoc
Wrapper for source info for enum types.
Definition: TypeLoc.h:735
clang::ParenTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1169
clang::TypeLoc::getAs
T getAs() const
Convert to the specified TypeLoc type, returning a null TypeLoc if this TypeLoc is not of the desired...
Definition: TypeLoc.h:88
clang::MacroQualifiedLocInfo::ExpansionLoc
SourceLocation ExpansionLoc
Definition: TypeLoc.h:1108
clang::UnaryTransformTypeLoc::getParensRange
SourceRange getParensRange() const
Definition: TypeLoc.h:2084
clang::MatrixTypeLocInfo::ColumnOperand
Expr * ColumnOperand
Definition: TypeLoc.h:1863
clang::ElaboratedTypeLoc::setElaboratedKeywordLoc
void setElaboratedKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:2269
clang::VectorTypeLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:1785
clang::FunctionLocInfo
Definition: TypeLoc.h:1375
clang::TemplateSpecializationTypeLoc::getNumArgs
unsigned getNumArgs() const
Definition: TypeLoc.h:1636
clang::PointerLikeTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1252
llvm::ArrayRef
Definition: LLVM.h:34
clang::QualifiedTypeLoc::getLocalDataSize
unsigned getLocalDataSize() const
Returns the size of the type source info data block that is specific to this type.
Definition: TypeLoc.h:305
clang::TypeSpecLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:508
clang::PackExpansionTypeLoc::setEllipsisLoc
void setEllipsisLoc(SourceLocation Loc)
Definition: TypeLoc.h:2506
clang::TypeLoc
Base wrapper for a particular "section" of type source info.
Definition: TypeLoc.h:58
clang::MemberPointerTypeLoc::setStarLoc
void setStarLoc(SourceLocation Loc)
Definition: TypeLoc.h:1296
clang::BuiltinTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:573
clang::BuiltinLocInfo
Definition: TypeLoc.h:545
clang::DependentSizedExtVectorType::getElementType
QualType getElementType() const
Definition: Type.h:3218
clang::TypeLoc::getType
QualType getType() const
Get the type for which this source info wrapper provides information.
Definition: TypeLoc.h:132
clang::InheritingConcreteTypeLoc
A metaprogramming class designed for concrete subtypes of abstract types where all subtypes share equ...
Definition: TypeLoc.h:486
clang::TypeofLikeTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1977
clang::PointerLikeTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1248
LLVM.h
clang::AutoTypeLocInfo::LAngleLoc
SourceLocation LAngleLoc
Definition: TypeLoc.h:2105
clang::UsingTypeLoc::getFoundDecl
UsingShadowDecl * getFoundDecl() const
Definition: TypeLoc.h:675
clang::MatrixTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation loc)
Definition: TypeLoc.h:1904
clang::PackExpansionTypeLoc::getPatternLoc
TypeLoc getPatternLoc() const
Definition: TypeLoc.h:2518
clang::UnaryTransformTypeLoc
Definition: TypeLoc.h:2058
clang::ObjCObjectTypeLoc::setTypeArgsRAngleLoc
void setTypeArgsRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:968
clang::AtomicTypeLoc::setKWLoc
void setKWLoc(SourceLocation Loc)
Definition: TypeLoc.h:2546
clang::TemplateTypeParmTypeLoc
Wrapper for template type parameters.
Definition: TypeLoc.h:743
clang::DecltypeTypeLocInfo::DecltypeLoc
SourceLocation DecltypeLoc
Definition: TypeLoc.h:2026
clang::DecltypeTypeLoc::getDecltypeLoc
SourceLocation getDecltypeLoc() const
Definition: TypeLoc.h:2035
clang::BTFTagAttributedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation loc)
Definition: TypeLoc.h:922
clang::TemplateSpecializationTypeLoc::getRAngleLoc
SourceLocation getRAngleLoc() const
Definition: TypeLoc.h:1628
clang::ObjCObjectTypeLoc::getProtocol
ObjCProtocolDecl * getProtocol(unsigned i) const
Definition: TypeLoc.h:1016
clang::QualifiedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Initializes the local data of this type source info block to provide no information.
Definition: TypeLoc.h:291
clang::TemplateSpecializationTypeLoc::setArgLocInfo
void setArgLocInfo(unsigned i, TemplateArgumentLocInfo AI)
Definition: TypeLoc.h:1640
clang::MemberPointerTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1317
clang::AutoTypeLoc::copy
void copy(AutoTypeLoc Loc)
Definition: TypeLoc.h:2217
clang::ElaboratedTypeLoc::copy
void copy(ElaboratedTypeLoc Loc)
Definition: TypeLoc.h:2306
clang::TypeLoc::operator!=
friend bool operator!=(const TypeLoc &LHS, const TypeLoc &RHS)
Definition: TypeLoc.h:223
clang::ObjCObjectTypeLocInfo::HasBaseTypeAsWritten
bool HasBaseTypeAsWritten
Definition: TypeLoc.h:932
clang::TypeLoc::getLocalAlignmentForType
static unsigned getLocalAlignmentForType(QualType Ty)
Returns the alignment of type source info data block for the given type.
Definition: TypeLoc.cpp:73
clang::DependentSizedExtVectorTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:1842
clang::TemplateTypeParmTypeLoc::getDecl
TemplateTypeParmDecl * getDecl() const
Definition: TypeLoc.h:748
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:84
clang::AttributedTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:899
clang::AttributedType::isQualifier
bool isQualifier() const
Does this attribute behave like a type qualifier?
Definition: Type.cpp:3573
clang::ComplexTypeLoc
Definition: TypeLoc.h:1922
clang::DecltypeTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:2045
clang::ObjCTypeParamTypeLoc::getDecl
ObjCTypeParamDecl * getDecl() const
Definition: TypeLoc.h:767
clang::TypeSpecifierWidth
TypeSpecifierWidth
Specifies the width of a type, e.g., short, long, or long long.
Definition: Specifiers.h:44
clang::MatrixTypeLoc::setAttrNameLoc
void setAttrNameLoc(SourceLocation loc)
Definition: TypeLoc.h:1873
clang::DependentTemplateSpecializationTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2461
clang::QualType::getFromOpaquePtr
static QualType getFromOpaquePtr(const void *Ptr)
Definition: Type.h:722
clang::TemplateSpecializationTypeLoc::getTemplateKeywordLoc
SourceLocation getTemplateKeywordLoc() const
Definition: TypeLoc.h:1612
clang::ObjCInterfaceLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:1067
clang::AutoTypeLocInfo::ConceptNameLoc
SourceLocation ConceptNameLoc
Definition: TypeLoc.h:2103
clang::UnaryTransformTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2080
clang::ParenTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1161
clang::UnaryTransformTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:2066
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:582
clang::BuiltinType::getKind
Kind getKind() const
Definition: Type.h:2539
clang::ArrayTypeLoc
Wrapper for source info for arrays.
Definition: TypeLoc.h:1516
clang::ConcreteTypeLoc::TypeLoc
friend class TypeLoc
Definition: TypeLoc.h:362
clang::TypedefTypeLoc::getTypedefNameDecl
TypedefNameDecl * getTypedefNameDecl() const
Definition: TypeLoc.h:683
clang::TemplateSpecializationTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:1693
clang::ElaboratedTypeLoc
Definition: TypeLoc.h:2260
clang::DependentAddressSpaceTypeLoc::getPointeeTypeLoc
TypeLoc getPointeeTypeLoc() const
Definition: TypeLoc.h:1764
clang::TypeofLikeTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1964
clang::TypeLoc::IgnoreParens
TypeLoc IgnoreParens() const
Definition: TypeLoc.h:1183
clang::AutoTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:2229
clang::UnresolvedUsingType::getDecl
UnresolvedUsingTypenameDecl * getDecl() const
Definition: Type.h:4365
clang::FunctionTypeLoc::getParam
ParmVarDecl * getParam(unsigned i) const
Definition: TypeLoc.h:1464
DeclarationName.h
clang::InjectedClassNameTypeLoc::getDecl
CXXRecordDecl * getDecl() const
Definition: TypeLoc.h:695
clang::DependentAddressSpaceTypeLoc::setAttrOperandParensRange
void setAttrOperandParensRange(SourceRange range)
Definition: TypeLoc.h:1746
clang::AtomicTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:2558
clang::DependentVectorTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1816
clang::FunctionTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:1418
clang::PipeTypeLoc::getValueLoc
TypeLoc getValueLoc() const
Definition: TypeLoc.h:2593
clang::PointerLikeTypeLoc::getPointeeLoc
TypeLoc getPointeeLoc() const
Definition: TypeLoc.h:1240
clang::DecltypeTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2041
clang::EnumType::getDecl
EnumDecl * getDecl() const
Definition: Type.h:4680
clang::DependentAddressSpaceTypeLoc::getAttrExprOperand
Expr * getAttrExprOperand() const
The attribute's expression operand, if it has one.
Definition: TypeLoc.h:1732
clang::ObjCTypeParamTypeLoc::getProtocolLoc
SourceLocation getProtocolLoc(unsigned i) const
Definition: TypeLoc.h:801
clang::AdjustedTypeLoc::getOriginalLoc
TypeLoc getOriginalLoc() const
Definition: TypeLoc.h:1194
clang::TypeLoc::getTypeLocClass
TypeLocClass getTypeLocClass() const
Definition: TypeLoc.h:115
clang::DependentTemplateSpecializationTypeLoc::getLAngleLoc
SourceLocation getLAngleLoc() const
Definition: TypeLoc.h:2429
clang::DependentNameLocInfo
Definition: TypeLoc.h:2315
clang::TemplateSpecializationTypeLoc::setRAngleLoc
void setRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:1632
clang::ObjCTypeParamTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:829
clang::SourceLocation::isInvalid
bool isInvalid() const
Definition: SourceLocation.h:111
clang::TypeSpecTypeLoc::LocalDataSize
@ LocalDataSize
Definition: TypeLoc.h:519
clang::DependentSizedExtVectorTypeLoc
Definition: TypeLoc.h:1838
clang::QualifiedTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:279
clang::BuiltinTypeLoc::setWrittenWidthSpec
void setWrittenWidthSpec(TypeSpecifierWidth written)
Definition: TypeLoc.h:628
clang::BuiltinTypeLoc
Wrapper for source info for builtin types.
Definition: TypeLoc.h:550
clang
Definition: CalledOnceCheck.h:17
clang::TypeofLocInfo
Definition: TypeLoc.h:1927
clang::TypeLoc::TypeLoc
TypeLoc(QualType ty, void *opaqueData)
Definition: TypeLoc.h:67
clang::UnqualTypeLoc::getTypePtr
const Type * getTypePtr() const
Definition: TypeLoc.h:256
clang::VectorType::getElementType
QualType getElementType() const
Definition: Type.h:3283
clang::VectorTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1795
clang::ConcreteTypeLoc::getExtraLocalData
void * getExtraLocalData() const
Gets a pointer past the Info structure; useful for classes with local data that can't be captured in ...
Definition: TypeLoc.h:429
clang::BTFTagAttributedType::getAttr
const BTFTypeTagAttr * getAttr() const
Definition: Type.h:4813
clang::UnqualTypeLoc::UnqualTypeLoc
UnqualTypeLoc()=default
clang::transformer::range
RangeSelector range(RangeSelector Begin, RangeSelector End)
DEPRECATED. Use enclose.
Definition: RangeSelector.h:41
clang::TypeOfType::getUnderlyingType
QualType getUnderlyingType() const
Definition: Type.h:4510
clang::MatrixTypeLoc::setAttrRowOperand
void setAttrRowOperand(Expr *e)
Definition: TypeLoc.h:1879
clang::AutoTypeLoc::setNestedNameSpecifierLoc
void setNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Definition: TypeLoc.h:2136
clang::ObjCObjectTypeLocInfo::TypeArgsLAngleLoc
SourceLocation TypeArgsLAngleLoc
Definition: TypeLoc.h:928
clang::ConcreteTypeLoc::getInnerTypeLoc
TypeLoc getInnerTypeLoc() const
Definition: TypeLoc.h:446
clang::TypeOfExprTypeLoc::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: TypeLoc.h:1992
clang::BuiltinTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:656
clang::ObjCProtocolLoc::getProtocol
ObjCProtocolDecl * getProtocol() const
Definition: TypeLoc.h:2642
clang::AutoTypeLoc::getAutoKeyword
AutoTypeKeyword getAutoKeyword() const
Definition: TypeLoc.h:2120
clang::MemberPointerTypeLoc::getClassTInfo
TypeSourceInfo * getClassTInfo() const
Definition: TypeLoc.h:1304
clang::AutoTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:2225
clang::ObjCInterfaceTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1101
clang::ObjCProtocolQualifiers::getNumProtocols
unsigned getNumProtocols() const
Return the number of qualifying protocols in this type, or 0 if there are none.
Definition: Type.h:5799
clang::VectorTypeLoc
Definition: TypeLoc.h:1788
clang::TypeLoc::Qualified
@ Qualified
Definition: TypeLoc.h:112
clang::NestedNameSpecifierLoc::getNestedNameSpecifier
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
Definition: NestedNameSpecifier.h:274
clang::ArrayTypeLoc::setRBracketLoc
void setRBracketLoc(SourceLocation Loc)
Definition: TypeLoc.h:1533
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2052
clang::DecltypeTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:2038
clang::ElaboratedTypeLoc::setQualifierLoc
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
Definition: TypeLoc.h:2278
clang::FunctionTypeLoc::getParmArray
ParmVarDecl ** getParmArray() const
Definition: TypeLoc.h:1454
clang::DependentSizedExtVectorTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1844
clang::SourceLocation::isValid
bool isValid() const
Return true if this is a valid SourceLocation object.
Definition: SourceLocation.h:110
clang::ElaboratedLocInfo::QualifierData
void * QualifierData
Data associated with the nested-name-specifier location.
Definition: TypeLoc.h:2257
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:41
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6471
clang::FunctionType::getReturnType
QualType getReturnType() const
Definition: Type.h:3822
clang::AttributedLocInfo
Definition: TypeLoc.h:855
clang::ConcreteTypeLoc::HasNoInnerType
Definition: TypeLoc.h:443
clang::TemplateSpecializationTypeLoc::initializeArgLocs
static void initializeArgLocs(ASTContext &Context, unsigned NumArgs, const TemplateArgument *Args, TemplateArgumentLocInfo *ArgInfos, SourceLocation Loc)
Definition: TypeLoc.cpp:568
clang::TemplateSpecializationLocInfo
Definition: TypeLoc.h:1600
clang::TemplateSpecializationTypeLoc::getLAngleLoc
SourceLocation getLAngleLoc() const
Definition: TypeLoc.h:1620
clang::PointerTypeLoc::setStarLoc
void setStarLoc(SourceLocation Loc)
Definition: TypeLoc.h:1265
clang::TypeLoc::Ty
const void * Ty
Definition: TypeLoc.h:62
clang::DependentTemplateSpecializationTypeLoc::getRAngleLoc
SourceLocation getRAngleLoc() const
Definition: TypeLoc.h:2437
clang::TypeOfExprTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.cpp:316
clang::TypedefNameDecl
Base class for declarations which introduce a typedef-name.
Definition: Decl.h:3200
clang::VectorTypeLocInfo
Definition: TypeLoc.h:1784
clang::TypeLoc::findExplicitQualifierLoc
TypeLoc findExplicitQualifierLoc() const
Find a type with the location of an explicit type qualifier.
Definition: TypeLoc.cpp:449
clang::TypeOfTypeLoc::getUnderlyingType
QualType getUnderlyingType() const
Definition: TypeLoc.h:2005
clang::ObjCTypeParamTypeLoc::getProtocol
ObjCProtocolDecl * getProtocol(unsigned i) const
Definition: TypeLoc.h:811
clang::PointerLikeLocInfo::StarLoc
SourceLocation StarLoc
Definition: TypeLoc.h:1224
clang::MemberPointerTypeLoc::getStarLoc
SourceLocation getStarLoc() const
Definition: TypeLoc.h:1292
clang::UnaryTransformTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2070
clang::BuiltinTypeLoc::setWrittenTypeSpec
void setWrittenTypeSpec(TypeSpecifierType written)
Definition: TypeLoc.h:639
clang::DependentNameTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:2348
clang::TypeofLikeTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:1960
clang::DependentAddressSpaceLocInfo::OperandParens
SourceRange OperandParens
Definition: TypeLoc.h:1709
clang::PipeTypeLocInfo
Definition: TypeLoc.h:2586
clang::FunctionTypeLoc::getReturnLoc
TypeLoc getReturnLoc() const
Definition: TypeLoc.h:1467
clang::MatrixTypeLoc::getAttrOperandParensRange
SourceRange getAttrOperandParensRange() const
The location of the parentheses around the operand, if there is an operand.
Definition: TypeLoc.h:1891
clang::ObjCObjectTypeLoc::setProtocolRAngleLoc
void setProtocolRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:998
clang::DependentTemplateSpecializationTypeLoc::getArgLoc
TemplateArgumentLoc getArgLoc(unsigned i) const
Definition: TypeLoc.h:2457
clang::TypeSpecTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:527
clang::QualifiedTypeLoc::getUnqualifiedLoc
UnqualTypeLoc getUnqualifiedLoc() const
Definition: TypeLoc.h:281
clang::ArrayTypeLoc::getLBracketLoc
SourceLocation getLBracketLoc() const
Definition: TypeLoc.h:1521
clang::TypeLoc::getSourceRange
SourceRange getSourceRange() const LLVM_READONLY
Get the full source range.
Definition: TypeLoc.h:152
clang::ObjCObjectTypeLoc::setTypeArgsLAngleLoc
void setTypeArgsLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:960
clang::QualType::getTypePtr
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
Definition: Type.h:6500
clang::RecordType::getDecl
RecordDecl * getDecl() const
Definition: Type.h:4657
clang::DependentTemplateSpecializationTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:2480
clang::InheritingConcreteTypeLoc::getTypePtr
const TypeClass * getTypePtr() const
Definition: TypeLoc.h:502
clang::AttributedType::getAttrKind
Kind getAttrKind() const
Definition: Type.h:4720
clang::UsingType::getUnderlyingType
QualType getUnderlyingType() const
Definition: Type.cpp:3447
clang::ObjCInterfaceTypeLoc::getIFaceDecl
ObjCInterfaceDecl * getIFaceDecl() const
Definition: TypeLoc.h:1077
clang::AutoType::isDecltypeAuto
bool isDecltypeAuto() const
Definition: Type.h:5090
clang::TypeLoc::initializeFullCopy
void initializeFullCopy(TypeLoc Other)
Initializes this by copying its information from another TypeLoc of the same type.
Definition: TypeLoc.h:202
clang::FunctionTypeLoc::setLParenLoc
void setLParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1422
clang::FunctionProtoTypeLoc
Definition: TypeLoc.h:1498
clang::ElaboratedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:531
clang::BuiltinTypeLoc::getWrittenBuiltinSpecs
WrittenBuiltinSpecs & getWrittenBuiltinSpecs()
Definition: TypeLoc.h:575
clang::TypeLoc::initializeFullCopy
void initializeFullCopy(TypeLoc Other, unsigned Size)
Initializes this by copying its information from another TypeLoc of the same type.
Definition: TypeLoc.h:210
clang::TemplateSpecializationTypeLoc::getArgLocInfo
TemplateArgumentLocInfo getArgLocInfo(unsigned i) const
Definition: TypeLoc.h:1644
clang::AtomicTypeLoc::getKWLoc
SourceLocation getKWLoc() const
Definition: TypeLoc.h:2542
clang::TypeLoc::castAs
T castAs() const
Convert to the specified TypeLoc type, asserting that this TypeLoc is of the desired type.
Definition: TypeLoc.h:77
clang::TypeofLocInfo::LParenLoc
SourceLocation LParenLoc
Definition: TypeLoc.h:1929
clang::BTFTagAttributedTypeLoc::getWrappedLoc
TypeLoc getWrappedLoc() const
Definition: TypeLoc.h:911
clang::AutoTypeLoc::getNamedConcept
ConceptDecl * getNamedConcept() const
Definition: TypeLoc.h:2164
clang::ObjCObjectTypeLocInfo::TypeArgsRAngleLoc
SourceLocation TypeArgsRAngleLoc
Definition: TypeLoc.h:929
clang::ObjCInterfaceLocInfo::NameEndLoc
SourceLocation NameEndLoc
Definition: TypeLoc.h:1068
clang::ObjCTypeParamTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:769
clang::InjectedClassNameType::getDecl
CXXRecordDecl * getDecl() const
Definition: Type.cpp:3636
clang::NestedNameSpecifierLoc::getBeginLoc
SourceLocation getBeginLoc() const
Retrieve the location of the beginning of this nested-name-specifier.
Definition: NestedNameSpecifier.h:299
clang::DependentAddressSpaceTypeLoc::getAttrNameLoc
SourceLocation getAttrNameLoc() const
The location of the attribute name, i.e.
Definition: TypeLoc.h:1722
clang::AutoTypeLoc::getConceptNameLoc
SourceLocation getConceptNameLoc() const
Definition: TypeLoc.h:2148
clang::ArrayType::getElementType
QualType getElementType() const
Definition: Type.h:2917
clang::Expr
This represents one expression.
Definition: Expr.h:109
clang::TypeofLikeTypeLoc::getTypeofLoc
SourceLocation getTypeofLoc() const
Definition: TypeLoc.h:1944
clang::AutoTypeLoc::setArgLocInfo
void setArgLocInfo(unsigned i, TemplateArgumentLocInfo AI)
Definition: TypeLoc.h:2194
clang::ObjCObjectTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1061
clang::DependentTemplateSpecializationTypeLoc::getNumArgs
unsigned getNumArgs() const
Definition: TypeLoc.h:2445
clang::ObjCObjectTypeLoc::getNumTypeArgs
unsigned getNumTypeArgs() const
Definition: TypeLoc.h:972
clang::ConcreteTypeLoc::copyLocal
void copyLocal(Derived other)
Definition: TypeLoc.h:391
clang::PipeTypeLoc::getKWLoc
SourceLocation getKWLoc() const
Definition: TypeLoc.h:2597
clang::BuiltinTypeLoc::getWrittenBuiltinSpecs
const WrittenBuiltinSpecs & getWrittenBuiltinSpecs() const
Definition: TypeLoc.h:578
clang::WrittenBuiltinSpecs::Width
unsigned Width
Definition: Specifiers.h:102
clang::RValueReferenceTypeLoc
Definition: TypeLoc.h:1361
clang::BTFTagAttributedTypeLoc::getAttr
const BTFTypeTagAttr * getAttr() const
The btf_type_tag attribute.
Definition: TypeLoc.h:914
clang::DeclarationNameInfo
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Definition: DeclarationName.h:767
clang::TypeOfTypeLoc
Definition: TypeLoc.h:2002
clang::BTFTagAttributedTypeLoc::getAttrAs
T * getAttrAs()
Definition: TypeLoc.h:916
clang::DependentAddressSpaceTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1750
clang::AttributedType::getModifiedType
QualType getModifiedType() const
Definition: Type.h:4724
clang::DependentNameTypeLoc::copy
void copy(DependentNameTypeLoc Loc)
Definition: TypeLoc.h:2359
clang::AtomicTypeLocInfo::KWLoc
SourceLocation KWLoc
Definition: TypeLoc.h:2528
clang::VectorTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1805
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3901
clang::AtomicTypeLoc::getValueLoc
TypeLoc getValueLoc() const
Definition: TypeLoc.h:2534
clang::ObjCProtocolLoc
Definition: TypeLoc.h:2635
clang::FunctionTypeLoc::getParensRange
SourceRange getParensRange() const
Definition: TypeLoc.h:1434
clang::ObjCObjectType::getTypeArgsAsWritten
ArrayRef< QualType > getTypeArgsAsWritten() const
Retrieve the type arguments of this object type as they were written.
Definition: Type.h:6003
clang::WrittenBuiltinSpecs::ModeAttr
unsigned ModeAttr
Definition: Specifiers.h:103
clang::TemplateSpecializationTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:1697
clang::AutoTypeLoc::setLAngleLoc
void setLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:2178
clang::TemplateArgumentLocInfo
Location information for a TemplateArgument.
Definition: TemplateBase.h:405
clang::DependentTemplateSpecializationLocInfo
Definition: TypeLoc.h:2368
clang::AdjustedType::getOriginalType
QualType getOriginalType() const
Definition: Type.h:2695
clang::TypeOfTypeLocInfo
Definition: TypeLoc.h:1936
clang::WrittenBuiltinSpecs
Structure that packs information about the type specifiers that were written in a particular type spe...
Definition: Specifiers.h:98
clang::VectorTypeLoc::getElementLoc
TypeLoc getElementLoc() const
Definition: TypeLoc.h:1803
clang::DeducedTemplateSpecializationTypeLoc
Definition: TypeLoc.h:2239
clang::QualType::hasLocalQualifiers
bool hasLocalQualifiers() const
Determine whether this particular QualType instance has any qualifiers, without looking through any t...
Definition: Type.h:777
clang::MacroQualifiedTypeLoc
Definition: TypeLoc.h:1111
clang::TypeSourceInfo::getTypeLoc
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
Definition: TypeLoc.h:244
clang::TemplateNameLocInfo
Definition: TypeLoc.h:1596
clang::TypeLoc::getNextTypeLoc
TypeLoc getNextTypeLoc() const
Get the next TypeLoc pointed by this TypeLoc, e.g for "int*" the TypeLoc is a PointerLoc and next Typ...
Definition: TypeLoc.h:169
clang::TypeSpecifierType
TypeSpecifierType
Specifies the kind of type.
Definition: Specifiers.h:52
clang::DependentNameLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:2316
clang::TypedefTypeLoc
Wrapper for source info for typedefs.
Definition: TypeLoc.h:679
clang::AdjustedTypeLoc::getLocalDataSize
unsigned getLocalDataSize() const
Definition: TypeLoc.h:1210
Type
MatchType Type
Definition: ASTMatchFinder.cpp:71
clang::AutoTypeLoc::getNumArgs
unsigned getNumArgs() const
Definition: TypeLoc.h:2190
clang::DependentSizedExtVectorTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1856