clang  14.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 typedefs.
669 class TypedefTypeLoc : public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
670  TypedefTypeLoc,
671  TypedefType> {
672 public:
674  return getTypePtr()->getDecl();
675  }
676 };
677 
678 /// Wrapper for source info for injected class names of class
679 /// templates.
681  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
682  InjectedClassNameTypeLoc,
683  InjectedClassNameType> {
684 public:
686  return getTypePtr()->getDecl();
687  }
688 };
689 
690 /// Wrapper for source info for unresolved typename using decls.
692  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
693  UnresolvedUsingTypeLoc,
694  UnresolvedUsingType> {
695 public:
697  return getTypePtr()->getDecl();
698  }
699 };
700 
701 /// Wrapper for source info for tag types. Note that this only
702 /// records source info for the name itself; a type written 'struct foo'
703 /// should be represented as an ElaboratedTypeLoc. We currently
704 /// only do that when C++ is enabled because of the expense of
705 /// creating an ElaboratedType node for so many type references in C.
706 class TagTypeLoc : public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
707  TagTypeLoc,
708  TagType> {
709 public:
710  TagDecl *getDecl() const { return getTypePtr()->getDecl(); }
711 
712  /// True if the tag was defined in this type specifier.
713  bool isDefinition() const;
714 };
715 
716 /// Wrapper for source info for record types.
717 class RecordTypeLoc : public InheritingConcreteTypeLoc<TagTypeLoc,
718  RecordTypeLoc,
719  RecordType> {
720 public:
721  RecordDecl *getDecl() const { return getTypePtr()->getDecl(); }
722 };
723 
724 /// Wrapper for source info for enum types.
725 class EnumTypeLoc : public InheritingConcreteTypeLoc<TagTypeLoc,
726  EnumTypeLoc,
727  EnumType> {
728 public:
729  EnumDecl *getDecl() const { return getTypePtr()->getDecl(); }
730 };
731 
732 /// Wrapper for template type parameters.
734  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
735  TemplateTypeParmTypeLoc,
736  TemplateTypeParmType> {
737 public:
738  TemplateTypeParmDecl *getDecl() const { return getTypePtr()->getDecl(); }
739 };
740 
743 };
744 
745 /// ProtocolLAngleLoc, ProtocolRAngleLoc, and the source locations for
746 /// protocol qualifiers are stored after Info.
747 class ObjCTypeParamTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
748  ObjCTypeParamTypeLoc,
749  ObjCTypeParamType,
750  ObjCTypeParamTypeLocInfo> {
751  // SourceLocations are stored after Info, one for each protocol qualifier.
752  SourceLocation *getProtocolLocArray() const {
753  return (SourceLocation*)this->getExtraLocalData() + 2;
754  }
755 
756 public:
757  ObjCTypeParamDecl *getDecl() const { return getTypePtr()->getDecl(); }
758 
760  return this->getLocalData()->NameLoc;
761  }
762 
764  this->getLocalData()->NameLoc = Loc;
765  }
766 
768  return getNumProtocols() ?
769  *((SourceLocation*)this->getExtraLocalData()) :
770  SourceLocation();
771  }
772 
774  *((SourceLocation*)this->getExtraLocalData()) = Loc;
775  }
776 
778  return getNumProtocols() ?
779  *((SourceLocation*)this->getExtraLocalData() + 1) :
780  SourceLocation();
781  }
782 
784  *((SourceLocation*)this->getExtraLocalData() + 1) = Loc;
785  }
786 
787  unsigned getNumProtocols() const {
788  return this->getTypePtr()->getNumProtocols();
789  }
790 
791  SourceLocation getProtocolLoc(unsigned i) const {
792  assert(i < getNumProtocols() && "Index is out of bounds!");
793  return getProtocolLocArray()[i];
794  }
795 
796  void setProtocolLoc(unsigned i, SourceLocation Loc) {
797  assert(i < getNumProtocols() && "Index is out of bounds!");
798  getProtocolLocArray()[i] = Loc;
799  }
800 
801  ObjCProtocolDecl *getProtocol(unsigned i) const {
802  assert(i < getNumProtocols() && "Index is out of bounds!");
803  return *(this->getTypePtr()->qual_begin() + i);
804  }
805 
807  return llvm::makeArrayRef(getProtocolLocArray(), getNumProtocols());
808  }
809 
810  void initializeLocal(ASTContext &Context, SourceLocation Loc);
811 
812  unsigned getExtraLocalDataSize() const {
813  if (!this->getNumProtocols()) return 0;
814  // When there are protocol qualifers, we have LAngleLoc and RAngleLoc
815  // as well.
816  return (this->getNumProtocols() + 2) * sizeof(SourceLocation) ;
817  }
818 
819  unsigned getExtraLocalDataAlignment() const {
820  return alignof(SourceLocation);
821  }
822 
824  SourceLocation start = getNameLoc();
826  if (end.isInvalid()) return SourceRange(start, start);
827  return SourceRange(start, end);
828  }
829 };
830 
831 /// Wrapper for substituted template type parameters.
833  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
834  SubstTemplateTypeParmTypeLoc,
835  SubstTemplateTypeParmType> {
836 };
837 
838  /// Wrapper for substituted template type parameters.
840  public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
841  SubstTemplateTypeParmPackTypeLoc,
842  SubstTemplateTypeParmPackType> {
843 };
844 
846  const Attr *TypeAttr;
847 };
848 
849 /// Type source information for an attributed type.
850 class AttributedTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
851  AttributedTypeLoc,
852  AttributedType,
853  AttributedLocInfo> {
854 public:
856  return getTypePtr()->getAttrKind();
857  }
858 
859  bool isQualifier() const {
860  return getTypePtr()->isQualifier();
861  }
862 
863  /// The modified type, which is generally canonically different from
864  /// the attribute type.
865  /// int main(int, char**) __attribute__((noreturn))
866  /// ~~~ ~~~~~~~~~~~~~
868  return getInnerTypeLoc();
869  }
870 
871  /// The type attribute.
872  const Attr *getAttr() const {
873  return getLocalData()->TypeAttr;
874  }
875  void setAttr(const Attr *A) {
876  getLocalData()->TypeAttr = A;
877  }
878 
879  template<typename T> const T *getAttrAs() {
880  return dyn_cast_or_null<T>(getAttr());
881  }
882 
884 
886  setAttr(nullptr);
887  }
888 
890  return getTypePtr()->getModifiedType();
891  }
892 };
893 
900 };
901 
902 // A helper class for defining ObjC TypeLocs that can qualified with
903 // protocols.
904 //
905 // TypeClass basically has to be either ObjCInterfaceType or
906 // ObjCObjectPointerType.
907 class ObjCObjectTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
908  ObjCObjectTypeLoc,
909  ObjCObjectType,
910  ObjCObjectTypeLocInfo> {
911  // TypeSourceInfo*'s are stored after Info, one for each type argument.
912  TypeSourceInfo **getTypeArgLocArray() const {
913  return (TypeSourceInfo**)this->getExtraLocalData();
914  }
915 
916  // SourceLocations are stored after the type argument information, one for
917  // each Protocol.
918  SourceLocation *getProtocolLocArray() const {
919  return (SourceLocation*)(getTypeArgLocArray() + getNumTypeArgs());
920  }
921 
922 public:
924  return this->getLocalData()->TypeArgsLAngleLoc;
925  }
926 
928  this->getLocalData()->TypeArgsLAngleLoc = Loc;
929  }
930 
932  return this->getLocalData()->TypeArgsRAngleLoc;
933  }
934 
936  this->getLocalData()->TypeArgsRAngleLoc = Loc;
937  }
938 
939  unsigned getNumTypeArgs() const {
940  return this->getTypePtr()->getTypeArgsAsWritten().size();
941  }
942 
943  TypeSourceInfo *getTypeArgTInfo(unsigned i) const {
944  assert(i < getNumTypeArgs() && "Index is out of bounds!");
945  return getTypeArgLocArray()[i];
946  }
947 
948  void setTypeArgTInfo(unsigned i, TypeSourceInfo *TInfo) {
949  assert(i < getNumTypeArgs() && "Index is out of bounds!");
950  getTypeArgLocArray()[i] = TInfo;
951  }
952 
954  return this->getLocalData()->ProtocolLAngleLoc;
955  }
956 
958  this->getLocalData()->ProtocolLAngleLoc = Loc;
959  }
960 
962  return this->getLocalData()->ProtocolRAngleLoc;
963  }
964 
966  this->getLocalData()->ProtocolRAngleLoc = Loc;
967  }
968 
969  unsigned getNumProtocols() const {
970  return this->getTypePtr()->getNumProtocols();
971  }
972 
973  SourceLocation getProtocolLoc(unsigned i) const {
974  assert(i < getNumProtocols() && "Index is out of bounds!");
975  return getProtocolLocArray()[i];
976  }
977 
978  void setProtocolLoc(unsigned i, SourceLocation Loc) {
979  assert(i < getNumProtocols() && "Index is out of bounds!");
980  getProtocolLocArray()[i] = Loc;
981  }
982 
983  ObjCProtocolDecl *getProtocol(unsigned i) const {
984  assert(i < getNumProtocols() && "Index is out of bounds!");
985  return *(this->getTypePtr()->qual_begin() + i);
986  }
987 
988 
990  return llvm::makeArrayRef(getProtocolLocArray(), getNumProtocols());
991  }
992 
993  bool hasBaseTypeAsWritten() const {
995  }
996 
997  void setHasBaseTypeAsWritten(bool HasBaseType) {
998  getLocalData()->HasBaseTypeAsWritten = HasBaseType;
999  }
1000 
1002  return getInnerTypeLoc();
1003  }
1004 
1007  if (start.isInvalid())
1008  start = getProtocolLAngleLoc();
1010  if (end.isInvalid())
1011  end = getTypeArgsRAngleLoc();
1012  return SourceRange(start, end);
1013  }
1014 
1015  void initializeLocal(ASTContext &Context, SourceLocation Loc);
1016 
1017  unsigned getExtraLocalDataSize() const {
1018  return this->getNumTypeArgs() * sizeof(TypeSourceInfo *)
1019  + this->getNumProtocols() * sizeof(SourceLocation);
1020  }
1021 
1022  unsigned getExtraLocalDataAlignment() const {
1023  static_assert(alignof(ObjCObjectTypeLoc) >= alignof(TypeSourceInfo *),
1024  "not enough alignment for tail-allocated data");
1025  return alignof(TypeSourceInfo *);
1026  }
1027 
1029  return getTypePtr()->getBaseType();
1030  }
1031 };
1032 
1036 };
1037 
1038 /// Wrapper for source info for ObjC interfaces.
1039 class ObjCInterfaceTypeLoc : public ConcreteTypeLoc<ObjCObjectTypeLoc,
1040  ObjCInterfaceTypeLoc,
1041  ObjCInterfaceType,
1042  ObjCInterfaceLocInfo> {
1043 public:
1045  return getTypePtr()->getDecl();
1046  }
1047 
1049  return getLocalData()->NameLoc;
1050  }
1051 
1053  getLocalData()->NameLoc = Loc;
1054  }
1055 
1057  return SourceRange(getNameLoc(), getNameEndLoc());
1058  }
1059 
1061  return getLocalData()->NameEndLoc;
1062  }
1063 
1065  getLocalData()->NameEndLoc = Loc;
1066  }
1067 
1069  setNameLoc(Loc);
1070  setNameEndLoc(Loc);
1071  }
1072 };
1073 
1076 };
1077 
1079  : public ConcreteTypeLoc<UnqualTypeLoc, MacroQualifiedTypeLoc,
1080  MacroQualifiedType, MacroQualifiedLocInfo> {
1081 public:
1083  setExpansionLoc(Loc);
1084  }
1085 
1086  TypeLoc getInnerLoc() const { return getInnerTypeLoc(); }
1087 
1089  return getTypePtr()->getMacroIdentifier();
1090  }
1091 
1093  return this->getLocalData()->ExpansionLoc;
1094  }
1095 
1097  this->getLocalData()->ExpansionLoc = Loc;
1098  }
1099 
1101 
1103  return getInnerLoc().getLocalSourceRange();
1104  }
1105 };
1106 
1110 };
1111 
1113  : public ConcreteTypeLoc<UnqualTypeLoc, ParenTypeLoc, ParenType,
1114  ParenLocInfo> {
1115 public:
1117  return this->getLocalData()->LParenLoc;
1118  }
1119 
1121  return this->getLocalData()->RParenLoc;
1122  }
1123 
1125  this->getLocalData()->LParenLoc = Loc;
1126  }
1127 
1129  this->getLocalData()->RParenLoc = Loc;
1130  }
1131 
1133  return SourceRange(getLParenLoc(), getRParenLoc());
1134  }
1135 
1137  setLParenLoc(Loc);
1138  setRParenLoc(Loc);
1139  }
1140 
1142  return getInnerTypeLoc();
1143  }
1144 
1146  return this->getTypePtr()->getInnerType();
1147  }
1148 };
1149 
1151  if (ParenTypeLoc::isKind(*this))
1152  return IgnoreParensImpl(*this);
1153  return *this;
1154 }
1155 
1156 struct AdjustedLocInfo {}; // Nothing.
1157 
1158 class AdjustedTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, AdjustedTypeLoc,
1159  AdjustedType, AdjustedLocInfo> {
1160 public:
1162  return getInnerTypeLoc();
1163  }
1164 
1166  // do nothing
1167  }
1168 
1170  // The inner type is the undecayed type, since that's what we have source
1171  // location information for.
1172  return getTypePtr()->getOriginalType();
1173  }
1174 
1175  SourceRange getLocalSourceRange() const { return {}; }
1176 
1177  unsigned getLocalDataSize() const {
1178  // sizeof(AdjustedLocInfo) is 1, but we don't need its address to be unique
1179  // anyway. TypeLocBuilder can't handle data sizes of 1.
1180  return 0; // No data.
1181  }
1182 };
1183 
1184 /// Wrapper for source info for pointers decayed from arrays and
1185 /// functions.
1187  AdjustedTypeLoc, DecayedTypeLoc, DecayedType> {
1188 };
1189 
1192 };
1193 
1194 /// A base class for
1195 template <class Derived, class TypeClass, class LocalData = PointerLikeLocInfo>
1196 class PointerLikeTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, Derived,
1197  TypeClass, LocalData> {
1198 public:
1200  return this->getLocalData()->StarLoc;
1201  }
1202 
1204  this->getLocalData()->StarLoc = Loc;
1205  }
1206 
1208  return this->getInnerTypeLoc();
1209  }
1210 
1212  return SourceRange(getSigilLoc(), getSigilLoc());
1213  }
1214 
1216  setSigilLoc(Loc);
1217  }
1218 
1220  return this->getTypePtr()->getPointeeType();
1221  }
1222 };
1223 
1224 /// Wrapper for source info for pointers.
1225 class PointerTypeLoc : public PointerLikeTypeLoc<PointerTypeLoc,
1226  PointerType> {
1227 public:
1229  return getSigilLoc();
1230  }
1231 
1233  setSigilLoc(Loc);
1234  }
1235 };
1236 
1237 /// Wrapper for source info for block pointers.
1238 class BlockPointerTypeLoc : public PointerLikeTypeLoc<BlockPointerTypeLoc,
1239  BlockPointerType> {
1240 public:
1242  return getSigilLoc();
1243  }
1244 
1246  setSigilLoc(Loc);
1247  }
1248 };
1249 
1252 };
1253 
1254 /// Wrapper for source info for member pointers.
1255 class MemberPointerTypeLoc : public PointerLikeTypeLoc<MemberPointerTypeLoc,
1256  MemberPointerType,
1257  MemberPointerLocInfo> {
1258 public:
1260  return getSigilLoc();
1261  }
1262 
1264  setSigilLoc(Loc);
1265  }
1266 
1267  const Type *getClass() const {
1268  return getTypePtr()->getClass();
1269  }
1270 
1272  return getLocalData()->ClassTInfo;
1273  }
1274 
1276  getLocalData()->ClassTInfo = TI;
1277  }
1278 
1280  setSigilLoc(Loc);
1281  setClassTInfo(nullptr);
1282  }
1283 
1285  if (TypeSourceInfo *TI = getClassTInfo())
1286  return SourceRange(TI->getTypeLoc().getBeginLoc(), getStarLoc());
1287  else
1288  return SourceRange(getStarLoc());
1289  }
1290 };
1291 
1292 /// Wraps an ObjCPointerType with source location information.
1294  public PointerLikeTypeLoc<ObjCObjectPointerTypeLoc,
1295  ObjCObjectPointerType> {
1296 public:
1298  return getSigilLoc();
1299  }
1300 
1302  setSigilLoc(Loc);
1303  }
1304 };
1305 
1306 class ReferenceTypeLoc : public PointerLikeTypeLoc<ReferenceTypeLoc,
1307  ReferenceType> {
1308 public:
1310  return getTypePtr()->getPointeeTypeAsWritten();
1311  }
1312 };
1313 
1315  public InheritingConcreteTypeLoc<ReferenceTypeLoc,
1316  LValueReferenceTypeLoc,
1317  LValueReferenceType> {
1318 public:
1320  return getSigilLoc();
1321  }
1322 
1324  setSigilLoc(Loc);
1325  }
1326 };
1327 
1329  public InheritingConcreteTypeLoc<ReferenceTypeLoc,
1330  RValueReferenceTypeLoc,
1331  RValueReferenceType> {
1332 public:
1334  return getSigilLoc();
1335  }
1336 
1338  setSigilLoc(Loc);
1339  }
1340 };
1341 
1347 };
1348 
1349 /// Wrapper for source info for functions.
1350 class FunctionTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
1351  FunctionTypeLoc,
1352  FunctionType,
1353  FunctionLocInfo> {
1354  bool hasExceptionSpec() const {
1355  if (auto *FPT = dyn_cast<FunctionProtoType>(getTypePtr())) {
1356  return FPT->hasExceptionSpec();
1357  }
1358  return false;
1359  }
1360 
1361  SourceRange *getExceptionSpecRangePtr() const {
1362  assert(hasExceptionSpec() && "No exception spec range");
1363  // After the Info comes the ParmVarDecl array, and after that comes the
1364  // exception specification information.
1365  return (SourceRange *)(getParmArray() + getNumParams());
1366  }
1367 
1368 public:
1370  return getLocalData()->LocalRangeBegin;
1371  }
1372 
1375  }
1376 
1378  return getLocalData()->LocalRangeEnd;
1379  }
1380 
1382  getLocalData()->LocalRangeEnd = L;
1383  }
1384 
1386  return this->getLocalData()->LParenLoc;
1387  }
1388 
1390  this->getLocalData()->LParenLoc = Loc;
1391  }
1392 
1394  return this->getLocalData()->RParenLoc;
1395  }
1396 
1398  this->getLocalData()->RParenLoc = Loc;
1399  }
1400 
1402  return SourceRange(getLParenLoc(), getRParenLoc());
1403  }
1404 
1406  if (hasExceptionSpec())
1407  return *getExceptionSpecRangePtr();
1408  return {};
1409  }
1410 
1412  if (hasExceptionSpec())
1413  *getExceptionSpecRangePtr() = R;
1414  }
1415 
1417  return llvm::makeArrayRef(getParmArray(), getNumParams());
1418  }
1419 
1420  // ParmVarDecls* are stored after Info, one for each parameter.
1422  return (ParmVarDecl**) getExtraLocalData();
1423  }
1424 
1425  unsigned getNumParams() const {
1426  if (isa<FunctionNoProtoType>(getTypePtr()))
1427  return 0;
1428  return cast<FunctionProtoType>(getTypePtr())->getNumParams();
1429  }
1430 
1431  ParmVarDecl *getParam(unsigned i) const { return getParmArray()[i]; }
1432  void setParam(unsigned i, ParmVarDecl *VD) { getParmArray()[i] = VD; }
1433 
1435  return getInnerTypeLoc();
1436  }
1437 
1440  }
1441 
1443  setLocalRangeBegin(Loc);
1444  setLParenLoc(Loc);
1445  setRParenLoc(Loc);
1446  setLocalRangeEnd(Loc);
1447  for (unsigned i = 0, e = getNumParams(); i != e; ++i)
1448  setParam(i, nullptr);
1449  if (hasExceptionSpec())
1450  setExceptionSpecRange(Loc);
1451  }
1452 
1453  /// Returns the size of the type source info data block that is
1454  /// specific to this type.
1455  unsigned getExtraLocalDataSize() const {
1456  unsigned ExceptSpecSize = hasExceptionSpec() ? sizeof(SourceRange) : 0;
1457  return (getNumParams() * sizeof(ParmVarDecl *)) + ExceptSpecSize;
1458  }
1459 
1460  unsigned getExtraLocalDataAlignment() const { return alignof(ParmVarDecl *); }
1461 
1463 };
1464 
1466  public InheritingConcreteTypeLoc<FunctionTypeLoc,
1467  FunctionProtoTypeLoc,
1468  FunctionProtoType> {
1469 };
1470 
1472  public InheritingConcreteTypeLoc<FunctionTypeLoc,
1473  FunctionNoProtoTypeLoc,
1474  FunctionNoProtoType> {
1475 };
1476 
1480 };
1481 
1482 /// Wrapper for source info for arrays.
1483 class ArrayTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
1484  ArrayTypeLoc,
1485  ArrayType,
1486  ArrayLocInfo> {
1487 public:
1489  return getLocalData()->LBracketLoc;
1490  }
1491 
1493  getLocalData()->LBracketLoc = Loc;
1494  }
1495 
1497  return getLocalData()->RBracketLoc;
1498  }
1499 
1501  getLocalData()->RBracketLoc = Loc;
1502  }
1503 
1506  }
1507 
1508  Expr *getSizeExpr() const {
1509  return getLocalData()->Size;
1510  }
1511 
1512  void setSizeExpr(Expr *Size) {
1513  getLocalData()->Size = Size;
1514  }
1515 
1517  return getInnerTypeLoc();
1518  }
1519 
1522  }
1523 
1525  setLBracketLoc(Loc);
1526  setRBracketLoc(Loc);
1527  setSizeExpr(nullptr);
1528  }
1529 
1531 };
1532 
1534  public InheritingConcreteTypeLoc<ArrayTypeLoc,
1535  ConstantArrayTypeLoc,
1536  ConstantArrayType> {
1537 };
1538 
1540  public InheritingConcreteTypeLoc<ArrayTypeLoc,
1541  IncompleteArrayTypeLoc,
1542  IncompleteArrayType> {
1543 };
1544 
1546  public InheritingConcreteTypeLoc<ArrayTypeLoc,
1547  DependentSizedArrayTypeLoc,
1548  DependentSizedArrayType> {
1549 public:
1551  ArrayTypeLoc::initializeLocal(Context, Loc);
1553  }
1554 };
1555 
1557  public InheritingConcreteTypeLoc<ArrayTypeLoc,
1558  VariableArrayTypeLoc,
1559  VariableArrayType> {
1560 };
1561 
1562 // Location information for a TemplateName. Rudimentary for now.
1565 };
1566 
1571 };
1572 
1574  public ConcreteTypeLoc<UnqualTypeLoc,
1575  TemplateSpecializationTypeLoc,
1576  TemplateSpecializationType,
1577  TemplateSpecializationLocInfo> {
1578 public:
1580  return getLocalData()->TemplateKWLoc;
1581  }
1582 
1584  getLocalData()->TemplateKWLoc = Loc;
1585  }
1586 
1588  return getLocalData()->LAngleLoc;
1589  }
1590 
1592  getLocalData()->LAngleLoc = Loc;
1593  }
1594 
1596  return getLocalData()->RAngleLoc;
1597  }
1598 
1600  getLocalData()->RAngleLoc = Loc;
1601  }
1602 
1603  unsigned getNumArgs() const {
1604  return getTypePtr()->getNumArgs();
1605  }
1606 
1608  getArgInfos()[i] = AI;
1609  }
1610 
1612  return getArgInfos()[i];
1613  }
1614 
1615  TemplateArgumentLoc getArgLoc(unsigned i) const {
1616  return TemplateArgumentLoc(getTypePtr()->getArg(i), getArgLocInfo(i));
1617  }
1618 
1620  return getLocalData()->NameLoc;
1621  }
1622 
1624  getLocalData()->NameLoc = Loc;
1625  }
1626 
1627  /// - Copy the location information from the given info.
1629  unsigned size = getFullDataSize();
1630  assert(size == Loc.getFullDataSize());
1631 
1632  // We're potentially copying Expr references here. We don't
1633  // bother retaining them because TypeSourceInfos live forever, so
1634  // as long as the Expr was retained when originally written into
1635  // the TypeLoc, we're okay.
1636  memcpy(Data, Loc.Data, size);
1637  }
1638 
1640  if (getTemplateKeywordLoc().isValid())
1642  else
1644  }
1645 
1647  setTemplateKeywordLoc(Loc);
1648  setTemplateNameLoc(Loc);
1649  setLAngleLoc(Loc);
1650  setRAngleLoc(Loc);
1651  initializeArgLocs(Context, getNumArgs(), getTypePtr()->getArgs(),
1652  getArgInfos(), Loc);
1653  }
1654 
1655  static void initializeArgLocs(ASTContext &Context, unsigned NumArgs,
1656  const TemplateArgument *Args,
1657  TemplateArgumentLocInfo *ArgInfos,
1658  SourceLocation Loc);
1659 
1660  unsigned getExtraLocalDataSize() const {
1661  return getNumArgs() * sizeof(TemplateArgumentLocInfo);
1662  }
1663 
1664  unsigned getExtraLocalDataAlignment() const {
1665  return alignof(TemplateArgumentLocInfo);
1666  }
1667 
1668 private:
1669  TemplateArgumentLocInfo *getArgInfos() const {
1670  return static_cast<TemplateArgumentLocInfo*>(getExtraLocalData());
1671  }
1672 };
1673 
1678 };
1679 
1681  : public ConcreteTypeLoc<UnqualTypeLoc,
1682  DependentAddressSpaceTypeLoc,
1683  DependentAddressSpaceType,
1684  DependentAddressSpaceLocInfo> {
1685 public:
1686  /// The location of the attribute name, i.e.
1687  /// int * __attribute__((address_space(11)))
1688  /// ^~~~~~~~~~~~~
1690  return getLocalData()->AttrLoc;
1691  }
1693  getLocalData()->AttrLoc = loc;
1694  }
1695 
1696  /// The attribute's expression operand, if it has one.
1697  /// int * __attribute__((address_space(11)))
1698  /// ^~
1700  return getLocalData()->ExprOperand;
1701  }
1703  getLocalData()->ExprOperand = e;
1704  }
1705 
1706  /// The location of the parentheses around the operand, if there is
1707  /// an operand.
1708  /// int * __attribute__((address_space(11)))
1709  /// ^ ^
1711  return getLocalData()->OperandParens;
1712  }
1715  }
1716 
1719  range.setEnd(getAttrOperandParensRange().getEnd());
1720  return range;
1721  }
1722 
1723  /// Returns the type before the address space attribute application
1724  /// area.
1725  /// int * __attribute__((address_space(11))) *
1726  /// ^ ^
1728  return this->getTypePtr()->getPointeeType();
1729  }
1730 
1732  return this->getInnerTypeLoc();
1733  }
1734 
1736  setAttrNameLoc(loc);
1739  setAttrExprOperand(getTypePtr()->getAddrSpaceExpr());
1740  }
1741 };
1742 
1743 //===----------------------------------------------------------------------===//
1744 //
1745 // All of these need proper implementations.
1746 //
1747 //===----------------------------------------------------------------------===//
1748 
1749 // FIXME: size expression and attribute locations (or keyword if we
1750 // ever fully support altivec syntax).
1753 };
1754 
1755 class VectorTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, VectorTypeLoc,
1756  VectorType, VectorTypeLocInfo> {
1757 public:
1758  SourceLocation getNameLoc() const { return this->getLocalData()->NameLoc; }
1759 
1760  void setNameLoc(SourceLocation Loc) { this->getLocalData()->NameLoc = Loc; }
1761 
1763  return SourceRange(getNameLoc(), getNameLoc());
1764  }
1765 
1767  setNameLoc(Loc);
1768  }
1769 
1770  TypeLoc getElementLoc() const { return getInnerTypeLoc(); }
1771 
1772  QualType getInnerType() const { return this->getTypePtr()->getElementType(); }
1773 };
1774 
1775 // FIXME: size expression and attribute locations (or keyword if we
1776 // ever fully support altivec syntax).
1778  : public ConcreteTypeLoc<UnqualTypeLoc, DependentVectorTypeLoc,
1779  DependentVectorType, VectorTypeLocInfo> {
1780 public:
1781  SourceLocation getNameLoc() const { return this->getLocalData()->NameLoc; }
1782 
1783  void setNameLoc(SourceLocation Loc) { this->getLocalData()->NameLoc = Loc; }
1784 
1786  return SourceRange(getNameLoc(), getNameLoc());
1787  }
1788 
1790  setNameLoc(Loc);
1791  }
1792 
1793  TypeLoc getElementLoc() const { return getInnerTypeLoc(); }
1794 
1795  QualType getInnerType() const { return this->getTypePtr()->getElementType(); }
1796 };
1797 
1798 // FIXME: size expression and attribute locations.
1800  : public InheritingConcreteTypeLoc<VectorTypeLoc, ExtVectorTypeLoc,
1801  ExtVectorType> {};
1802 
1803 // FIXME: attribute locations.
1804 // For some reason, this isn't a subtype of VectorType.
1806  : public ConcreteTypeLoc<UnqualTypeLoc, DependentSizedExtVectorTypeLoc,
1807  DependentSizedExtVectorType, VectorTypeLocInfo> {
1808 public:
1809  SourceLocation getNameLoc() const { return this->getLocalData()->NameLoc; }
1810 
1811  void setNameLoc(SourceLocation Loc) { this->getLocalData()->NameLoc = Loc; }
1812 
1814  return SourceRange(getNameLoc(), getNameLoc());
1815  }
1816 
1818  setNameLoc(Loc);
1819  }
1820 
1821  TypeLoc getElementLoc() const { return getInnerTypeLoc(); }
1822 
1823  QualType getInnerType() const { return this->getTypePtr()->getElementType(); }
1824 };
1825 
1831 };
1832 
1833 class MatrixTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, MatrixTypeLoc,
1834  MatrixType, MatrixTypeLocInfo> {
1835 public:
1836  /// The location of the attribute name, i.e.
1837  /// float __attribute__((matrix_type(4, 2)))
1838  /// ^~~~~~~~~~~~~~~~~
1841 
1842  /// The attribute's row operand, if it has one.
1843  /// float __attribute__((matrix_type(4, 2)))
1844  /// ^
1847 
1848  /// The attribute's column operand, if it has one.
1849  /// float __attribute__((matrix_type(4, 2)))
1850  /// ^
1853 
1854  /// The location of the parentheses around the operand, if there is
1855  /// an operand.
1856  /// float __attribute__((matrix_type(4, 2)))
1857  /// ^ ^
1859  return getLocalData()->OperandParens;
1860  }
1863  }
1864 
1867  range.setEnd(getAttrOperandParensRange().getEnd());
1868  return range;
1869  }
1870 
1872  setAttrNameLoc(loc);
1874  setAttrRowOperand(nullptr);
1875  setAttrColumnOperand(nullptr);
1876  }
1877 };
1878 
1880  : public InheritingConcreteTypeLoc<MatrixTypeLoc, ConstantMatrixTypeLoc,
1881  ConstantMatrixType> {};
1882 
1884  : public InheritingConcreteTypeLoc<MatrixTypeLoc,
1885  DependentSizedMatrixTypeLoc,
1886  DependentSizedMatrixType> {};
1887 
1888 // FIXME: location of the '_Complex' keyword.
1889 class ComplexTypeLoc : public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
1890  ComplexTypeLoc,
1891  ComplexType> {
1892 };
1893 
1898 };
1899 
1901 };
1902 
1905 };
1906 
1907 template <class Derived, class TypeClass, class LocalData = TypeofLocInfo>
1909  : public ConcreteTypeLoc<UnqualTypeLoc, Derived, TypeClass, LocalData> {
1910 public:
1912  return this->getLocalData()->TypeofLoc;
1913  }
1914 
1916  this->getLocalData()->TypeofLoc = Loc;
1917  }
1918 
1920  return this->getLocalData()->LParenLoc;
1921  }
1922 
1924  this->getLocalData()->LParenLoc = Loc;
1925  }
1926 
1928  return this->getLocalData()->RParenLoc;
1929  }
1930 
1932  this->getLocalData()->RParenLoc = Loc;
1933  }
1934 
1936  return SourceRange(getLParenLoc(), getRParenLoc());
1937  }
1938 
1940  setLParenLoc(range.getBegin());
1941  setRParenLoc(range.getEnd());
1942  }
1943 
1945  return SourceRange(getTypeofLoc(), getRParenLoc());
1946  }
1947 
1949  setTypeofLoc(Loc);
1950  setLParenLoc(Loc);
1951  setRParenLoc(Loc);
1952  }
1953 };
1954 
1955 class TypeOfExprTypeLoc : public TypeofLikeTypeLoc<TypeOfExprTypeLoc,
1956  TypeOfExprType,
1957  TypeOfExprTypeLocInfo> {
1958 public:
1960  return getTypePtr()->getUnderlyingExpr();
1961  }
1962 
1963  // Reimplemented to account for GNU/C++ extension
1964  // typeof unary-expression
1965  // where there are no parentheses.
1967 };
1968 
1970  : public TypeofLikeTypeLoc<TypeOfTypeLoc, TypeOfType, TypeOfTypeLocInfo> {
1971 public:
1973  return this->getTypePtr()->getUnderlyingType();
1974  }
1975 
1977  return this->getLocalData()->UnderlyingTInfo;
1978  }
1979 
1981  this->getLocalData()->UnderlyingTInfo = TI;
1982  }
1983 
1984  void initializeLocal(ASTContext &Context, SourceLocation Loc);
1985 };
1986 
1987 // FIXME: location of the 'decltype' and parens.
1988 class DecltypeTypeLoc : public InheritingConcreteTypeLoc<TypeSpecTypeLoc,
1989  DecltypeTypeLoc,
1990  DecltypeType> {
1991 public:
1993 };
1994 
1996  // FIXME: While there's only one unary transform right now, future ones may
1997  // need different representations
2000 };
2001 
2002 class UnaryTransformTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
2003  UnaryTransformTypeLoc,
2004  UnaryTransformType,
2005  UnaryTransformTypeLocInfo> {
2006 public:
2008  void setKWLoc(SourceLocation Loc) { getLocalData()->KWLoc = Loc; }
2009 
2012 
2015 
2017  return getLocalData()->UnderlyingTInfo;
2018  }
2019 
2021  getLocalData()->UnderlyingTInfo = TInfo;
2022  }
2023 
2025  return SourceRange(getKWLoc(), getRParenLoc());
2026  }
2027 
2029  return SourceRange(getLParenLoc(), getRParenLoc());
2030  }
2031 
2033  setLParenLoc(Range.getBegin());
2034  setRParenLoc(Range.getEnd());
2035  }
2036 
2037  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2038 };
2039 
2041  : public InheritingConcreteTypeLoc<TypeSpecTypeLoc, DeducedTypeLoc,
2042  DeducedType> {};
2043 
2051 };
2052 
2054  : public ConcreteTypeLoc<DeducedTypeLoc,
2055  AutoTypeLoc,
2056  AutoType,
2057  AutoTypeLocInfo> {
2058 public:
2060  return getTypePtr()->getKeyword();
2061  }
2062 
2063  bool isConstrained() const {
2064  return getTypePtr()->isConstrained();
2065  }
2066 
2068  return getLocalData()->NestedNameSpec;
2069  }
2070 
2072  getLocalData()->NestedNameSpec = NNS;
2073  }
2074 
2076  return getLocalData()->TemplateKWLoc;
2077  }
2078 
2080  getLocalData()->TemplateKWLoc = Loc;
2081  }
2082 
2084  return getLocalData()->ConceptNameLoc;
2085  }
2086 
2088  getLocalData()->ConceptNameLoc = Loc;
2089  }
2090 
2092  return getLocalData()->FoundDecl;
2093  }
2094 
2096  getLocalData()->FoundDecl = D;
2097  }
2098 
2101  }
2102 
2104 
2106  return getLocalData()->LAngleLoc.isValid();
2107  }
2108 
2110  return this->getLocalData()->LAngleLoc;
2111  }
2112 
2114  this->getLocalData()->LAngleLoc = Loc;
2115  }
2116 
2118  return this->getLocalData()->RAngleLoc;
2119  }
2120 
2122  this->getLocalData()->RAngleLoc = Loc;
2123  }
2124 
2125  unsigned getNumArgs() const {
2126  return getTypePtr()->getNumArgs();
2127  }
2128 
2130  getArgInfos()[i] = AI;
2131  }
2132 
2134  return getArgInfos()[i];
2135  }
2136 
2137  TemplateArgumentLoc getArgLoc(unsigned i) const {
2138  return TemplateArgumentLoc(getTypePtr()->getTypeConstraintArguments()[i],
2139  getArgLocInfo(i));
2140  }
2141 
2143  return{
2144  isConstrained()
2147  : (getTemplateKWLoc().isValid()
2148  ? getTemplateKWLoc()
2149  : getConceptNameLoc()))
2150  : getNameLoc(),
2151  getNameLoc()
2152  };
2153  }
2154 
2155  void copy(AutoTypeLoc Loc) {
2156  unsigned size = getFullDataSize();
2157  assert(size == Loc.getFullDataSize());
2158  memcpy(Data, Loc.Data, size);
2159  }
2160 
2161  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2162 
2163  unsigned getExtraLocalDataSize() const {
2164  return getNumArgs() * sizeof(TemplateArgumentLocInfo);
2165  }
2166 
2167  unsigned getExtraLocalDataAlignment() const {
2168  return alignof(TemplateArgumentLocInfo);
2169  }
2170 
2171 private:
2172  TemplateArgumentLocInfo *getArgInfos() const {
2173  return static_cast<TemplateArgumentLocInfo*>(getExtraLocalData());
2174  }
2175 };
2176 
2178  : public InheritingConcreteTypeLoc<DeducedTypeLoc,
2179  DeducedTemplateSpecializationTypeLoc,
2180  DeducedTemplateSpecializationType> {
2181 public:
2183  return getNameLoc();
2184  }
2185 
2187  setNameLoc(Loc);
2188  }
2189 };
2190 
2193 
2194  /// Data associated with the nested-name-specifier location.
2196 };
2197 
2198 class ElaboratedTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
2199  ElaboratedTypeLoc,
2200  ElaboratedType,
2201  ElaboratedLocInfo> {
2202 public:
2204  return this->getLocalData()->ElaboratedKWLoc;
2205  }
2206 
2208  this->getLocalData()->ElaboratedKWLoc = Loc;
2209  }
2210 
2212  return NestedNameSpecifierLoc(getTypePtr()->getQualifier(),
2213  getLocalData()->QualifierData);
2214  }
2215 
2217  assert(QualifierLoc.getNestedNameSpecifier()
2218  == getTypePtr()->getQualifier() &&
2219  "Inconsistent nested-name-specifier pointer");
2220  getLocalData()->QualifierData = QualifierLoc.getOpaqueData();
2221  }
2222 
2224  if (getElaboratedKeywordLoc().isValid())
2225  if (getQualifierLoc())
2228  else
2230  else
2231  return getQualifierLoc().getSourceRange();
2232  }
2233 
2234  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2235 
2237  return getInnerTypeLoc();
2238  }
2239 
2241  return getTypePtr()->getNamedType();
2242  }
2243 
2245  unsigned size = getFullDataSize();
2246  assert(size == Loc.getFullDataSize());
2247  memcpy(Data, Loc.Data, size);
2248  }
2249 };
2250 
2251 // This is exactly the structure of an ElaboratedTypeLoc whose inner
2252 // type is some sort of TypeDeclTypeLoc.
2255 };
2256 
2257 class DependentNameTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc,
2258  DependentNameTypeLoc,
2259  DependentNameType,
2260  DependentNameLocInfo> {
2261 public:
2263  return this->getLocalData()->ElaboratedKWLoc;
2264  }
2265 
2267  this->getLocalData()->ElaboratedKWLoc = Loc;
2268  }
2269 
2271  return NestedNameSpecifierLoc(getTypePtr()->getQualifier(),
2272  getLocalData()->QualifierData);
2273  }
2274 
2276  assert(QualifierLoc.getNestedNameSpecifier()
2277  == getTypePtr()->getQualifier() &&
2278  "Inconsistent nested-name-specifier pointer");
2279  getLocalData()->QualifierData = QualifierLoc.getOpaqueData();
2280  }
2281 
2283  return this->getLocalData()->NameLoc;
2284  }
2285 
2287  this->getLocalData()->NameLoc = Loc;
2288  }
2289 
2291  if (getElaboratedKeywordLoc().isValid())
2293  else
2295  }
2296 
2298  unsigned size = getFullDataSize();
2299  assert(size == Loc.getFullDataSize());
2300  memcpy(Data, Loc.Data, size);
2301  }
2302 
2303  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2304 };
2305 
2310  // followed by a TemplateArgumentLocInfo[]
2311 };
2312 
2314  public ConcreteTypeLoc<UnqualTypeLoc,
2315  DependentTemplateSpecializationTypeLoc,
2316  DependentTemplateSpecializationType,
2317  DependentTemplateSpecializationLocInfo> {
2318 public:
2320  return this->getLocalData()->ElaboratedKWLoc;
2321  }
2322 
2324  this->getLocalData()->ElaboratedKWLoc = Loc;
2325  }
2326 
2328  if (!getLocalData()->QualifierData)
2329  return NestedNameSpecifierLoc();
2330 
2331  return NestedNameSpecifierLoc(getTypePtr()->getQualifier(),
2332  getLocalData()->QualifierData);
2333  }
2334 
2336  if (!QualifierLoc) {
2337  // Even if we have a nested-name-specifier in the dependent
2338  // template specialization type, we won't record the nested-name-specifier
2339  // location information when this type-source location information is
2340  // part of a nested-name-specifier.
2341  getLocalData()->QualifierData = nullptr;
2342  return;
2343  }
2344 
2345  assert(QualifierLoc.getNestedNameSpecifier()
2346  == getTypePtr()->getQualifier() &&
2347  "Inconsistent nested-name-specifier pointer");
2348  getLocalData()->QualifierData = QualifierLoc.getOpaqueData();
2349  }
2350 
2352  return getLocalData()->TemplateKWLoc;
2353  }
2354 
2356  getLocalData()->TemplateKWLoc = Loc;
2357  }
2358 
2360  return this->getLocalData()->NameLoc;
2361  }
2362 
2364  this->getLocalData()->NameLoc = Loc;
2365  }
2366 
2368  return this->getLocalData()->LAngleLoc;
2369  }
2370 
2372  this->getLocalData()->LAngleLoc = Loc;
2373  }
2374 
2376  return this->getLocalData()->RAngleLoc;
2377  }
2378 
2380  this->getLocalData()->RAngleLoc = Loc;
2381  }
2382 
2383  unsigned getNumArgs() const {
2384  return getTypePtr()->getNumArgs();
2385  }
2386 
2388  getArgInfos()[i] = AI;
2389  }
2390 
2392  return getArgInfos()[i];
2393  }
2394 
2395  TemplateArgumentLoc getArgLoc(unsigned i) const {
2396  return TemplateArgumentLoc(getTypePtr()->getArg(i), getArgLocInfo(i));
2397  }
2398 
2400  if (getElaboratedKeywordLoc().isValid())
2402  else if (getQualifierLoc())
2404  else if (getTemplateKeywordLoc().isValid())
2406  else
2408  }
2409 
2411  unsigned size = getFullDataSize();
2412  assert(size == Loc.getFullDataSize());
2413  memcpy(Data, Loc.Data, size);
2414  }
2415 
2416  void initializeLocal(ASTContext &Context, SourceLocation Loc);
2417 
2418  unsigned getExtraLocalDataSize() const {
2419  return getNumArgs() * sizeof(TemplateArgumentLocInfo);
2420  }
2421 
2422  unsigned getExtraLocalDataAlignment() const {
2423  return alignof(TemplateArgumentLocInfo);
2424  }
2425 
2426 private:
2427  TemplateArgumentLocInfo *getArgInfos() const {
2428  return static_cast<TemplateArgumentLocInfo*>(getExtraLocalData());
2429  }
2430 };
2431 
2434 };
2435 
2437  : public ConcreteTypeLoc<UnqualTypeLoc, PackExpansionTypeLoc,
2438  PackExpansionType, PackExpansionTypeLocInfo> {
2439 public:
2441  return this->getLocalData()->EllipsisLoc;
2442  }
2443 
2445  this->getLocalData()->EllipsisLoc = Loc;
2446  }
2447 
2450  }
2451 
2453  setEllipsisLoc(Loc);
2454  }
2455 
2457  return getInnerTypeLoc();
2458  }
2459 
2461  return this->getTypePtr()->getPattern();
2462  }
2463 };
2464 
2467 };
2468 
2469 class AtomicTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, AtomicTypeLoc,
2470  AtomicType, AtomicTypeLocInfo> {
2471 public:
2473  return this->getInnerTypeLoc();
2474  }
2475 
2477  return SourceRange(getKWLoc(), getRParenLoc());
2478  }
2479 
2481  return this->getLocalData()->KWLoc;
2482  }
2483 
2485  this->getLocalData()->KWLoc = Loc;
2486  }
2487 
2489  return this->getLocalData()->LParenLoc;
2490  }
2491 
2493  this->getLocalData()->LParenLoc = Loc;
2494  }
2495 
2497  return this->getLocalData()->RParenLoc;
2498  }
2499 
2501  this->getLocalData()->RParenLoc = Loc;
2502  }
2503 
2505  return SourceRange(getLParenLoc(), getRParenLoc());
2506  }
2507 
2509  setLParenLoc(Range.getBegin());
2510  setRParenLoc(Range.getEnd());
2511  }
2512 
2514  setKWLoc(Loc);
2515  setLParenLoc(Loc);
2516  setRParenLoc(Loc);
2517  }
2518 
2520  return this->getTypePtr()->getValueType();
2521  }
2522 };
2523 
2526 };
2527 
2528 class PipeTypeLoc : public ConcreteTypeLoc<UnqualTypeLoc, PipeTypeLoc, PipeType,
2529  PipeTypeLocInfo> {
2530 public:
2531  TypeLoc getValueLoc() const { return this->getInnerTypeLoc(); }
2532 
2534 
2535  SourceLocation getKWLoc() const { return this->getLocalData()->KWLoc; }
2536  void setKWLoc(SourceLocation Loc) { this->getLocalData()->KWLoc = Loc; }
2537 
2539  setKWLoc(Loc);
2540  }
2541 
2542  QualType getInnerType() const { return this->getTypePtr()->getElementType(); }
2543 };
2544 
2545 template <typename T>
2546 inline T TypeLoc::getAsAdjusted() const {
2547  TypeLoc Cur = *this;
2548  while (!T::isKind(Cur)) {
2549  if (auto PTL = Cur.getAs<ParenTypeLoc>())
2550  Cur = PTL.getInnerLoc();
2551  else if (auto ATL = Cur.getAs<AttributedTypeLoc>())
2552  Cur = ATL.getModifiedLoc();
2553  else if (auto ETL = Cur.getAs<ElaboratedTypeLoc>())
2554  Cur = ETL.getNamedTypeLoc();
2555  else if (auto ATL = Cur.getAs<AdjustedTypeLoc>())
2556  Cur = ATL.getOriginalLoc();
2557  else if (auto MQL = Cur.getAs<MacroQualifiedTypeLoc>())
2558  Cur = MQL.getInnerLoc();
2559  else
2560  break;
2561  }
2562  return Cur.getAs<T>();
2563 }
2564 class ExtIntTypeLoc final
2565  : public InheritingConcreteTypeLoc<TypeSpecTypeLoc, ExtIntTypeLoc,
2566  ExtIntType> {};
2568  : public InheritingConcreteTypeLoc<TypeSpecTypeLoc, DependentExtIntTypeLoc,
2569  DependentExtIntType> {};
2570 
2571 } // namespace clang
2572 
2573 #endif // LLVM_CLANG_AST_TYPELOC_H
clang::MatrixTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1865
clang::SourceRange::setBegin
void setBegin(SourceLocation b)
Definition: SourceLocation.h:222
clang::DependentTemplateSpecializationTypeLoc::setTemplateKeywordLoc
void setTemplateKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:2355
clang::DependentTemplateSpecializationLocInfo::LAngleLoc
SourceLocation LAngleLoc
Definition: TypeLoc.h:2308
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1151
clang::TemplateSpecializationTypeLoc
Definition: TypeLoc.h:1573
clang::FunctionNoProtoTypeLoc
Definition: TypeLoc.h:1471
clang::PointerLikeTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1211
clang::TypeLoc::Data
void * Data
Definition: TypeLoc.h:63
clang::ObjCObjectTypeLoc::getProtocolLAngleLoc
SourceLocation getProtocolLAngleLoc() const
Definition: TypeLoc.h:953
clang::ObjCObjectPointerTypeLoc
Wraps an ObjCPointerType with source location information.
Definition: TypeLoc.h:1293
clang::ParenTypeLoc::getInnerLoc
TypeLoc getInnerLoc() const
Definition: TypeLoc.h:1141
clang::AdjustedTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1175
clang::BuiltinTypeLoc::setBuiltinLoc
void setBuiltinLoc(SourceLocation Loc)
Definition: TypeLoc.h:559
clang::PointerTypeLoc::getStarLoc
SourceLocation getStarLoc() const
Definition: TypeLoc.h:1228
clang::AutoTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:618
clang::FunctionTypeLoc::getNumParams
unsigned getNumParams() const
Definition: TypeLoc.h:1425
clang::DecltypeTypeLoc::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: TypeLoc.h:1992
max
__DEVICE__ int max(int __a, int __b)
Definition: __clang_cuda_math.h:196
clang::PipeTypeLoc::setKWLoc
void setKWLoc(SourceLocation Loc)
Definition: TypeLoc.h:2536
clang::AtomicTypeLoc::getParensRange
SourceRange getParensRange() const
Definition: TypeLoc.h:2504
clang::ArrayTypeLoc::setLBracketLoc
void setLBracketLoc(SourceLocation Loc)
Definition: TypeLoc.h:1492
clang::ArrayLocInfo::LBracketLoc
SourceLocation LBracketLoc
Definition: TypeLoc.h:1478
clang::ParenType::getInnerType
QualType getInnerType() const
Definition: Type.h:2623
clang::UnqualTypeLoc::getTypeLocClass
TypeLocClass getTypeLocClass() const
Definition: TypeLoc.h:260
clang::DependentVectorTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:1781
clang::PointerLikeTypeLoc::setSigilLoc
void setSigilLoc(SourceLocation Loc)
Definition: TypeLoc.h:1203
clang::MatrixTypeLocInfo::OperandParens
SourceRange OperandParens
Definition: TypeLoc.h:1828
clang::ParenTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:1120
clang::BuiltinTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:597
clang::PipeTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2533
clang::DependentVectorTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1785
Specifiers.h
clang::ObjCObjectTypeLocInfo::ProtocolRAngleLoc
SourceLocation ProtocolRAngleLoc
Definition: TypeLoc.h:898
clang::FunctionTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1462
clang::TypeofLikeTypeLoc::getParensRange
SourceRange getParensRange() const
Definition: TypeLoc.h:1935
clang::DecltypeTypeLoc
Definition: TypeLoc.h:1988
clang::TypeOfExprTypeLocInfo
Definition: TypeLoc.h:1900
clang::AdjustedLocInfo
Definition: TypeLoc.h:1156
clang::MatrixTypeLoc::getAttrColumnOperand
Expr * getAttrColumnOperand() const
The attribute's column operand, if it has one.
Definition: TypeLoc.h:1851
clang::FunctionTypeLoc::getParams
ArrayRef< ParmVarDecl * > getParams() const
Definition: TypeLoc.h:1416
clang::ParenTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1145
clang::ElaboratedLocInfo::ElaboratedKWLoc
SourceLocation ElaboratedKWLoc
Definition: TypeLoc.h:2192
clang::AttributedTypeLoc::setAttr
void setAttr(const Attr *A)
Definition: TypeLoc.h:875
clang::TemplateTypeParmType::getDecl
TemplateTypeParmDecl * getDecl() const
Definition: Type.h:4810
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:1879
clang::DependentTemplateSpecializationTypeLoc::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Definition: TypeLoc.h:2327
clang::AutoTypeLoc::getNestedNameSpecifierLoc
const NestedNameSpecifierLoc & getNestedNameSpecifierLoc() const
Definition: TypeLoc.h:2067
clang::ObjCObjectTypeLocInfo::ProtocolLAngleLoc
SourceLocation ProtocolLAngleLoc
Definition: TypeLoc.h:897
clang::BlockPointerTypeLoc
Wrapper for source info for block pointers.
Definition: TypeLoc.h:1238
clang::ConcreteTypeLoc::getNextTypeLoc
TypeLoc getNextTypeLoc() const
Definition: TypeLoc.h:405
clang::TypeOfExprTypeLoc
Definition: TypeLoc.h:1955
clang::AutoType::isConstrained
bool isConstrained() const
Definition: Type.h:5018
clang::DependentVectorTypeLoc
Definition: TypeLoc.h:1777
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:210
clang::ParenLocInfo::LParenLoc
SourceLocation LParenLoc
Definition: TypeLoc.h:1108
clang::VariableArrayTypeLoc
Definition: TypeLoc.h:1556
clang::TemplateSpecializationTypeLoc::setTemplateKeywordLoc
void setTemplateKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:1583
clang::DependentTemplateSpecializationTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:545
clang::DependentAddressSpaceLocInfo::ExprOperand
Expr * ExprOperand
Definition: TypeLoc.h:1675
clang::PointerTypeLoc
Wrapper for source info for pointers.
Definition: TypeLoc.h:1225
clang::AutoType::getTypeConstraintConcept
ConceptDecl * getTypeConstraintConcept() const
Definition: Type.h:5014
clang::ExtIntTypeLoc
Definition: TypeLoc.h:2564
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:993
clang::PipeType::getElementType
QualType getElementType() const
Definition: Type.h:6287
clang::ParenTypeLoc::setLParenLoc
void setLParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1124
clang::WrittenBuiltinSpecs::Sign
unsigned Sign
Definition: Specifiers.h:101
clang::PipeTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:2538
clang::ArrayTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1524
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:1306
clang::DependentSizedArrayTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1550
clang::TST_unspecified
@ TST_unspecified
Definition: Specifiers.h:53
clang::AdjustedTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1169
clang::PipeTypeLoc
Definition: TypeLoc.h:2528
clang::DependentVectorTypeLoc::getElementLoc
TypeLoc getElementLoc() const
Definition: TypeLoc.h:1793
clang::AutoTypeLoc::setFoundDecl
void setFoundDecl(NamedDecl *D)
Definition: TypeLoc.h:2095
clang::VectorTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1760
clang::BuiltinTypeLoc::getWrittenTypeSpec
TypeSpecifierType getWrittenTypeSpec() const
Definition: TypeLoc.cpp:325
clang::AutoTypeLocInfo
Definition: TypeLoc.h:2044
clang::TemplateSpecializationLocInfo::TemplateKWLoc
SourceLocation TemplateKWLoc
Definition: TypeLoc.h:1568
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::ObjCTypeParamTypeLoc::getProtocolLocs
ArrayRef< SourceLocation > getProtocolLocs() const
Definition: TypeLoc.h:806
clang::BuiltinType::Kind
Kind
Definition: Type.h:2495
clang::UnaryTransformTypeLocInfo
Definition: TypeLoc.h:1995
clang::ObjCTypeParamTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:812
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:249
clang::ObjCObjectTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1005
clang::SourceRange::getBegin
SourceLocation getBegin() const
Definition: SourceLocation.h:219
clang::AttributedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation loc)
Definition: TypeLoc.h:885
clang::AttributedTypeLoc::getAttrAs
const T * getAttrAs()
Definition: TypeLoc.h:879
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:1839
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:673
clang::ObjCObjectTypeLoc::setTypeArgTInfo
void setTypeArgTInfo(unsigned i, TypeSourceInfo *TInfo)
Definition: TypeLoc.h:948
clang::DecltypeType::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: Type.h:4498
clang::TemplateSpecializationTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1639
clang::FunctionTypeLoc::setLocalRangeEnd
void setLocalRangeEnd(SourceLocation L)
Definition: TypeLoc.h:1381
clang::PointerLikeTypeLoc
A base class for.
Definition: TypeLoc.h:1196
clang::ConcreteTypeLoc::getLocalDataAlignment
unsigned getLocalDataAlignment() const
Definition: TypeLoc.h:378
clang::ArrayTypeLoc::getBracketsRange
SourceRange getBracketsRange() const
Definition: TypeLoc.h:1504
clang::ObjCInterfaceTypeLoc::setNameEndLoc
void setNameEndLoc(SourceLocation Loc)
Definition: TypeLoc.h:1064
clang::MatrixTypeLoc::setAttrColumnOperand
void setAttrColumnOperand(Expr *e)
Definition: TypeLoc.h:1852
clang::TypeSpecTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:531
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1665
clang::QualifiedTypeLoc::copyLocal
void copyLocal(TypeLoc other)
Definition: TypeLoc.h:295
clang::DependentTemplateSpecializationTypeLoc::setRAngleLoc
void setRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:2379
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:3322
clang::BuiltinTypeLoc::hasWrittenTypeSpec
bool hasWrittenTypeSpec() const
Definition: TypeLoc.h:635
clang::TypeLoc::TypeLoc
TypeLoc(const Type *ty, void *opaqueData)
Definition: TypeLoc.h:69
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:1460
clang::UnaryTransformTypeLoc::setParensRange
void setParensRange(SourceRange Range)
Definition: TypeLoc.h:2032
clang::PackExpansionTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:2452
clang::FunctionTypeLoc::getExceptionSpecRange
SourceRange getExceptionSpecRange() const
Definition: TypeLoc.h:1405
clang::MatrixTypeLoc::setAttrOperandParensRange
void setAttrOperandParensRange(SourceRange range)
Definition: TypeLoc.h:1861
clang::ObjCTypeParamType::getDecl
ObjCTypeParamDecl * getDecl() const
Definition: Type.h:5789
clang::ParenTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:1116
clang::AttributedTypeLoc::getAttr
const Attr * getAttr() const
The type attribute.
Definition: TypeLoc.h:872
clang::ConcreteTypeLoc::getInnerType
HasNoInnerType getInnerType() const
Definition: TypeLoc.h:444
clang::ObjCObjectTypeLocInfo
Definition: TypeLoc.h:894
clang::TypeLoc::getEndLoc
SourceLocation getEndLoc() const
Get the end source location.
Definition: TypeLoc.cpp:228
clang::DependentSizedExtVectorTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1813
clang::UnaryTransformTypeLocInfo::LParenLoc
SourceLocation LParenLoc
Definition: TypeLoc.h:1998
clang::QualifiedTypeLoc::getNextTypeLoc
TypeLoc getNextTypeLoc() const
Definition: TypeLoc.h:299
clang::UnaryTransformTypeLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:1998
clang::TypeSpecTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:523
clang::TypeOfTypeLoc::getUnderlyingTInfo
TypeSourceInfo * getUnderlyingTInfo() const
Definition: TypeLoc.h:1976
clang::AutoTypeLoc::isConstrained
bool isConstrained() const
Definition: TypeLoc.h:2063
clang::ObjCObjectTypeLoc::getTypeArgTInfo
TypeSourceInfo * getTypeArgTInfo(unsigned i) const
Definition: TypeLoc.h:943
clang::ArrayTypeLoc::getElementLoc
TypeLoc getElementLoc() const
Definition: TypeLoc.h:1516
clang::ObjCTypeParamTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:763
clang::ReferenceType::getPointeeTypeAsWritten
QualType getPointeeTypeAsWritten() const
Definition: Type.h:2767
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:1039
clang::ObjCObjectTypeLoc::getBaseLoc
TypeLoc getBaseLoc() const
Definition: TypeLoc.h:1001
clang::DependentTemplateSpecializationTypeLoc::getTemplateKeywordLoc
SourceLocation getTemplateKeywordLoc() const
Definition: TypeLoc.h:2351
clang::AutoTypeLoc::getArgLocInfo
TemplateArgumentLocInfo getArgLocInfo(unsigned i) const
Definition: TypeLoc.h:2133
clang::ObjCInterfaceType::getDecl
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
Definition: Type.cpp:824
clang::TemplateSpecializationTypeLoc::getArgLoc
TemplateArgumentLoc getArgLoc(unsigned i) const
Definition: TypeLoc.h:1615
clang::ConcreteTypeLoc::getTypePtr
const TypeClass * getTypePtr() const
Definition: TypeLoc.h:409
clang::MacroQualifiedTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1102
clang::ConstantArrayTypeLoc
Definition: TypeLoc.h:1533
clang::UnresolvedUsingTypeLoc::getDecl
UnresolvedUsingTypenameDecl * getDecl() const
Definition: TypeLoc.h:696
clang::ObjCTypeParamTypeLoc::setProtocolLoc
void setProtocolLoc(unsigned i, SourceLocation Loc)
Definition: TypeLoc.h:796
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:1897
clang::ObjCObjectTypeLoc::setProtocolLoc
void setProtocolLoc(unsigned i, SourceLocation Loc)
Definition: TypeLoc.h:978
clang::TypeOfTypeLoc::setUnderlyingTInfo
void setUnderlyingTInfo(TypeSourceInfo *TI) const
Definition: TypeLoc.h:1980
clang::DeducedTemplateSpecializationTypeLoc::setTemplateNameLoc
void setTemplateNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:2186
clang::LValueReferenceTypeLoc::setAmpLoc
void setAmpLoc(SourceLocation Loc)
Definition: TypeLoc.h:1323
clang::AtomicTypeLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:2466
clang::MacroQualifiedTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1100
clang::AutoTypeLoc::hasExplicitTemplateArgs
bool hasExplicitTemplateArgs() const
Definition: TypeLoc.h:2105
clang::AutoTypeLoc::getFoundDecl
NamedDecl * getFoundDecl() const
Definition: TypeLoc.h:2091
clang::PipeTypeLocInfo::KWLoc
SourceLocation KWLoc
Definition: TypeLoc.h:2525
clang::UnaryTransformTypeLocInfo::KWLoc
SourceLocation KWLoc
Definition: TypeLoc.h:1998
clang::DeducedTypeLoc
Definition: TypeLoc.h:2040
clang::ObjCObjectPointerTypeLoc::getStarLoc
SourceLocation getStarLoc() const
Definition: TypeLoc.h:1297
clang::ExtVectorTypeLoc
Definition: TypeLoc.h:1799
clang::MatrixTypeLoc
Definition: TypeLoc.h:1833
clang::TypeLoc::getTypePtr
const Type * getTypePtr() const
Definition: TypeLoc.h:136
clang::ObjCInterfaceTypeLoc::getNameEndLoc
SourceLocation getNameEndLoc() const
Definition: TypeLoc.h:1060
clang::AutoTypeLocInfo::TemplateKWLoc
SourceLocation TemplateKWLoc
Definition: TypeLoc.h:2046
clang::AtomicTypeLoc::setParensRange
void setParensRange(SourceRange Range)
Definition: TypeLoc.h:2508
clang::DependentNameTypeLoc::setElaboratedKeywordLoc
void setElaboratedKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:2266
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:3590
clang::ArrayTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1520
clang::MacroQualifiedTypeLoc::getExpansionLoc
SourceLocation getExpansionLoc() const
Definition: TypeLoc.h:1092
clang::FunctionLocInfo::RParenLoc
SourceLocation RParenLoc
Definition: TypeLoc.h:1345
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1490
clang::ObjCTypeParamTypeLoc::setProtocolRAngleLoc
void setProtocolRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:783
clang::ObjCObjectTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:1017
clang::ElaboratedTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2223
clang::ObjCTypeParamTypeLoc
ProtocolLAngleLoc, ProtocolRAngleLoc, and the source locations for protocol qualifiers are stored aft...
Definition: TypeLoc.h:747
clang::UnaryTransformTypeLoc::getUnderlyingTInfo
TypeSourceInfo * getUnderlyingTInfo() const
Definition: TypeLoc.h:2016
clang::ObjCObjectTypeLoc::getProtocolRAngleLoc
SourceLocation getProtocolRAngleLoc() const
Definition: TypeLoc.h:961
clang::ObjCObjectTypeLoc::setProtocolLAngleLoc
void setProtocolLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:957
clang::ObjCObjectTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:1022
clang::TypeLoc::getBeginLoc
SourceLocation getBeginLoc() const
Get the begin source location.
Definition: TypeLoc.cpp:191
clang::ElaboratedTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:2240
clang::AutoTypeLoc::getLAngleLoc
SourceLocation getLAngleLoc() const
Definition: TypeLoc.h:2109
clang::DependentNameTypeLoc::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Definition: TypeLoc.h:2270
clang::ObjCTypeParamTypeLoc::getProtocolRAngleLoc
SourceLocation getProtocolRAngleLoc() const
Definition: TypeLoc.h:777
clang::FunctionTypeLoc
Wrapper for source info for functions.
Definition: TypeLoc.h:1350
clang::MatrixTypeLocInfo::AttrLoc
SourceLocation AttrLoc
Definition: TypeLoc.h:1827
clang::TemplateSpecializationLocInfo::RAngleLoc
SourceLocation RAngleLoc
Definition: TypeLoc.h:1570
clang::AtomicTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:2513
clang::AutoTypeLocInfo::RAngleLoc
SourceLocation RAngleLoc
Definition: TypeLoc.h:2050
clang::UnresolvedUsingTypenameDecl
Represents a dependent using declaration which was marked with typename.
Definition: DeclCXX.h:3809
clang::TemplateSpecializationTypeLoc::setLAngleLoc
void setLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:1591
clang::TemplateSpecializationTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1646
clang::PackExpansionTypeLocInfo::EllipsisLoc
SourceLocation EllipsisLoc
Definition: TypeLoc.h:2433
clang::TypeOfTypeLocInfo::UnderlyingTInfo
TypeSourceInfo * UnderlyingTInfo
Definition: TypeLoc.h:1904
clang::ObjCObjectTypeLoc::setHasBaseTypeAsWritten
void setHasBaseTypeAsWritten(bool HasBaseType)
Definition: TypeLoc.h:997
clang::DependentAddressSpaceTypeLoc
Definition: TypeLoc.h:1680
clang::ElaboratedTypeLoc::getQualifierLoc
NestedNameSpecifierLoc getQualifierLoc() const
Definition: TypeLoc.h:2211
clang::PackExpansionTypeLoc
Definition: TypeLoc.h:2436
TemplateBase.h
clang::ObjCTypeParamTypeLocInfo
Definition: TypeLoc.h:741
clang::FunctionTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1442
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:5657
clang::AutoTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2142
clang::TypeofLikeTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1948
clang::DependentAddressSpaceTypeLoc::getInnerType
QualType getInnerType() const
Returns the type before the address space attribute application area.
Definition: TypeLoc.h:1727
clang::MacroQualifiedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1082
clang::DependentTemplateSpecializationTypeLoc::setArgLocInfo
void setArgLocInfo(unsigned i, TemplateArgumentLocInfo AI)
Definition: TypeLoc.h:2387
min
__DEVICE__ int min(int __a, int __b)
Definition: __clang_cuda_math.h:197
clang::MatrixTypeLocInfo::RowOperand
Expr * RowOperand
Definition: TypeLoc.h:1829
clang::ObjCObjectPointerTypeLoc::setStarLoc
void setStarLoc(SourceLocation Loc)
Definition: TypeLoc.h:1301
clang::SubstTemplateTypeParmPackTypeLoc
Wrapper for substituted template type parameters.
Definition: TypeLoc.h:839
clang::DependentTemplateSpecializationTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:2422
clang::FunctionLocInfo::LocalRangeBegin
SourceLocation LocalRangeBegin
Definition: TypeLoc.h:1343
clang::DependentAddressSpaceTypeLoc::getAttrOperandParensRange
SourceRange getAttrOperandParensRange() const
The location of the parentheses around the operand, if there is an operand.
Definition: TypeLoc.h:1710
clang::ObjCObjectTypeLoc::getTypeArgsRAngleLoc
SourceLocation getTypeArgsRAngleLoc() const
Definition: TypeLoc.h:931
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:1845
clang::TypeofLikeTypeLoc
Definition: TypeLoc.h:1908
clang::TemplateSpecializationTypeLoc::getTemplateNameLoc
SourceLocation getTemplateNameLoc() const
Definition: TypeLoc.h:1619
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:2335
clang::TypeofLikeTypeLoc::setParensRange
void setParensRange(SourceRange range)
Definition: TypeLoc.h:1939
clang::ParenLocInfo
Definition: TypeLoc.h:1107
clang::DependentTemplateSpecializationLocInfo::TemplateKWLoc
SourceLocation TemplateKWLoc
Definition: TypeLoc.h:2307
clang::DependentAddressSpaceTypeLoc::setAttrNameLoc
void setAttrNameLoc(SourceLocation loc)
Definition: TypeLoc.h:1692
clang::MemberPointerLocInfo
Definition: TypeLoc.h:1250
clang::AttributedTypeLoc::getAttrKind
attr::Kind getAttrKind() const
Definition: TypeLoc.h:855
clang::DependentNameTypeLoc::getElaboratedKeywordLoc
SourceLocation getElaboratedKeywordLoc() const
Definition: TypeLoc.h:2262
clang::ObjCTypeParamTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:823
clang::TypeSpecTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:535
clang::AtomicTypeLoc
Definition: TypeLoc.h:2469
clang::BuiltinTypeLoc::getWrittenSignSpec
TypeSpecifierSign getWrittenSignSpec() const
Definition: TypeLoc.h:601
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:1455
clang::AutoTypeLoc::setTemplateKWLoc
void setTemplateKWLoc(SourceLocation Loc)
Definition: TypeLoc.h:2079
clang::PackExpansionTypeLoc::getEllipsisLoc
SourceLocation getEllipsisLoc() const
Definition: TypeLoc.h:2440
clang::BlockPointerTypeLoc::setCaretLoc
void setCaretLoc(SourceLocation Loc)
Definition: TypeLoc.h:1245
clang::ConceptDecl
Declaration of a C++2a concept.
Definition: DeclTemplate.h:3236
clang::MacroQualifiedType::getMacroIdentifier
const IdentifierInfo * getMacroIdentifier() const
Definition: Type.h:4406
clang::ConcreteTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:418
clang::ObjCTypeParamTypeLoc::getProtocolLAngleLoc
SourceLocation getProtocolLAngleLoc() const
Definition: TypeLoc.h:767
clang::ObjCObjectTypeLoc::getProtocolLoc
SourceLocation getProtocolLoc(unsigned i) const
Definition: TypeLoc.h:973
clang::SourceRange::getEnd
SourceLocation getEnd() const
Definition: SourceLocation.h:220
clang::TypeofLikeTypeLoc::setLParenLoc
void setLParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1923
clang::ObjCInterfaceTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1052
clang::UnaryTransformTypeLocInfo::UnderlyingTInfo
TypeSourceInfo * UnderlyingTInfo
Definition: TypeLoc.h:1999
clang::DependentTemplateSpecializationLocInfo::RAngleLoc
SourceLocation RAngleLoc
Definition: TypeLoc.h:2309
clang::FunctionTypeLoc::setLocalRangeBegin
void setLocalRangeBegin(SourceLocation L)
Definition: TypeLoc.h:1373
clang::ObjCTypeParamTypeLoc::getNumProtocols
unsigned getNumProtocols() const
Definition: TypeLoc.h:787
clang::DependentAddressSpaceLocInfo
Definition: TypeLoc.h:1674
clang::ObjCInterfaceTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1056
clang::ObjCProtocolQualifiers::qual_begin
qual_iterator qual_begin() const
Definition: Type.h:5720
clang::AttributedTypeLoc::isQualifier
bool isQualifier() const
Definition: TypeLoc.h:859
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:212
clang::TagTypeLoc::getDecl
TagDecl * getDecl() const
Definition: TypeLoc.h:710
clang::TypeSpecTypeLoc::LocalDataAlignment
@ LocalDataAlignment
Definition: TypeLoc.h:520
clang::ObjCObjectTypeLoc::getProtocolLocs
ArrayRef< SourceLocation > getProtocolLocs() const
Definition: TypeLoc.h:989
clang::ParenTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1132
NestedNameSpecifier.h
clang::ParenTypeLoc
Definition: TypeLoc.h:1112
clang::DependentTemplateSpecializationTypeLoc::copy
void copy(DependentTemplateSpecializationTypeLoc Loc)
Definition: TypeLoc.h:2410
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:2257
clang::DependentAddressSpaceTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation loc)
Definition: TypeLoc.h:1735
clang::AutoTypeLocInfo::FoundDecl
NamedDecl * FoundDecl
Definition: TypeLoc.h:2048
clang::ArrayLocInfo::RBracketLoc
SourceLocation RBracketLoc
Definition: TypeLoc.h:1478
clang::AutoType::getKeyword
AutoTypeKeyword getKeyword() const
Definition: Type.h:5026
clang::MemberPointerTypeLoc::getClass
const Type * getClass() const
Definition: TypeLoc.h:1267
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:62
clang::ReferenceTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1309
clang::AutoTypeLoc::setRAngleLoc
void setRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:2121
clang::LValueReferenceTypeLoc::getAmpLoc
SourceLocation getAmpLoc() const
Definition: TypeLoc.h:1319
clang::DependentNameTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:2282
clang::MacroQualifiedTypeLoc::getInnerLoc
TypeLoc getInnerLoc() const
Definition: TypeLoc.h:1086
clang::DependentSizedMatrixTypeLoc
Definition: TypeLoc.h:1883
clang::DependentAddressSpaceLocInfo::AttrLoc
SourceLocation AttrLoc
Definition: TypeLoc.h:1677
clang::ObjCObjectTypeLoc::getTypeArgsLAngleLoc
SourceLocation getTypeArgsLAngleLoc() const
Definition: TypeLoc.h:923
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:700
clang::TypeSpecifierSign::Unspecified
@ Unspecified
clang::UnaryTransformTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:2013
clang::IncompleteArrayTypeLoc
Definition: TypeLoc.h:1539
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:124
clang::AtomicTypeLocInfo::LParenLoc
SourceLocation LParenLoc
Definition: TypeLoc.h:2466
clang::AutoTypeLoc::getArgLoc
TemplateArgumentLoc getArgLoc(unsigned i) const
Definition: TypeLoc.h:2137
clang::FunctionTypeLoc::setExceptionSpecRange
void setExceptionSpecRange(SourceRange R)
Definition: TypeLoc.h:1411
clang::MemberPointerTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1279
clang::AtomicTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2500
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:458
Type.h
clang::VectorTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:1758
clang::ObjCTypeParamTypeLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:742
clang::PackExpansionTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:2460
clang::InjectedClassNameTypeLoc
Wrapper for source info for injected class names of class templates.
Definition: TypeLoc.h:680
bool
#define bool
Definition: stdbool.h:15
clang::ObjCInterfaceLocInfo
Definition: TypeLoc.h:1033
clang::ObjCObjectTypeLoc::getNumProtocols
unsigned getNumProtocols() const
Definition: TypeLoc.h:969
clang::TypeOfTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:510
clang::TemplateSpecializationTypeLoc::copy
void copy(TemplateSpecializationTypeLoc Loc)
Definition: TypeLoc.h:1628
clang::ConcreteTypeLoc::getNonLocalData
void * getNonLocalData() const
Definition: TypeLoc.h:436
clang::EnumTypeLoc::getDecl
EnumDecl * getDecl() const
Definition: TypeLoc.h:729
clang::MatrixTypeLocInfo
Definition: TypeLoc.h:1826
clang::FunctionTypeLoc::getLocalRangeBegin
SourceLocation getLocalRangeBegin() const
Definition: TypeLoc.h:1369
clang::FunctionTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1438
clang::AtomicTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:2488
clang::VectorTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1766
clang::ArrayTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1530
clang::DependentNameTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:535
clang::AtomicTypeLoc::setLParenLoc
void setLParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2492
clang::RecordTypeLoc
Wrapper for source info for record types.
Definition: TypeLoc.h:717
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3328
clang::DependentVectorTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1795
clang::ElaboratedLocInfo
Definition: TypeLoc.h:2191
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:1545
clang::MacroQualifiedType::getUnderlyingType
QualType getUnderlyingType() const
Definition: Type.h:4407
clang::ObjCObjectType::getBaseType
QualType getBaseType() const
Gets the base type of this object type.
Definition: Type.h:5883
clang::TypeLoc::operator==
friend bool operator==(const TypeLoc &LHS, const TypeLoc &RHS)
Definition: TypeLoc.h:219
clang::FunctionLocInfo::LocalRangeEnd
SourceLocation LocalRangeEnd
Definition: TypeLoc.h:1346
clang::MacroQualifiedLocInfo
Definition: TypeLoc.h:1074
clang::AdjustedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1165
clang::DependentTemplateSpecializationTypeLoc::getElaboratedKeywordLoc
SourceLocation getElaboratedKeywordLoc() const
Definition: TypeLoc.h:2319
clang::DependentAddressSpaceType::getPointeeType
QualType getPointeeType() const
Definition: Type.h:3161
clang::UnaryTransformTypeLoc::setUnderlyingTInfo
void setUnderlyingTInfo(TypeSourceInfo *TInfo)
Definition: TypeLoc.h:2020
clang::UnaryTransformTypeLoc::setLParenLoc
void setLParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2011
clang::DependentSizedExtVectorTypeLoc::getElementLoc
TypeLoc getElementLoc() const
Definition: TypeLoc.h:1821
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:2448
clang::FunctionTypeLoc::getLocalRangeEnd
SourceLocation getLocalRangeEnd() const
Definition: TypeLoc.h:1377
clang::PointerLikeLocInfo
Definition: TypeLoc.h:1190
clang::MemberPointerType::getClass
const Type * getClass() const
Definition: Type.h:2861
clang::AttributedTypeLoc
Type source information for an attributed type.
Definition: TypeLoc.h:850
clang::ArrayLocInfo
Definition: TypeLoc.h:1477
clang::NestedNameSpecifierLoc
A C++ nested-name-specifier augmented with source location information.
Definition: NestedNameSpecifier.h:243
clang::TypeLoc::isNull
bool isNull() const
Definition: TypeLoc.h:120
clang::DependentTemplateSpecializationTypeLoc::getArgLocInfo
TemplateArgumentLocInfo getArgLocInfo(unsigned i) const
Definition: TypeLoc.h:2391
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:1109
clang::PointerLikeTypeLoc::getSigilLoc
SourceLocation getSigilLoc() const
Definition: TypeLoc.h:1199
clang::UnqualTypeLoc::UnqualTypeLoc
UnqualTypeLoc(const Type *Ty, void *Data)
Definition: TypeLoc.h:254
clang::UnaryTransformTypeLoc::getKWLoc
SourceLocation getKWLoc() const
Definition: TypeLoc.h:2007
clang::PipeTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:2542
Base
clang::BuiltinTypeLoc::hasModeAttr
bool hasModeAttr() const
Definition: TypeLoc.h:644
clang::AtomicTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:2519
clang::MemberPointerTypeLoc
Wrapper for source info for member pointers.
Definition: TypeLoc.h:1255
clang::ObjCInterfaceTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:1048
clang::DependentTemplateSpecializationTypeLoc::setTemplateNameLoc
void setTemplateNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:2363
clang::LValueReferenceTypeLoc
Definition: TypeLoc.h:1314
clang::AtomicTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2476
clang::AtomicTypeLocInfo
Definition: TypeLoc.h:2465
clang::TypeofLikeTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:1919
clang::MemberPointerLocInfo::ClassTInfo
TypeSourceInfo * ClassTInfo
Definition: TypeLoc.h:1251
clang::FunctionTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1397
clang::AtomicType::getValueType
QualType getValueType() const
Gets the type contained by this atomic type, i.e.
Definition: Type.h:6257
clang::AutoTypeKeyword
AutoTypeKeyword
Which keyword(s) were used to create an AutoType.
Definition: Type.h:1453
clang::AdjustedTypeLoc
Definition: TypeLoc.h:1158
clang::BlockPointerTypeLoc::getCaretLoc
SourceLocation getCaretLoc() const
Definition: TypeLoc.h:1241
clang::DependentTemplateSpecializationTypeLoc::getTemplateNameLoc
SourceLocation getTemplateNameLoc() const
Definition: TypeLoc.h:2359
clang::RValueReferenceTypeLoc::getAmpAmpLoc
SourceLocation getAmpAmpLoc() const
Definition: TypeLoc.h:1333
clang::DependentSizedExtVectorTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1817
clang::RValueReferenceTypeLoc::setAmpAmpLoc
void setAmpAmpLoc(SourceLocation Loc)
Definition: TypeLoc.h:1337
clang::AttributedLocInfo::TypeAttr
const Attr * TypeAttr
Definition: TypeLoc.h:846
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1179
clang::DependentTemplateSpecializationTypeLoc::setLAngleLoc
void setLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:2371
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:1858
clang::DependentTemplateSpecializationTypeLoc::setElaboratedKeywordLoc
void setElaboratedKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:2323
clang::UnaryTransformTypeLoc::setKWLoc
void setKWLoc(SourceLocation Loc)
Definition: TypeLoc.h:2008
clang::DecayedTypeLoc
Wrapper for source info for pointers decayed from arrays and functions.
Definition: TypeLoc.h:1186
clang::DependentNameTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2290
clang::TagType::getDecl
TagDecl * getDecl() const
Definition: Type.cpp:3495
clang::AutoTypeLoc
Definition: TypeLoc.h:2053
clang::BuiltinTypeLoc::hasWrittenWidthSpec
bool hasWrittenWidthSpec() const
Definition: TypeLoc.h:624
clang::DependentTemplateSpecializationTypeLoc
Definition: TypeLoc.h:2313
clang::TemplateSpecializationLocInfo::LAngleLoc
SourceLocation LAngleLoc
Definition: TypeLoc.h:1569
clang::AttributedTypeLoc::getModifiedLoc
TypeLoc getModifiedLoc() const
The modified type, which is generally canonically different from the attribute type.
Definition: TypeLoc.h:867
clang::BuiltinTypeLoc::getBuiltinLoc
SourceLocation getBuiltinLoc() const
Definition: TypeLoc.h:555
clang::ElaboratedTypeLoc::getElaboratedKeywordLoc
SourceLocation getElaboratedKeywordLoc() const
Definition: TypeLoc.h:2203
clang::BuiltinLocInfo::BuiltinRange
SourceRange BuiltinRange
Definition: TypeLoc.h:546
clang::AutoTypeLoc::getConceptNameInfo
DeclarationNameInfo getConceptNameInfo() const
Definition: TypeLoc.cpp:613
clang::TypeLoc::TypeLoc
TypeLoc()=default
clang::DependentAddressSpaceTypeLoc::setAttrExprOperand
void setAttrExprOperand(Expr *e)
Definition: TypeLoc.h:1702
clang::MacroQualifiedTypeLoc::getMacroIdentifier
const IdentifierInfo * getMacroIdentifier() const
Definition: TypeLoc.h:1088
clang::AutoType::getNumArgs
unsigned getNumArgs() const
Retrieve the number of template arguments.
Definition: Type.h:5004
clang::ObjCTypeParamTypeLoc::setProtocolLAngleLoc
void setProtocolLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:773
clang::DependentTemplateSpecializationType::getNumArgs
unsigned getNumArgs() const
Retrieve the number of template arguments.
Definition: Type.h:5580
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:2275
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:2117
clang::ArrayTypeLoc::getRBracketLoc
SourceLocation getRBracketLoc() const
Definition: TypeLoc.h:1496
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:255
clang::ArrayTypeLoc::getSizeExpr
Expr * getSizeExpr() const
Definition: TypeLoc.h:1508
clang::MemberPointerTypeLoc::setClassTInfo
void setClassTInfo(TypeSourceInfo *TI)
Definition: TypeLoc.h:1275
clang::TemplateSpecializationTypeLoc::setTemplateNameLoc
void setTemplateNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1623
clang::TemplateSpecializationType::getNumArgs
unsigned getNumArgs() const
Retrieve the number of template arguments.
Definition: Type.h:5191
clang::RecordTypeLoc::getDecl
RecordDecl * getDecl() const
Definition: TypeLoc.h:721
clang::AutoTypeLoc::setConceptNameLoc
void setConceptNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:2087
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:1915
clang::SubstTemplateTypeParmTypeLoc
Wrapper for substituted template type parameters.
Definition: TypeLoc.h:832
clang::BuiltinTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:593
clang::UnaryTransformTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:518
clang::TemplateNameLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:1564
clang::AutoTypeLocInfo::NestedNameSpec
NestedNameSpecifierLoc NestedNameSpec
Definition: TypeLoc.h:2045
clang::attr::Kind
Kind
Definition: AttrKinds.h:22
clang::PackExpansionTypeLocInfo
Definition: TypeLoc.h:2432
clang::ArrayLocInfo::Size
Expr * Size
Definition: TypeLoc.h:1479
clang::ElaboratedTypeLoc::getNamedTypeLoc
TypeLoc getNamedTypeLoc() const
Definition: TypeLoc.h:2236
clang::TagTypeLoc
Wrapper for source info for tag types.
Definition: TypeLoc.h:706
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:2546
clang::BuiltinTypeLoc::setWrittenSignSpec
void setWrittenSignSpec(TypeSpecifierSign written)
Definition: TypeLoc.h:612
clang::TypedefType::getDecl
TypedefNameDecl * getDecl() const
Definition: Type.h:4381
clang::FunctionTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:1393
clang::ObjCObjectTypeLoc
Definition: TypeLoc.h:907
clang::AutoTypeLoc::getTemplateKWLoc
SourceLocation getTemplateKWLoc() const
Definition: TypeLoc.h:2075
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:5451
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:1895
clang::UnresolvedUsingTypeLoc
Wrapper for source info for unresolved typename using decls.
Definition: TypeLoc.h:691
clang::DependentVectorTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1789
clang::DeducedTemplateSpecializationTypeLoc::getTemplateNameLoc
SourceLocation getTemplateNameLoc() const
Definition: TypeLoc.h:2182
clang::FunctionTypeLoc::setParam
void setParam(unsigned i, ParmVarDecl *VD)
Definition: TypeLoc.h:1432
clang::ArrayTypeLoc::setSizeExpr
void setSizeExpr(Expr *Size)
Definition: TypeLoc.h:1512
clang::FunctionLocInfo::LParenLoc
SourceLocation LParenLoc
Definition: TypeLoc.h:1344
clang::TypeOfExprType::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: Type.h:4431
clang::MacroQualifiedTypeLoc::setExpansionLoc
void setExpansionLoc(SourceLocation Loc)
Definition: TypeLoc.h:1096
clang::EnumTypeLoc
Wrapper for source info for enum types.
Definition: TypeLoc.h:725
clang::ParenTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1136
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:1075
clang::UnaryTransformTypeLoc::getParensRange
SourceRange getParensRange() const
Definition: TypeLoc.h:2028
clang::MatrixTypeLocInfo::ColumnOperand
Expr * ColumnOperand
Definition: TypeLoc.h:1830
clang::ElaboratedTypeLoc::setElaboratedKeywordLoc
void setElaboratedKeywordLoc(SourceLocation Loc)
Definition: TypeLoc.h:2207
clang::VectorTypeLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:1752
clang::FunctionLocInfo
Definition: TypeLoc.h:1342
clang::DependentExtIntTypeLoc
Definition: TypeLoc.h:2567
clang::TemplateSpecializationTypeLoc::getNumArgs
unsigned getNumArgs() const
Definition: TypeLoc.h:1603
clang::PointerLikeTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1219
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:2444
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:1263
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:3205
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:1944
clang::PointerLikeTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1215
LLVM.h
clang::AutoTypeLocInfo::LAngleLoc
SourceLocation LAngleLoc
Definition: TypeLoc.h:2049
clang::MatrixTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation loc)
Definition: TypeLoc.h:1871
clang::PackExpansionTypeLoc::getPatternLoc
TypeLoc getPatternLoc() const
Definition: TypeLoc.h:2456
clang::UnaryTransformTypeLoc
Definition: TypeLoc.h:2002
clang::ObjCObjectTypeLoc::setTypeArgsRAngleLoc
void setTypeArgsRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:935
clang::AtomicTypeLoc::setKWLoc
void setKWLoc(SourceLocation Loc)
Definition: TypeLoc.h:2484
clang::TemplateTypeParmTypeLoc
Wrapper for template type parameters.
Definition: TypeLoc.h:733
clang::TemplateSpecializationTypeLoc::getRAngleLoc
SourceLocation getRAngleLoc() const
Definition: TypeLoc.h:1595
clang::TypeSpecTypeLoc::LocalDataSize
@ LocalDataSize
Definition: TypeLoc.h:519
clang::ObjCObjectTypeLoc::getProtocol
ObjCProtocolDecl * getProtocol(unsigned i) const
Definition: TypeLoc.h:983
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:1607
clang::MemberPointerTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1284
clang::AutoTypeLoc::copy
void copy(AutoTypeLoc Loc)
Definition: TypeLoc.h:2155
clang::ElaboratedTypeLoc::copy
void copy(ElaboratedTypeLoc Loc)
Definition: TypeLoc.h:2244
clang::TypeLoc::operator!=
friend bool operator!=(const TypeLoc &LHS, const TypeLoc &RHS)
Definition: TypeLoc.h:223
clang::ObjCObjectTypeLocInfo::HasBaseTypeAsWritten
bool HasBaseTypeAsWritten
Definition: TypeLoc.h:899
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:1809
clang::TemplateTypeParmTypeLoc::getDecl
TemplateTypeParmDecl * getDecl() const
Definition: TypeLoc.h:738
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:889
clang::AttributedType::isQualifier
bool isQualifier() const
Does this attribute behave like a type qualifier?
Definition: Type.cpp:3525
clang::ComplexTypeLoc
Definition: TypeLoc.h:1889
clang::ObjCTypeParamTypeLoc::getDecl
ObjCTypeParamDecl * getDecl() const
Definition: TypeLoc.h:757
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:1840
clang::DependentTemplateSpecializationTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2399
clang::QualType::getFromOpaquePtr
static QualType getFromOpaquePtr(const void *Ptr)
Definition: Type.h:720
clang::TemplateSpecializationTypeLoc::getTemplateKeywordLoc
SourceLocation getTemplateKeywordLoc() const
Definition: TypeLoc.h:1579
clang::ObjCInterfaceLocInfo::NameLoc
SourceLocation NameLoc
Definition: TypeLoc.h:1034
clang::AutoTypeLocInfo::ConceptNameLoc
SourceLocation ConceptNameLoc
Definition: TypeLoc.h:2047
clang::UnaryTransformTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:2024
clang::ParenTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1128
clang::UnaryTransformTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:2010
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:582
clang::BuiltinType::getKind
Kind getKind() const
Definition: Type.h:2528
clang::ArrayTypeLoc
Wrapper for source info for arrays.
Definition: TypeLoc.h:1483
clang::ConcreteTypeLoc::TypeLoc
friend class TypeLoc
Definition: TypeLoc.h:362
clang::TypedefTypeLoc::getTypedefNameDecl
TypedefNameDecl * getTypedefNameDecl() const
Definition: TypeLoc.h:673
clang::TemplateSpecializationTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:1660
clang::ElaboratedTypeLoc
Definition: TypeLoc.h:2198
clang::DependentAddressSpaceTypeLoc::getPointeeTypeLoc
TypeLoc getPointeeTypeLoc() const
Definition: TypeLoc.h:1731
clang::TypeofLikeTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:1931
clang::TypeLoc::IgnoreParens
TypeLoc IgnoreParens() const
Definition: TypeLoc.h:1150
clang::AutoTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:2167
clang::UnresolvedUsingType::getDecl
UnresolvedUsingTypenameDecl * getDecl() const
Definition: Type.h:4352
clang::FunctionTypeLoc::getParam
ParmVarDecl * getParam(unsigned i) const
Definition: TypeLoc.h:1431
DeclarationName.h
clang::InjectedClassNameTypeLoc::getDecl
CXXRecordDecl * getDecl() const
Definition: TypeLoc.h:685
clang::DependentAddressSpaceTypeLoc::setAttrOperandParensRange
void setAttrOperandParensRange(SourceRange range)
Definition: TypeLoc.h:1713
clang::AtomicTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:2496
clang::DependentVectorTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1783
clang::FunctionTypeLoc::getLParenLoc
SourceLocation getLParenLoc() const
Definition: TypeLoc.h:1385
clang::PipeTypeLoc::getValueLoc
TypeLoc getValueLoc() const
Definition: TypeLoc.h:2531
clang::PointerLikeTypeLoc::getPointeeLoc
TypeLoc getPointeeLoc() const
Definition: TypeLoc.h:1207
clang::EnumType::getDecl
EnumDecl * getDecl() const
Definition: Type.h:4646
clang::DependentAddressSpaceTypeLoc::getAttrExprOperand
Expr * getAttrExprOperand() const
The attribute's expression operand, if it has one.
Definition: TypeLoc.h:1699
clang::ObjCTypeParamTypeLoc::getProtocolLoc
SourceLocation getProtocolLoc(unsigned i) const
Definition: TypeLoc.h:791
clang::AdjustedTypeLoc::getOriginalLoc
TypeLoc getOriginalLoc() const
Definition: TypeLoc.h:1161
clang::TypeLoc::getTypeLocClass
TypeLocClass getTypeLocClass() const
Definition: TypeLoc.h:115
clang::DependentTemplateSpecializationTypeLoc::getLAngleLoc
SourceLocation getLAngleLoc() const
Definition: TypeLoc.h:2367
clang::DependentNameLocInfo
Definition: TypeLoc.h:2253
clang::TemplateSpecializationTypeLoc::setRAngleLoc
void setRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:1599
clang::ObjCTypeParamTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:819
clang::SourceLocation::isInvalid
bool isInvalid() const
Definition: SourceLocation.h:111
clang::DependentSizedExtVectorTypeLoc
Definition: TypeLoc.h:1805
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:1894
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:3270
clang::VectorTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1762
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::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:4476
clang::MatrixTypeLoc::setAttrRowOperand
void setAttrRowOperand(Expr *e)
Definition: TypeLoc.h:1846
clang::AutoTypeLoc::setNestedNameSpecifierLoc
void setNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS)
Definition: TypeLoc.h:2071
clang::ObjCObjectTypeLocInfo::TypeArgsLAngleLoc
SourceLocation TypeArgsLAngleLoc
Definition: TypeLoc.h:895
clang::ConcreteTypeLoc::getInnerTypeLoc
TypeLoc getInnerTypeLoc() const
Definition: TypeLoc.h:446
clang::TypeOfExprTypeLoc::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: TypeLoc.h:1959
clang::BuiltinTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:656
clang::AutoTypeLoc::getAutoKeyword
AutoTypeKeyword getAutoKeyword() const
Definition: TypeLoc.h:2059
clang::MemberPointerTypeLoc::getClassTInfo
TypeSourceInfo * getClassTInfo() const
Definition: TypeLoc.h:1271
clang::AutoTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:2163
clang::ObjCInterfaceTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.h:1068
clang::ObjCProtocolQualifiers::getNumProtocols
unsigned getNumProtocols() const
Return the number of qualifying protocols in this type, or 0 if there are none.
Definition: Type.h:5727
clang::VectorTypeLoc
Definition: TypeLoc.h:1755
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:1500
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2050
clang::ElaboratedTypeLoc::setQualifierLoc
void setQualifierLoc(NestedNameSpecifierLoc QualifierLoc)
Definition: TypeLoc.h:2216
clang::FunctionTypeLoc::getParmArray
ParmVarDecl ** getParmArray() const
Definition: TypeLoc.h:1421
clang::DependentSizedExtVectorTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:1811
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:2195
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:46
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6399
clang::FunctionType::getReturnType
QualType getReturnType() const
Definition: Type.h:3809
clang::AttributedLocInfo
Definition: TypeLoc.h:845
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:564
clang::TemplateSpecializationLocInfo
Definition: TypeLoc.h:1567
clang::TemplateSpecializationTypeLoc::getLAngleLoc
SourceLocation getLAngleLoc() const
Definition: TypeLoc.h:1587
clang::PointerTypeLoc::setStarLoc
void setStarLoc(SourceLocation Loc)
Definition: TypeLoc.h:1232
clang::TypeLoc::Ty
const void * Ty
Definition: TypeLoc.h:62
clang::DependentTemplateSpecializationTypeLoc::getRAngleLoc
SourceLocation getRAngleLoc() const
Definition: TypeLoc.h:2375
clang::TypeOfExprTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.cpp:316
clang::TypedefNameDecl
Base class for declarations which introduce a typedef-name.
Definition: Decl.h:3180
clang::VectorTypeLocInfo
Definition: TypeLoc.h:1751
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:1972
clang::ObjCTypeParamTypeLoc::getProtocol
ObjCProtocolDecl * getProtocol(unsigned i) const
Definition: TypeLoc.h:801
clang::PointerLikeLocInfo::StarLoc
SourceLocation StarLoc
Definition: TypeLoc.h:1191
clang::MemberPointerTypeLoc::getStarLoc
SourceLocation getStarLoc() const
Definition: TypeLoc.h:1259
clang::UnaryTransformTypeLoc::setRParenLoc
void setRParenLoc(SourceLocation Loc)
Definition: TypeLoc.h:2014
clang::BuiltinTypeLoc::setWrittenTypeSpec
void setWrittenTypeSpec(TypeSpecifierType written)
Definition: TypeLoc.h:639
clang::DependentNameTypeLoc::setNameLoc
void setNameLoc(SourceLocation Loc)
Definition: TypeLoc.h:2286
clang::TypeofLikeTypeLoc::getRParenLoc
SourceLocation getRParenLoc() const
Definition: TypeLoc.h:1927
clang::DependentAddressSpaceLocInfo::OperandParens
SourceRange OperandParens
Definition: TypeLoc.h:1676
clang::PipeTypeLocInfo
Definition: TypeLoc.h:2524
clang::FunctionTypeLoc::getReturnLoc
TypeLoc getReturnLoc() const
Definition: TypeLoc.h:1434
clang::MatrixTypeLoc::getAttrOperandParensRange
SourceRange getAttrOperandParensRange() const
The location of the parentheses around the operand, if there is an operand.
Definition: TypeLoc.h:1858
clang::ObjCObjectTypeLoc::setProtocolRAngleLoc
void setProtocolRAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:965
clang::DependentTemplateSpecializationTypeLoc::getArgLoc
TemplateArgumentLoc getArgLoc(unsigned i) const
Definition: TypeLoc.h:2395
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:1488
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:927
clang::QualType::getTypePtr
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
Definition: Type.h:6428
clang::RecordType::getDecl
RecordDecl * getDecl() const
Definition: Type.h:4623
clang::DependentTemplateSpecializationTypeLoc::getExtraLocalDataSize
unsigned getExtraLocalDataSize() const
Definition: TypeLoc.h:2418
clang::InheritingConcreteTypeLoc::getTypePtr
const TypeClass * getTypePtr() const
Definition: TypeLoc.h:502
clang::AttributedType::getAttrKind
Kind getAttrKind() const
Definition: Type.h:4686
clang::ObjCInterfaceTypeLoc::getIFaceDecl
ObjCInterfaceDecl * getIFaceDecl() const
Definition: TypeLoc.h:1044
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:1389
clang::FunctionProtoTypeLoc
Definition: TypeLoc.h:1465
clang::ElaboratedTypeLoc::initializeLocal
void initializeLocal(ASTContext &Context, SourceLocation Loc)
Definition: TypeLoc.cpp:527
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:1611
clang::AtomicTypeLoc::getKWLoc
SourceLocation getKWLoc() const
Definition: TypeLoc.h:2480
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:1896
clang::AutoTypeLoc::getNamedConcept
ConceptDecl * getNamedConcept() const
Definition: TypeLoc.h:2099
clang::ObjCObjectTypeLocInfo::TypeArgsRAngleLoc
SourceLocation TypeArgsRAngleLoc
Definition: TypeLoc.h:896
clang::ObjCInterfaceLocInfo::NameEndLoc
SourceLocation NameEndLoc
Definition: TypeLoc.h:1035
clang::ObjCTypeParamTypeLoc::getNameLoc
SourceLocation getNameLoc() const
Definition: TypeLoc.h:759
clang::InjectedClassNameType::getDecl
CXXRecordDecl * getDecl() const
Definition: Type.cpp:3587
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:1689
clang::AutoTypeLoc::getConceptNameLoc
SourceLocation getConceptNameLoc() const
Definition: TypeLoc.h:2083
clang::ArrayType::getElementType
QualType getElementType() const
Definition: Type.h:2904
clang::Expr
This represents one expression.
Definition: Expr.h:109
clang::TypeofLikeTypeLoc::getTypeofLoc
SourceLocation getTypeofLoc() const
Definition: TypeLoc.h:1911
clang::AutoTypeLoc::setArgLocInfo
void setArgLocInfo(unsigned i, TemplateArgumentLocInfo AI)
Definition: TypeLoc.h:2129
clang::ObjCObjectTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1028
clang::DependentTemplateSpecializationTypeLoc::getNumArgs
unsigned getNumArgs() const
Definition: TypeLoc.h:2383
clang::ObjCObjectTypeLoc::getNumTypeArgs
unsigned getNumTypeArgs() const
Definition: TypeLoc.h:939
clang::ConcreteTypeLoc::copyLocal
void copyLocal(Derived other)
Definition: TypeLoc.h:391
clang::PipeTypeLoc::getKWLoc
SourceLocation getKWLoc() const
Definition: TypeLoc.h:2535
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:1328
clang::DeclarationNameInfo
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Definition: DeclarationName.h:758
clang::TypeOfTypeLoc
Definition: TypeLoc.h:1969
clang::DependentAddressSpaceTypeLoc::getLocalSourceRange
SourceRange getLocalSourceRange() const
Definition: TypeLoc.h:1717
clang::AttributedType::getModifiedType
QualType getModifiedType() const
Definition: Type.h:4690
clang::DependentNameTypeLoc::copy
void copy(DependentNameTypeLoc Loc)
Definition: TypeLoc.h:2297
clang::AtomicTypeLocInfo::KWLoc
SourceLocation KWLoc
Definition: TypeLoc.h:2466
clang::VectorTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1772
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3863
clang::AtomicTypeLoc::getValueLoc
TypeLoc getValueLoc() const
Definition: TypeLoc.h:2472
clang::FunctionTypeLoc::getParensRange
SourceRange getParensRange() const
Definition: TypeLoc.h:1401
clang::ObjCObjectType::getTypeArgsAsWritten
ArrayRef< QualType > getTypeArgsAsWritten() const
Retrieve the type arguments of this object type as they were written.
Definition: Type.h:5931
clang::WrittenBuiltinSpecs::ModeAttr
unsigned ModeAttr
Definition: Specifiers.h:103
clang::TemplateSpecializationTypeLoc::getExtraLocalDataAlignment
unsigned getExtraLocalDataAlignment() const
Definition: TypeLoc.h:1664
clang::AutoTypeLoc::setLAngleLoc
void setLAngleLoc(SourceLocation Loc)
Definition: TypeLoc.h:2113
clang::TemplateArgumentLocInfo
Location information for a TemplateArgument.
Definition: TemplateBase.h:406
clang::DependentTemplateSpecializationLocInfo
Definition: TypeLoc.h:2306
clang::AdjustedType::getOriginalType
QualType getOriginalType() const
Definition: Type.h:2682
clang::TypeOfTypeLocInfo
Definition: TypeLoc.h:1903
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:1770
clang::DeducedTemplateSpecializationTypeLoc
Definition: TypeLoc.h:2177
clang::QualType::hasLocalQualifiers
bool hasLocalQualifiers() const
Determine whether this particular QualType instance has any qualifiers, without looking through any t...
Definition: Type.h:775
clang::MacroQualifiedTypeLoc
Definition: TypeLoc.h:1078
clang::TypeSourceInfo::getTypeLoc
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
Definition: TypeLoc.h:244
clang::TemplateNameLocInfo
Definition: TypeLoc.h:1563
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:2254
clang::TypedefTypeLoc
Wrapper for source info for typedefs.
Definition: TypeLoc.h:669
clang::AdjustedTypeLoc::getLocalDataSize
unsigned getLocalDataSize() const
Definition: TypeLoc.h:1177
Type
MatchType Type
Definition: ASTMatchFinder.cpp:70
clang::AutoTypeLoc::getNumArgs
unsigned getNumArgs() const
Definition: TypeLoc.h:2125
clang::DependentSizedExtVectorTypeLoc::getInnerType
QualType getInnerType() const
Definition: TypeLoc.h:1823