clang  14.0.0git
ODRHash.cpp
Go to the documentation of this file.
1 //===-- ODRHash.cpp - Hashing to diagnose ODR failures ----------*- 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 /// This file implements the ODRHash class, which calculates a hash based
11 /// on AST nodes, which is stable across different runs.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #include "clang/AST/ODRHash.h"
16 
17 #include "clang/AST/DeclVisitor.h"
19 #include "clang/AST/StmtVisitor.h"
20 #include "clang/AST/TypeVisitor.h"
21 
22 using namespace clang;
23 
24 void ODRHash::AddStmt(const Stmt *S) {
25  assert(S && "Expecting non-null pointer.");
26  S->ProcessODRHash(ID, *this);
27 }
28 
30  assert(II && "Expecting non-null pointer.");
31  ID.AddString(II->getName());
32 }
33 
34 void ODRHash::AddDeclarationName(DeclarationName Name, bool TreatAsDecl) {
35  if (TreatAsDecl)
36  // Matches the NamedDecl check in AddDecl
37  AddBoolean(true);
38 
39  AddDeclarationNameImpl(Name);
40 
41  if (TreatAsDecl)
42  // Matches the ClassTemplateSpecializationDecl check in AddDecl
43  AddBoolean(false);
44 }
45 
46 void ODRHash::AddDeclarationNameImpl(DeclarationName Name) {
47  // Index all DeclarationName and use index numbers to refer to them.
48  auto Result = DeclNameMap.insert(std::make_pair(Name, DeclNameMap.size()));
49  ID.AddInteger(Result.first->second);
50  if (!Result.second) {
51  // If found in map, the DeclarationName has previously been processed.
52  return;
53  }
54 
55  // First time processing each DeclarationName, also process its details.
56  AddBoolean(Name.isEmpty());
57  if (Name.isEmpty())
58  return;
59 
60  auto Kind = Name.getNameKind();
61  ID.AddInteger(Kind);
62  switch (Kind) {
64  AddIdentifierInfo(Name.getAsIdentifierInfo());
65  break;
69  Selector S = Name.getObjCSelector();
70  AddBoolean(S.isNull());
71  AddBoolean(S.isKeywordSelector());
72  AddBoolean(S.isUnarySelector());
73  unsigned NumArgs = S.getNumArgs();
74  ID.AddInteger(NumArgs);
75  for (unsigned i = 0; i < NumArgs; ++i) {
76  const IdentifierInfo *II = S.getIdentifierInfoForSlot(i);
77  AddBoolean(II);
78  if (II) {
80  }
81  }
82  break;
83  }
86  AddQualType(Name.getCXXNameType());
87  break;
89  ID.AddInteger(Name.getCXXOverloadedOperator());
90  break;
92  AddIdentifierInfo(Name.getCXXLiteralIdentifier());
93  break;
95  AddQualType(Name.getCXXNameType());
96  break;
98  break;
100  auto *Template = Name.getCXXDeductionGuideTemplate();
101  AddBoolean(Template);
102  if (Template) {
103  AddDecl(Template);
104  }
105  }
106  }
107 }
108 
110  assert(NNS && "Expecting non-null pointer.");
111  const auto *Prefix = NNS->getPrefix();
112  AddBoolean(Prefix);
113  if (Prefix) {
114  AddNestedNameSpecifier(Prefix);
115  }
116  auto Kind = NNS->getKind();
117  ID.AddInteger(Kind);
118  switch (Kind) {
121  break;
123  AddDecl(NNS->getAsNamespace());
124  break;
127  break;
130  AddType(NNS->getAsType());
131  break;
134  break;
135  }
136 }
137 
139  auto Kind = Name.getKind();
140  ID.AddInteger(Kind);
141 
142  switch (Kind) {
144  AddDecl(Name.getAsTemplateDecl());
145  break;
146  // TODO: Support these cases.
153  break;
154  }
155 }
156 
158  const auto Kind = TA.getKind();
159  ID.AddInteger(Kind);
160 
161  switch (Kind) {
163  llvm_unreachable("Expected valid TemplateArgument");
165  AddQualType(TA.getAsType());
166  break;
168  AddDecl(TA.getAsDecl());
169  break;
172  break;
176  break;
178  AddStmt(TA.getAsExpr());
179  break;
181  ID.AddInteger(TA.pack_size());
182  for (auto SubTA : TA.pack_elements()) {
183  AddTemplateArgument(SubTA);
184  }
185  break;
186  }
187 }
188 
190  assert(TPL && "Expecting non-null pointer.");
191 
192  ID.AddInteger(TPL->size());
193  for (auto *ND : TPL->asArray()) {
194  AddSubDecl(ND);
195  }
196 }
197 
199  DeclNameMap.clear();
200  Bools.clear();
201  ID.clear();
202 }
203 
205  // Append the bools to the end of the data segment backwards. This allows
206  // for the bools data to be compressed 32 times smaller compared to using
207  // ID.AddBoolean
208  const unsigned unsigned_bits = sizeof(unsigned) * CHAR_BIT;
209  const unsigned size = Bools.size();
210  const unsigned remainder = size % unsigned_bits;
211  const unsigned loops = size / unsigned_bits;
212  auto I = Bools.rbegin();
213  unsigned value = 0;
214  for (unsigned i = 0; i < remainder; ++i) {
215  value <<= 1;
216  value |= *I;
217  ++I;
218  }
219  ID.AddInteger(value);
220 
221  for (unsigned i = 0; i < loops; ++i) {
222  value = 0;
223  for (unsigned j = 0; j < unsigned_bits; ++j) {
224  value <<= 1;
225  value |= *I;
226  ++I;
227  }
228  ID.AddInteger(value);
229  }
230 
231  assert(I == Bools.rend());
232  Bools.clear();
233  return ID.ComputeHash();
234 }
235 
236 namespace {
237 // Process a Decl pointer. Add* methods call back into ODRHash while Visit*
238 // methods process the relevant parts of the Decl.
239 class ODRDeclVisitor : public ConstDeclVisitor<ODRDeclVisitor> {
240  typedef ConstDeclVisitor<ODRDeclVisitor> Inherited;
241  llvm::FoldingSetNodeID &ID;
242  ODRHash &Hash;
243 
244 public:
245  ODRDeclVisitor(llvm::FoldingSetNodeID &ID, ODRHash &Hash)
246  : ID(ID), Hash(Hash) {}
247 
248  void AddStmt(const Stmt *S) {
249  Hash.AddBoolean(S);
250  if (S) {
251  Hash.AddStmt(S);
252  }
253  }
254 
255  void AddIdentifierInfo(const IdentifierInfo *II) {
256  Hash.AddBoolean(II);
257  if (II) {
258  Hash.AddIdentifierInfo(II);
259  }
260  }
261 
262  void AddQualType(QualType T) {
263  Hash.AddQualType(T);
264  }
265 
266  void AddDecl(const Decl *D) {
267  Hash.AddBoolean(D);
268  if (D) {
269  Hash.AddDecl(D);
270  }
271  }
272 
273  void AddTemplateArgument(TemplateArgument TA) {
274  Hash.AddTemplateArgument(TA);
275  }
276 
277  void Visit(const Decl *D) {
278  ID.AddInteger(D->getKind());
279  Inherited::Visit(D);
280  }
281 
282  void VisitNamedDecl(const NamedDecl *D) {
283  Hash.AddDeclarationName(D->getDeclName());
284  Inherited::VisitNamedDecl(D);
285  }
286 
287  void VisitValueDecl(const ValueDecl *D) {
288  if (!isa<FunctionDecl>(D)) {
289  AddQualType(D->getType());
290  }
291  Inherited::VisitValueDecl(D);
292  }
293 
294  void VisitVarDecl(const VarDecl *D) {
295  Hash.AddBoolean(D->isStaticLocal());
296  Hash.AddBoolean(D->isConstexpr());
297  const bool HasInit = D->hasInit();
298  Hash.AddBoolean(HasInit);
299  if (HasInit) {
300  AddStmt(D->getInit());
301  }
302  Inherited::VisitVarDecl(D);
303  }
304 
305  void VisitParmVarDecl(const ParmVarDecl *D) {
306  // TODO: Handle default arguments.
307  Inherited::VisitParmVarDecl(D);
308  }
309 
310  void VisitAccessSpecDecl(const AccessSpecDecl *D) {
311  ID.AddInteger(D->getAccess());
312  Inherited::VisitAccessSpecDecl(D);
313  }
314 
315  void VisitStaticAssertDecl(const StaticAssertDecl *D) {
316  AddStmt(D->getAssertExpr());
317  AddStmt(D->getMessage());
318 
319  Inherited::VisitStaticAssertDecl(D);
320  }
321 
322  void VisitFieldDecl(const FieldDecl *D) {
323  const bool IsBitfield = D->isBitField();
324  Hash.AddBoolean(IsBitfield);
325 
326  if (IsBitfield) {
327  AddStmt(D->getBitWidth());
328  }
329 
330  Hash.AddBoolean(D->isMutable());
331  AddStmt(D->getInClassInitializer());
332 
333  Inherited::VisitFieldDecl(D);
334  }
335 
336  void VisitFunctionDecl(const FunctionDecl *D) {
337  // Handled by the ODRHash for FunctionDecl
338  ID.AddInteger(D->getODRHash());
339 
340  Inherited::VisitFunctionDecl(D);
341  }
342 
343  void VisitCXXMethodDecl(const CXXMethodDecl *D) {
344  // Handled by the ODRHash for FunctionDecl
345 
346  Inherited::VisitCXXMethodDecl(D);
347  }
348 
349  void VisitTypedefNameDecl(const TypedefNameDecl *D) {
350  AddQualType(D->getUnderlyingType());
351 
352  Inherited::VisitTypedefNameDecl(D);
353  }
354 
355  void VisitTypedefDecl(const TypedefDecl *D) {
356  Inherited::VisitTypedefDecl(D);
357  }
358 
359  void VisitTypeAliasDecl(const TypeAliasDecl *D) {
360  Inherited::VisitTypeAliasDecl(D);
361  }
362 
363  void VisitFriendDecl(const FriendDecl *D) {
364  TypeSourceInfo *TSI = D->getFriendType();
365  Hash.AddBoolean(TSI);
366  if (TSI) {
367  AddQualType(TSI->getType());
368  } else {
369  AddDecl(D->getFriendDecl());
370  }
371  }
372 
373  void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D) {
374  // Only care about default arguments as part of the definition.
375  const bool hasDefaultArgument =
377  Hash.AddBoolean(hasDefaultArgument);
378  if (hasDefaultArgument) {
379  AddTemplateArgument(D->getDefaultArgument());
380  }
381  Hash.AddBoolean(D->isParameterPack());
382 
383  const TypeConstraint *TC = D->getTypeConstraint();
384  Hash.AddBoolean(TC != nullptr);
385  if (TC)
386  AddStmt(TC->getImmediatelyDeclaredConstraint());
387 
388  Inherited::VisitTemplateTypeParmDecl(D);
389  }
390 
391  void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
392  // Only care about default arguments as part of the definition.
393  const bool hasDefaultArgument =
395  Hash.AddBoolean(hasDefaultArgument);
396  if (hasDefaultArgument) {
397  AddStmt(D->getDefaultArgument());
398  }
399  Hash.AddBoolean(D->isParameterPack());
400 
401  Inherited::VisitNonTypeTemplateParmDecl(D);
402  }
403 
404  void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D) {
405  // Only care about default arguments as part of the definition.
406  const bool hasDefaultArgument =
408  Hash.AddBoolean(hasDefaultArgument);
409  if (hasDefaultArgument) {
410  AddTemplateArgument(D->getDefaultArgument().getArgument());
411  }
412  Hash.AddBoolean(D->isParameterPack());
413 
414  Inherited::VisitTemplateTemplateParmDecl(D);
415  }
416 
417  void VisitTemplateDecl(const TemplateDecl *D) {
419 
420  Inherited::VisitTemplateDecl(D);
421  }
422 
423  void VisitRedeclarableTemplateDecl(const RedeclarableTemplateDecl *D) {
425  Inherited::VisitRedeclarableTemplateDecl(D);
426  }
427 
428  void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D) {
429  AddDecl(D->getTemplatedDecl());
430  ID.AddInteger(D->getTemplatedDecl()->getODRHash());
431  Inherited::VisitFunctionTemplateDecl(D);
432  }
433 
434  void VisitEnumConstantDecl(const EnumConstantDecl *D) {
435  AddStmt(D->getInitExpr());
436  Inherited::VisitEnumConstantDecl(D);
437  }
438 };
439 } // namespace
440 
441 // Only allow a small portion of Decl's to be processed. Remove this once
442 // all Decl's can be handled.
444  if (D->isImplicit()) return false;
445  if (D->getDeclContext() != Parent) return false;
446 
447  switch (D->getKind()) {
448  default:
449  return false;
450  case Decl::AccessSpec:
451  case Decl::CXXConstructor:
452  case Decl::CXXDestructor:
453  case Decl::CXXMethod:
454  case Decl::EnumConstant: // Only found in EnumDecl's.
455  case Decl::Field:
456  case Decl::Friend:
457  case Decl::FunctionTemplate:
458  case Decl::StaticAssert:
459  case Decl::TypeAlias:
460  case Decl::Typedef:
461  case Decl::Var:
462  return true;
463  }
464 }
465 
466 void ODRHash::AddSubDecl(const Decl *D) {
467  assert(D && "Expecting non-null pointer.");
468 
469  ODRDeclVisitor(ID, *this).Visit(D);
470 }
471 
473  assert(Record && Record->hasDefinition() &&
474  "Expected non-null record to be a definition.");
475 
476  const DeclContext *DC = Record;
477  while (DC) {
478  if (isa<ClassTemplateSpecializationDecl>(DC)) {
479  return;
480  }
481  DC = DC->getParent();
482  }
483 
484  AddDecl(Record);
485 
486  // Filter out sub-Decls which will not be processed in order to get an
487  // accurate count of Decl's.
489  for (Decl *SubDecl : Record->decls()) {
490  if (isDeclToBeProcessed(SubDecl, Record)) {
491  Decls.push_back(SubDecl);
492  if (auto *Function = dyn_cast<FunctionDecl>(SubDecl)) {
493  // Compute/Preload ODRHash into FunctionDecl.
494  Function->getODRHash();
495  }
496  }
497  }
498 
499  ID.AddInteger(Decls.size());
500  for (auto SubDecl : Decls) {
501  AddSubDecl(SubDecl);
502  }
503 
504  const ClassTemplateDecl *TD = Record->getDescribedClassTemplate();
505  AddBoolean(TD);
506  if (TD) {
508  }
509 
510  ID.AddInteger(Record->getNumBases());
511  auto Bases = Record->bases();
512  for (auto Base : Bases) {
513  AddQualType(Base.getType());
514  ID.AddInteger(Base.isVirtual());
515  ID.AddInteger(Base.getAccessSpecifierAsWritten());
516  }
517 }
518 
520  bool SkipBody) {
521  assert(Function && "Expecting non-null pointer.");
522 
523  // Skip functions that are specializations or in specialization context.
524  const DeclContext *DC = Function;
525  while (DC) {
526  if (isa<ClassTemplateSpecializationDecl>(DC)) return;
527  if (auto *F = dyn_cast<FunctionDecl>(DC)) {
528  if (F->isFunctionTemplateSpecialization()) {
529  if (!isa<CXXMethodDecl>(DC)) return;
530  if (DC->getLexicalParent()->isFileContext()) return;
531  // Inline method specializations are the only supported
532  // specialization for now.
533  }
534  }
535  DC = DC->getParent();
536  }
537 
538  ID.AddInteger(Function->getDeclKind());
539 
540  const auto *SpecializationArgs = Function->getTemplateSpecializationArgs();
541  AddBoolean(SpecializationArgs);
542  if (SpecializationArgs) {
543  ID.AddInteger(SpecializationArgs->size());
544  for (const TemplateArgument &TA : SpecializationArgs->asArray()) {
546  }
547  }
548 
549  if (const auto *Method = dyn_cast<CXXMethodDecl>(Function)) {
550  AddBoolean(Method->isConst());
551  AddBoolean(Method->isVolatile());
552  }
553 
554  ID.AddInteger(Function->getStorageClass());
555  AddBoolean(Function->isInlineSpecified());
556  AddBoolean(Function->isVirtualAsWritten());
557  AddBoolean(Function->isPure());
558  AddBoolean(Function->isDeletedAsWritten());
559  AddBoolean(Function->isExplicitlyDefaulted());
560 
561  AddDecl(Function);
562 
563  AddQualType(Function->getReturnType());
564 
565  ID.AddInteger(Function->param_size());
566  for (auto Param : Function->parameters())
567  AddSubDecl(Param);
568 
569  if (SkipBody) {
570  AddBoolean(false);
571  return;
572  }
573 
574  const bool HasBody = Function->isThisDeclarationADefinition() &&
575  !Function->isDefaulted() && !Function->isDeleted() &&
576  !Function->isLateTemplateParsed();
577  AddBoolean(HasBody);
578  if (!HasBody) {
579  return;
580  }
581 
582  auto *Body = Function->getBody();
583  AddBoolean(Body);
584  if (Body)
585  AddStmt(Body);
586 
587  // Filter out sub-Decls which will not be processed in order to get an
588  // accurate count of Decl's.
590  for (Decl *SubDecl : Function->decls()) {
591  if (isDeclToBeProcessed(SubDecl, Function)) {
592  Decls.push_back(SubDecl);
593  }
594  }
595 
596  ID.AddInteger(Decls.size());
597  for (auto SubDecl : Decls) {
598  AddSubDecl(SubDecl);
599  }
600 }
601 
602 void ODRHash::AddEnumDecl(const EnumDecl *Enum) {
603  assert(Enum);
604  AddDeclarationName(Enum->getDeclName());
605 
606  AddBoolean(Enum->isScoped());
607  if (Enum->isScoped())
608  AddBoolean(Enum->isScopedUsingClassTag());
609 
610  if (Enum->getIntegerTypeSourceInfo())
611  AddQualType(Enum->getIntegerType());
612 
613  // Filter out sub-Decls which will not be processed in order to get an
614  // accurate count of Decl's.
616  for (Decl *SubDecl : Enum->decls()) {
617  if (isDeclToBeProcessed(SubDecl, Enum)) {
618  assert(isa<EnumConstantDecl>(SubDecl) && "Unexpected Decl");
619  Decls.push_back(SubDecl);
620  }
621  }
622 
623  ID.AddInteger(Decls.size());
624  for (auto SubDecl : Decls) {
625  AddSubDecl(SubDecl);
626  }
627 
628 }
629 
630 void ODRHash::AddDecl(const Decl *D) {
631  assert(D && "Expecting non-null pointer.");
632  D = D->getCanonicalDecl();
633 
634  const NamedDecl *ND = dyn_cast<NamedDecl>(D);
635  AddBoolean(ND);
636  if (!ND) {
637  ID.AddInteger(D->getKind());
638  return;
639  }
640 
642 
643  const auto *Specialization =
644  dyn_cast<ClassTemplateSpecializationDecl>(D);
646  if (Specialization) {
647  const TemplateArgumentList &List = Specialization->getTemplateArgs();
648  ID.AddInteger(List.size());
649  for (const TemplateArgument &TA : List.asArray())
651  }
652 }
653 
654 namespace {
655 // Process a Type pointer. Add* methods call back into ODRHash while Visit*
656 // methods process the relevant parts of the Type.
657 class ODRTypeVisitor : public TypeVisitor<ODRTypeVisitor> {
658  typedef TypeVisitor<ODRTypeVisitor> Inherited;
659  llvm::FoldingSetNodeID &ID;
660  ODRHash &Hash;
661 
662 public:
663  ODRTypeVisitor(llvm::FoldingSetNodeID &ID, ODRHash &Hash)
664  : ID(ID), Hash(Hash) {}
665 
666  void AddStmt(Stmt *S) {
667  Hash.AddBoolean(S);
668  if (S) {
669  Hash.AddStmt(S);
670  }
671  }
672 
673  void AddDecl(Decl *D) {
674  Hash.AddBoolean(D);
675  if (D) {
676  Hash.AddDecl(D);
677  }
678  }
679 
680  void AddQualType(QualType T) {
681  Hash.AddQualType(T);
682  }
683 
684  void AddType(const Type *T) {
685  Hash.AddBoolean(T);
686  if (T) {
687  Hash.AddType(T);
688  }
689  }
690 
691  void AddNestedNameSpecifier(const NestedNameSpecifier *NNS) {
692  Hash.AddBoolean(NNS);
693  if (NNS) {
694  Hash.AddNestedNameSpecifier(NNS);
695  }
696  }
697 
698  void AddIdentifierInfo(const IdentifierInfo *II) {
699  Hash.AddBoolean(II);
700  if (II) {
701  Hash.AddIdentifierInfo(II);
702  }
703  }
704 
705  void VisitQualifiers(Qualifiers Quals) {
706  ID.AddInteger(Quals.getAsOpaqueValue());
707  }
708 
709  // Return the RecordType if the typedef only strips away a keyword.
710  // Otherwise, return the original type.
711  static const Type *RemoveTypedef(const Type *T) {
712  const auto *TypedefT = dyn_cast<TypedefType>(T);
713  if (!TypedefT) {
714  return T;
715  }
716 
717  const TypedefNameDecl *D = TypedefT->getDecl();
718  QualType UnderlyingType = D->getUnderlyingType();
719 
720  if (UnderlyingType.hasLocalQualifiers()) {
721  return T;
722  }
723 
724  const auto *ElaboratedT = dyn_cast<ElaboratedType>(UnderlyingType);
725  if (!ElaboratedT) {
726  return T;
727  }
728 
729  if (ElaboratedT->getQualifier() != nullptr) {
730  return T;
731  }
732 
733  QualType NamedType = ElaboratedT->getNamedType();
734  if (NamedType.hasLocalQualifiers()) {
735  return T;
736  }
737 
738  const auto *RecordT = dyn_cast<RecordType>(NamedType);
739  if (!RecordT) {
740  return T;
741  }
742 
743  const IdentifierInfo *TypedefII = TypedefT->getDecl()->getIdentifier();
744  const IdentifierInfo *RecordII = RecordT->getDecl()->getIdentifier();
745  if (!TypedefII || !RecordII ||
746  TypedefII->getName() != RecordII->getName()) {
747  return T;
748  }
749 
750  return RecordT;
751  }
752 
753  void Visit(const Type *T) {
754  T = RemoveTypedef(T);
755  ID.AddInteger(T->getTypeClass());
756  Inherited::Visit(T);
757  }
758 
759  void VisitType(const Type *T) {}
760 
761  void VisitAdjustedType(const AdjustedType *T) {
762  QualType Original = T->getOriginalType();
763  QualType Adjusted = T->getAdjustedType();
764 
765  // The original type and pointee type can be the same, as in the case of
766  // function pointers decaying to themselves. Set a bool and only process
767  // the type once, to prevent doubling the work.
768  SplitQualType split = Adjusted.split();
769  if (auto Pointer = dyn_cast<PointerType>(split.Ty)) {
770  if (Pointer->getPointeeType() == Original) {
771  Hash.AddBoolean(true);
772  ID.AddInteger(split.Quals.getAsOpaqueValue());
773  AddQualType(Original);
774  VisitType(T);
775  return;
776  }
777  }
778 
779  // The original type and pointee type are different, such as in the case
780  // of a array decaying to an element pointer. Set a bool to false and
781  // process both types.
782  Hash.AddBoolean(false);
783  AddQualType(Original);
784  AddQualType(Adjusted);
785 
786  VisitType(T);
787  }
788 
789  void VisitDecayedType(const DecayedType *T) {
790  // getDecayedType and getPointeeType are derived from getAdjustedType
791  // and don't need to be separately processed.
792  VisitAdjustedType(T);
793  }
794 
795  void VisitArrayType(const ArrayType *T) {
796  AddQualType(T->getElementType());
797  ID.AddInteger(T->getSizeModifier());
798  VisitQualifiers(T->getIndexTypeQualifiers());
799  VisitType(T);
800  }
801  void VisitConstantArrayType(const ConstantArrayType *T) {
802  T->getSize().Profile(ID);
803  VisitArrayType(T);
804  }
805 
806  void VisitDependentSizedArrayType(const DependentSizedArrayType *T) {
807  AddStmt(T->getSizeExpr());
808  VisitArrayType(T);
809  }
810 
811  void VisitIncompleteArrayType(const IncompleteArrayType *T) {
812  VisitArrayType(T);
813  }
814 
815  void VisitVariableArrayType(const VariableArrayType *T) {
816  AddStmt(T->getSizeExpr());
817  VisitArrayType(T);
818  }
819 
820  void VisitAttributedType(const AttributedType *T) {
821  ID.AddInteger(T->getAttrKind());
822  AddQualType(T->getModifiedType());
823  AddQualType(T->getEquivalentType());
824 
825  VisitType(T);
826  }
827 
828  void VisitBlockPointerType(const BlockPointerType *T) {
829  AddQualType(T->getPointeeType());
830  VisitType(T);
831  }
832 
833  void VisitBuiltinType(const BuiltinType *T) {
834  ID.AddInteger(T->getKind());
835  VisitType(T);
836  }
837 
838  void VisitComplexType(const ComplexType *T) {
839  AddQualType(T->getElementType());
840  VisitType(T);
841  }
842 
843  void VisitDecltypeType(const DecltypeType *T) {
844  AddStmt(T->getUnderlyingExpr());
845  AddQualType(T->getUnderlyingType());
846  VisitType(T);
847  }
848 
849  void VisitDependentDecltypeType(const DependentDecltypeType *T) {
850  VisitDecltypeType(T);
851  }
852 
853  void VisitDeducedType(const DeducedType *T) {
854  AddQualType(T->getDeducedType());
855  VisitType(T);
856  }
857 
858  void VisitAutoType(const AutoType *T) {
859  ID.AddInteger((unsigned)T->getKeyword());
860  ID.AddInteger(T->isConstrained());
861  if (T->isConstrained()) {
862  AddDecl(T->getTypeConstraintConcept());
863  ID.AddInteger(T->getNumArgs());
864  for (const auto &TA : T->getTypeConstraintArguments())
865  Hash.AddTemplateArgument(TA);
866  }
867  VisitDeducedType(T);
868  }
869 
870  void VisitDeducedTemplateSpecializationType(
872  Hash.AddTemplateName(T->getTemplateName());
873  VisitDeducedType(T);
874  }
875 
876  void VisitDependentAddressSpaceType(const DependentAddressSpaceType *T) {
877  AddQualType(T->getPointeeType());
878  AddStmt(T->getAddrSpaceExpr());
879  VisitType(T);
880  }
881 
882  void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T) {
883  AddQualType(T->getElementType());
884  AddStmt(T->getSizeExpr());
885  VisitType(T);
886  }
887 
888  void VisitFunctionType(const FunctionType *T) {
889  AddQualType(T->getReturnType());
890  T->getExtInfo().Profile(ID);
891  Hash.AddBoolean(T->isConst());
892  Hash.AddBoolean(T->isVolatile());
893  Hash.AddBoolean(T->isRestrict());
894  VisitType(T);
895  }
896 
897  void VisitFunctionNoProtoType(const FunctionNoProtoType *T) {
898  VisitFunctionType(T);
899  }
900 
901  void VisitFunctionProtoType(const FunctionProtoType *T) {
902  ID.AddInteger(T->getNumParams());
903  for (auto ParamType : T->getParamTypes())
904  AddQualType(ParamType);
905 
906  VisitFunctionType(T);
907  }
908 
909  void VisitInjectedClassNameType(const InjectedClassNameType *T) {
910  AddDecl(T->getDecl());
911  VisitType(T);
912  }
913 
914  void VisitMemberPointerType(const MemberPointerType *T) {
915  AddQualType(T->getPointeeType());
916  AddType(T->getClass());
917  VisitType(T);
918  }
919 
920  void VisitObjCObjectPointerType(const ObjCObjectPointerType *T) {
921  AddQualType(T->getPointeeType());
922  VisitType(T);
923  }
924 
925  void VisitObjCObjectType(const ObjCObjectType *T) {
926  AddDecl(T->getInterface());
927 
928  auto TypeArgs = T->getTypeArgsAsWritten();
929  ID.AddInteger(TypeArgs.size());
930  for (auto Arg : TypeArgs) {
931  AddQualType(Arg);
932  }
933 
934  auto Protocols = T->getProtocols();
935  ID.AddInteger(Protocols.size());
936  for (auto Protocol : Protocols) {
937  AddDecl(Protocol);
938  }
939 
940  Hash.AddBoolean(T->isKindOfType());
941 
942  VisitType(T);
943  }
944 
945  void VisitObjCInterfaceType(const ObjCInterfaceType *T) {
946  // This type is handled by the parent type ObjCObjectType.
947  VisitObjCObjectType(T);
948  }
949 
950  void VisitObjCTypeParamType(const ObjCTypeParamType *T) {
951  AddDecl(T->getDecl());
952  auto Protocols = T->getProtocols();
953  ID.AddInteger(Protocols.size());
954  for (auto Protocol : Protocols) {
955  AddDecl(Protocol);
956  }
957 
958  VisitType(T);
959  }
960 
961  void VisitPackExpansionType(const PackExpansionType *T) {
962  AddQualType(T->getPattern());
963  VisitType(T);
964  }
965 
966  void VisitParenType(const ParenType *T) {
967  AddQualType(T->getInnerType());
968  VisitType(T);
969  }
970 
971  void VisitPipeType(const PipeType *T) {
972  AddQualType(T->getElementType());
973  Hash.AddBoolean(T->isReadOnly());
974  VisitType(T);
975  }
976 
977  void VisitPointerType(const PointerType *T) {
978  AddQualType(T->getPointeeType());
979  VisitType(T);
980  }
981 
982  void VisitReferenceType(const ReferenceType *T) {
983  AddQualType(T->getPointeeTypeAsWritten());
984  VisitType(T);
985  }
986 
987  void VisitLValueReferenceType(const LValueReferenceType *T) {
988  VisitReferenceType(T);
989  }
990 
991  void VisitRValueReferenceType(const RValueReferenceType *T) {
992  VisitReferenceType(T);
993  }
994 
995  void
996  VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T) {
997  AddType(T->getReplacedParameter());
999  VisitType(T);
1000  }
1001 
1002  void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T) {
1003  AddType(T->getReplacedParameter());
1004  AddQualType(T->getReplacementType());
1005  VisitType(T);
1006  }
1007 
1008  void VisitTagType(const TagType *T) {
1009  AddDecl(T->getDecl());
1010  VisitType(T);
1011  }
1012 
1013  void VisitRecordType(const RecordType *T) { VisitTagType(T); }
1014  void VisitEnumType(const EnumType *T) { VisitTagType(T); }
1015 
1016  void VisitTemplateSpecializationType(const TemplateSpecializationType *T) {
1017  ID.AddInteger(T->getNumArgs());
1018  for (const auto &TA : T->template_arguments()) {
1019  Hash.AddTemplateArgument(TA);
1020  }
1021  Hash.AddTemplateName(T->getTemplateName());
1022  VisitType(T);
1023  }
1024 
1025  void VisitTemplateTypeParmType(const TemplateTypeParmType *T) {
1026  ID.AddInteger(T->getDepth());
1027  ID.AddInteger(T->getIndex());
1028  Hash.AddBoolean(T->isParameterPack());
1029  AddDecl(T->getDecl());
1030  }
1031 
1032  void VisitTypedefType(const TypedefType *T) {
1033  AddDecl(T->getDecl());
1034  QualType UnderlyingType = T->getDecl()->getUnderlyingType();
1035  VisitQualifiers(UnderlyingType.getQualifiers());
1036  while (true) {
1037  if (const TypedefType *Underlying =
1038  dyn_cast<TypedefType>(UnderlyingType.getTypePtr())) {
1039  UnderlyingType = Underlying->getDecl()->getUnderlyingType();
1040  continue;
1041  }
1042  if (const ElaboratedType *Underlying =
1043  dyn_cast<ElaboratedType>(UnderlyingType.getTypePtr())) {
1044  UnderlyingType = Underlying->getNamedType();
1045  continue;
1046  }
1047 
1048  break;
1049  }
1050  AddType(UnderlyingType.getTypePtr());
1051  VisitType(T);
1052  }
1053 
1054  void VisitTypeOfExprType(const TypeOfExprType *T) {
1055  AddStmt(T->getUnderlyingExpr());
1056  Hash.AddBoolean(T->isSugared());
1057  if (T->isSugared())
1058  AddQualType(T->desugar());
1059 
1060  VisitType(T);
1061  }
1062  void VisitTypeOfType(const TypeOfType *T) {
1063  AddQualType(T->getUnderlyingType());
1064  VisitType(T);
1065  }
1066 
1067  void VisitTypeWithKeyword(const TypeWithKeyword *T) {
1068  ID.AddInteger(T->getKeyword());
1069  VisitType(T);
1070  };
1071 
1072  void VisitDependentNameType(const DependentNameType *T) {
1073  AddNestedNameSpecifier(T->getQualifier());
1074  AddIdentifierInfo(T->getIdentifier());
1075  VisitTypeWithKeyword(T);
1076  }
1077 
1078  void VisitDependentTemplateSpecializationType(
1080  AddIdentifierInfo(T->getIdentifier());
1081  AddNestedNameSpecifier(T->getQualifier());
1082  ID.AddInteger(T->getNumArgs());
1083  for (const auto &TA : T->template_arguments()) {
1084  Hash.AddTemplateArgument(TA);
1085  }
1086  VisitTypeWithKeyword(T);
1087  }
1088 
1089  void VisitElaboratedType(const ElaboratedType *T) {
1090  AddNestedNameSpecifier(T->getQualifier());
1091  AddQualType(T->getNamedType());
1092  VisitTypeWithKeyword(T);
1093  }
1094 
1095  void VisitUnaryTransformType(const UnaryTransformType *T) {
1096  AddQualType(T->getUnderlyingType());
1097  AddQualType(T->getBaseType());
1098  VisitType(T);
1099  }
1100 
1101  void VisitUnresolvedUsingType(const UnresolvedUsingType *T) {
1102  AddDecl(T->getDecl());
1103  VisitType(T);
1104  }
1105 
1106  void VisitVectorType(const VectorType *T) {
1107  AddQualType(T->getElementType());
1108  ID.AddInteger(T->getNumElements());
1109  ID.AddInteger(T->getVectorKind());
1110  VisitType(T);
1111  }
1112 
1113  void VisitExtVectorType(const ExtVectorType * T) {
1114  VisitVectorType(T);
1115  }
1116 };
1117 } // namespace
1118 
1119 void ODRHash::AddType(const Type *T) {
1120  assert(T && "Expecting non-null pointer.");
1121  ODRTypeVisitor(ID, *this).Visit(T);
1122 }
1123 
1125  AddBoolean(T.isNull());
1126  if (T.isNull())
1127  return;
1128  SplitQualType split = T.split();
1129  ID.AddInteger(split.Quals.getAsOpaqueValue());
1130  AddType(split.Ty);
1131 }
1132 
1134  Bools.push_back(Value);
1135 }
clang::BuiltinType
This class is used for builtin types like 'int'.
Definition: Type.h:2493
clang::DependentTemplateSpecializationType::getIdentifier
const IdentifierInfo * getIdentifier() const
Definition: Type.h:5568
clang::AccessSpecDecl
Represents an access specifier followed by colon ':'.
Definition: DeclCXX.h:87
clang::PipeType::isReadOnly
bool isReadOnly() const
Definition: Type.h:6302
clang::DeducedTemplateSpecializationType
Represents a C++17 deduced template specialization type.
Definition: Type.h:5046
clang::ParenType::getInnerType
QualType getInnerType() const
Definition: Type.h:2623
clang::NestedNameSpecifier::Identifier
@ Identifier
An identifier, stored as an IdentifierInfo*.
Definition: NestedNameSpecifier.h:81
clang::NestedNameSpecifier::Super
@ Super
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in.
Definition: NestedNameSpecifier.h:101
clang::DeclContext::decls
decl_range decls() const
decls_begin/decls_end - Iterate over the declarations stored in this context.
Definition: DeclBase.h:2115
clang::ODRHash::AddDecl
void AddDecl(const Decl *D)
Definition: ODRHash.cpp:630
clang::DependentSizedExtVectorType::getSizeExpr
Expr * getSizeExpr() const
Definition: Type.h:3204
clang::TypeSourceInfo::getType
QualType getType() const
Return the type wrapped by this type source info.
Definition: Type.h:6406
clang::TemplateTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1719
clang::TemplateTypeParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1266
clang::AttributedType
An attributed type is a type to which a type attribute has been applied.
Definition: Type.h:4668
clang::DeclarationName::Identifier
@ Identifier
Definition: DeclarationName.h:203
clang::TemplateTypeParmType::getDecl
TemplateTypeParmDecl * getDecl() const
Definition: Type.h:4810
clang::DeclarationName::CXXLiteralOperatorName
@ CXXLiteralOperatorName
Definition: DeclarationName.h:212
clang::SubstTemplateTypeParmPackType::getArgumentPack
TemplateArgument getArgumentPack() const
Definition: Type.cpp:3605
clang::FunctionType::isVolatile
bool isVolatile() const
Definition: Type.h:3828
clang::AutoType::isConstrained
bool isConstrained() const
Definition: Type.h:5018
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1347
clang::AutoType::getTypeConstraintConcept
ConceptDecl * getTypeConstraintConcept() const
Definition: Type.h:5014
clang::TemplateTypeParmDecl::getDefaultArgument
QualType getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1252
clang::TemplateArgument::getAsTemplateOrTemplatePattern
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
Definition: TemplateBase.h:300
clang::PipeType::getElementType
QualType getElementType() const
Definition: Type.h:6283
clang::TemplateArgument::pack_elements
ArrayRef< TemplateArgument > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
Definition: TemplateBase.h:366
clang::ConstantArrayType
Represents the canonical version of C arrays with a specified constant size.
Definition: Type.h:2929
clang::TemplateArgument::Null
@ Null
Represents an empty template argument, e.g., one that has not been deduced.
Definition: TemplateBase.h:68
clang::ODRHash::AddBoolean
void AddBoolean(bool value)
Definition: ODRHash.cpp:1133
clang::DependentSizedArrayType::getSizeExpr
Expr * getSizeExpr() const
Definition: Type.h:3109
clang::DependentNameType::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
Definition: Type.h:5508
clang::ConstantArrayType::getSize
const llvm::APInt & getSize() const
Definition: Type.h:2952
clang::DeclarationName::CXXConstructorName
@ CXXConstructorName
Definition: DeclarationName.h:206
llvm::SmallVector
Definition: LLVM.h:38
clang::NestedNameSpecifier::NamespaceAlias
@ NamespaceAlias
A namespace alias, stored as a NamespaceAliasDecl*.
Definition: NestedNameSpecifier.h:87
clang::QualType::getQualifiers
Qualifiers getQualifiers() const
Retrieve the set of qualifiers applied to this type.
Definition: Type.h:6451
clang::ODRHash::AddDeclarationName
void AddDeclarationName(DeclarationName Name, bool TreatAsDecl=false)
Definition: ODRHash.cpp:34
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:249
clang::DependentAddressSpaceType::getAddrSpaceExpr
Expr * getAddrSpaceExpr() const
Definition: Type.h:3160
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:673
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1384
clang::TypeConstraint::getImmediatelyDeclaredConstraint
Expr * getImmediatelyDeclaredConstraint() const
Get the immediately-declared constraint expression introduced by this type-constraint,...
Definition: ASTConcept.h:187
clang::NestedNameSpecifier
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Definition: NestedNameSpecifier.h:50
CHAR_BIT
#define CHAR_BIT
Definition: limits.h:63
clang::DecltypeType::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: Type.h:4498
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2835
clang::ODRHash::clear
void clear()
Definition: ODRHash.cpp:198
clang::Qualifiers
The collection of all-type qualifiers we support.
Definition: Type.h:145
clang::FieldDecl::getInClassInitializer
Expr * getInClassInitializer() const
Get the C++11 default member initializer for this member, or null if one has not been set.
Definition: Decl.h:2982
clang::PipeType
PipeType - OpenCL20.
Definition: Type.h:6272
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1665
clang::ObjCObjectPointerType::getPointeeType
QualType getPointeeType() const
Gets the type pointed to by this ObjC pointer.
Definition: Type.h:6084
clang::TemplateArgument::Declaration
@ Declaration
The template argument is a declaration that was provided for a pointer, reference,...
Definition: TemplateBase.h:75
clang::EnumConstantDecl::getInitExpr
const Expr * getInitExpr() const
Definition: Decl.h:3069
clang::TemplateSubstitutionKind::Specialization
@ Specialization
We are substituting template parameters for template arguments in order to form a template specializa...
clang::DeclarationName::CXXDeductionGuideName
@ CXXDeductionGuideName
Definition: DeclarationName.h:210
clang::TemplateSpecializationType
Represents a type template specialization; the template must be a class template, a type alias templa...
Definition: Type.h:5103
clang::ODRHash::AddTemplateParameterList
void AddTemplateParameterList(const TemplateParameterList *TPL)
Definition: ODRHash.cpp:189
clang::FunctionType::getExtInfo
ExtInfo getExtInfo() const
Definition: Type.h:3821
clang::ComplexType::getElementType
QualType getElementType() const
Definition: Type.h:2597
clang::ObjCTypeParamType::getDecl
ObjCTypeParamDecl * getDecl() const
Definition: Type.h:5785
TypeVisitor.h
clang::TagType
Definition: Type.h:4589
clang::NonTypeTemplateParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1463
clang::Qualifiers::getAsOpaqueValue
unsigned getAsOpaqueValue() const
Definition: Type.h:258
clang::ReferenceType::getPointeeTypeAsWritten
QualType getPointeeTypeAsWritten() const
Definition: Type.h:2767
clang::AutoType::getTypeConstraintArguments
ArrayRef< TemplateArgument > getTypeConstraintArguments() const
Definition: Type.h:5010
clang::RedeclarableTemplateDecl
Declaration of a redeclarable template.
Definition: DeclTemplate.h:752
clang::DeclContext::getLexicalParent
DeclContext * getLexicalParent()
getLexicalParent - Returns the containing lexical DeclContext.
Definition: DeclBase.h:1876
clang::FunctionType
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: Type.h:3546
clang::FunctionNoProtoType
Represents a K&R-style 'int foo()' function, which has no information available about its arguments.
Definition: Type.h:3847
clang::ObjCObjectType::getInterface
ObjCInterfaceDecl * getInterface() const
Gets the interface declaration for this object type, if the base type really is an interface.
Definition: Type.h:6051
clang::SubstTemplateTypeParmType::getReplacedParameter
const TemplateTypeParmType * getReplacedParameter() const
Gets the template parameter that was substituted for.
Definition: Type.h:4856
clang::TemplateArgument::getAsExpr
Expr * getAsExpr() const
Retrieve the template argument as an expression.
Definition: TemplateBase.h:342
clang::DeclarationName
The name of a declaration.
Definition: DeclarationName.h:145
clang::TemplateArgument::Expression
@ Expression
The template argument is an expression, and we've not resolved it to one of the other forms yet,...
Definition: TemplateBase.h:97
clang::EnumDecl
Represents an enum.
Definition: Decl.h:3590
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1490
clang::TemplateTypeParmDecl::hasDefaultArgument
bool hasDefaultArgument() const
Determine whether this template parameter has a default argument.
Definition: DeclTemplate.h:1249
clang::SubstTemplateTypeParmPackType::getReplacedParameter
const TemplateTypeParmType * getReplacedParameter() const
Gets the template parameter that was substituted for.
Definition: Type.h:4915
clang::TypedefType
Definition: Type.h:4371
clang::ObjCObjectType
Represents a class type in Objective C.
Definition: Type.h:5816
clang::TemplateArgument::Integral
@ Integral
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
Definition: TemplateBase.h:83
clang::CXXRecordDecl::getDescribedClassTemplate
ClassTemplateDecl * getDescribedClassTemplate() const
Retrieves the class template that is described by this class declaration.
Definition: DeclCXX.cpp:1809
clang::TemplateArgument::NullPtr
@ NullPtr
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
Definition: TemplateBase.h:79
clang::FunctionDecl::getODRHash
unsigned getODRHash()
Returns ODRHash of the function.
Definition: Decl.cpp:4145
clang::FunctionTemplateDecl
Declaration of a template function.
Definition: DeclTemplate.h:978
clang::VarDecl::hasInit
bool hasInit() const
Definition: Decl.cpp:2282
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:5653
clang::NonTypeTemplateParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1473
clang::NestedNameSpecifier::Namespace
@ Namespace
A namespace, stored as a NamespaceDecl*.
Definition: NestedNameSpecifier.h:84
clang::ElaboratedType
Represents a type that was referred to using an elaborated type keyword, e.g., struct S,...
Definition: Type.h:5403
clang::RecordType
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: Type.h:4613
clang::TemplateArgument::getKind
ArgKind getKind() const
Return the kind of stored template argument.
Definition: TemplateBase.h:245
clang::NestedNameSpecifier::getAsIdentifier
IdentifierInfo * getAsIdentifier() const
Retrieve the identifier stored in this nested name specifier.
Definition: NestedNameSpecifier.h:176
clang::PackExpansionType
Represents a pack expansion of types.
Definition: Type.h:5632
clang::ODRHash::AddQualType
void AddQualType(QualType T)
Definition: ODRHash.cpp:1124
clang::Decl::getAccess
AccessSpecifier getAccess() const
Definition: DeclBase.h:478
clang::Decl::getKind
Kind getKind() const
Definition: DeclBase.h:433
clang::TemplateTypeParmType::getIndex
unsigned getIndex() const
Definition: Type.h:4807
clang::VarDecl::isStaticLocal
bool isStaticLocal() const
Returns true if a variable with function scope is a static local variable.
Definition: Decl.h:1125
clang::DeclarationName::CXXDestructorName
@ CXXDestructorName
Definition: DeclarationName.h:207
clang::VectorType
Represents a GCC generic vector type.
Definition: Type.h:3229
clang::FieldDecl::getBitWidth
Expr * getBitWidth() const
Definition: Decl.h:2924
clang::ODRHash::AddFunctionDecl
void AddFunctionDecl(const FunctionDecl *Function, bool SkipBody=false)
Definition: ODRHash.cpp:519
clang::FriendDecl::getFriendDecl
NamedDecl * getFriendDecl() const
If this friend declaration doesn't name a type, return the inner declaration.
Definition: DeclFriend.h:138
clang::ArrayType
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Definition: Type.h:2883
NestedNameSpecifier.h
clang::ODRHash::isDeclToBeProcessed
static bool isDeclToBeProcessed(const Decl *D, const DeclContext *Parent)
Definition: ODRHash.cpp:443
clang::MemberPointerType::getPointeeType
QualType getPointeeType() const
Definition: Type.h:2847
clang::TypeOfType
Represents typeof(type), a GCC extension.
Definition: Type.h:4465
clang::CXXRecordDecl::getNumBases
unsigned getNumBases() const
Retrieves the number of base classes of this class.
Definition: DeclCXX.h:583
clang::AutoType::getKeyword
AutoTypeKeyword getKeyword() const
Definition: Type.h:5026
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:62
clang::DeclarationName::CXXOperatorName
@ CXXOperatorName
Definition: DeclarationName.h:209
clang::StaticAssertDecl::getMessage
StringLiteral * getMessage()
Definition: DeclCXX.h:3936
clang::SubstTemplateTypeParmType::getReplacementType
QualType getReplacementType() const
Gets the type that was substituted for the template parameter.
Definition: Type.h:4862
clang::ODRHash::AddTemplateName
void AddTemplateName(TemplateName Name)
Definition: ODRHash.cpp:138
clang::Decl::getCanonicalDecl
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
Definition: DeclBase.h:901
clang::TypedefNameDecl::getUnderlyingType
QualType getUnderlyingType() const
Definition: Decl.h:3235
clang::TypeOfExprType::desugar
QualType desugar() const
Remove a single level of sugar.
Definition: Type.cpp:3428
clang::AutoType
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
Definition: Type.h:4980
clang::VariableArrayType::getSizeExpr
Expr * getSizeExpr() const
Definition: Type.h:3052
clang::ODRHash::AddIdentifierInfo
void AddIdentifierInfo(const IdentifierInfo *II)
Definition: ODRHash.cpp:29
clang::ODRHash::AddTemplateArgument
void AddTemplateArgument(TemplateArgument TA)
Definition: ODRHash.cpp:157
clang::FriendDecl
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Definition: DeclFriend.h:53
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1601
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:876
clang::TemplateArgumentLoc::getArgument
const TemplateArgument & getArgument() const
Definition: TemplateBase.h:507
clang::FunctionProtoType::getParamTypes
ArrayRef< QualType > getParamTypes() const
Definition: Type.h:4102
clang::UnresolvedUsingType
Represents the dependent type named by a dependently-scoped typename using declaration,...
Definition: Type.h:4341
clang::TemplateName::Template
@ Template
A single template declaration.
Definition: TemplateName.h:205
clang::TemplateParameterList
Stores a list of template parameters for a TemplateDecl and its derived classes.
Definition: DeclTemplate.h:69
clang::NestedNameSpecifier::Global
@ Global
The global specifier '::'. There is no stored value.
Definition: NestedNameSpecifier.h:97
clang::SplitQualType::Ty
const Type * Ty
The locally-unqualified type.
Definition: Type.h:614
clang::TemplateName::SubstTemplateTemplateParmPack
@ SubstTemplateTemplateParmPack
A template template parameter pack that has been substituted for a template template argument pack,...
Definition: TemplateName.h:229
clang::CXXRecordDecl::bases
base_class_range bases()
Definition: DeclCXX.h:589
clang::DependentAddressSpaceType
Represents an extended address space qualifier where the input address space value is dependent.
Definition: Type.h:3147
clang::SubstTemplateTypeParmType
Represents the result of substituting a type for a template type parameter.
Definition: Type.h:4844
clang::DependentAddressSpaceType::getPointeeType
QualType getPointeeType() const
Definition: Type.h:3161
clang::EnumConstantDecl
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:3050
clang::DeclarationName::CXXUsingDirective
@ CXXUsingDirective
Definition: DeclarationName.h:215
clang::MemberPointerType::getClass
const Type * getClass() const
Definition: Type.h:2861
clang::TypeVisitor
An operation on a type.
Definition: TypeVisitor.h:64
Base
clang::SubstTemplateTypeParmPackType
Represents the result of substituting a set of types for a template type parameter pack.
Definition: Type.h:4897
clang::ElaboratedType::getQualifier
NestedNameSpecifier * getQualifier() const
Retrieve the qualification on this type.
Definition: Type.h:5444
clang::DependentTemplateSpecializationType::template_arguments
ArrayRef< TemplateArgument > template_arguments() const
Definition: Type.h:5582
clang::BlockPointerType
Pointer to a block type.
Definition: Type.h:2720
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1178
clang::Type::getTypeClass
TypeClass getTypeClass() const
Definition: Type.h:1858
clang::NestedNameSpecifier::TypeSpecWithTemplate
@ TypeSpecWithTemplate
A type that was preceded by the 'template' keyword, stored as a Type*.
Definition: NestedNameSpecifier.h:94
clang::UnaryTransformType::getBaseType
QualType getBaseType() const
Definition: Type.h:4557
clang::AdjustedType
Represents a type which was implicitly adjusted by the semantic engine for arbitrary reasons.
Definition: Type.h:2669
clang::Decl::isImplicit
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
Definition: DeclBase.h:563
clang::FieldDecl::isMutable
bool isMutable() const
Determines whether this field is mutable (C++ only).
Definition: Decl.h:2910
clang::QualType::split
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
Definition: Type.h:6432
clang::TagType::getDecl
TagDecl * getDecl() const
Definition: Type.cpp:3495
clang::IncompleteArrayType
Represents a C array with an unspecified size.
Definition: Type.h:2989
clang::VectorType::getVectorKind
VectorKind getVectorKind() const
Definition: Type.h:3276
clang::ODRHash
Definition: ODRHash.h:41
clang::TemplateDecl::getTemplateParameters
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Definition: DeclTemplate.h:418
clang::FunctionType::isRestrict
bool isRestrict() const
Definition: Type.h:3829
clang::UnaryTransformType
A unary type transform, which is a type constructed from another.
Definition: Type.h:4531
clang::TemplateTypeParmType
Definition: Type.h:4765
clang::DeducedType::getDeducedType
QualType getDeducedType() const
Get the type deduced for this placeholder type, or null if it's either not been deduced or was deduce...
Definition: Type.h:4965
clang::DeclarationName::CXXConversionFunctionName
@ CXXConversionFunctionName
Definition: DeclarationName.h:208
clang::ArrayType::getIndexTypeQualifiers
Qualifiers getIndexTypeQualifiers() const
Definition: Type.h:2910
clang::AutoType::getNumArgs
unsigned getNumArgs() const
Retrieve the number of template arguments.
Definition: Type.h:5004
clang::DecltypeType::getUnderlyingType
QualType getUnderlyingType() const
Definition: Type.h:4499
clang::TemplateArgument::TemplateExpansion
@ TemplateExpansion
The template argument is a pack expansion of a template name that was provided for a template templat...
Definition: TemplateBase.h:91
clang::DependentTemplateSpecializationType::getNumArgs
unsigned getNumArgs() const
Retrieve the number of template arguments.
Definition: Type.h:5576
clang::ArrayType::getSizeModifier
ArraySizeModifier getSizeModifier() const
Definition: Type.h:2906
remainder
#define remainder(__x, __y)
Definition: tgmath.h:1090
clang::StaticAssertDecl::getAssertExpr
Expr * getAssertExpr()
Definition: DeclCXX.h:3933
clang::ObjCObjectPointerType
Represents a pointer to an Objective C object.
Definition: Type.h:6072
clang::TemplateTemplateParmDecl::defaultArgumentWasInherited
bool defaultArgumentWasInherited() const
Determines whether the default argument was inherited from a previous declaration of this template.
Definition: DeclTemplate.h:1732
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:255
clang::TemplateSpecializationType::getNumArgs
unsigned getNumArgs() const
Retrieve the number of template arguments.
Definition: Type.h:5187
clang::NestedNameSpecifier::getAsNamespaceAlias
NamespaceAliasDecl * getAsNamespaceAlias() const
Retrieve the namespace alias stored in this nested name specifier.
Definition: NestedNameSpecifier.cpp:177
clang::AdjustedType::getAdjustedType
QualType getAdjustedType() const
Definition: Type.h:2683
clang::DependentSizedArrayType
Represents an array type in C++ whose size is a value-dependent expression.
Definition: Type.h:3087
clang::VariableArrayType
Represents a C array with a specified size that is not an integer-constant-expression.
Definition: Type.h:3033
clang::FieldDecl::isBitField
bool isBitField() const
Determines whether this field is a bitfield.
Definition: Decl.h:2913
clang::NestedNameSpecifier::getAsNamespace
NamespaceDecl * getAsNamespace() const
Retrieve the namespace stored in this nested name specifier.
Definition: NestedNameSpecifier.cpp:169
clang::TemplateName::QualifiedTemplate
@ QualifiedTemplate
A qualified template name, where the qualification is kept to describe the source code as written.
Definition: TemplateName.h:216
clang::NonTypeTemplateParmDecl::getDefaultArgument
Expr * getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1466
clang::TemplateTypeParmDecl::getTypeConstraint
const TypeConstraint * getTypeConstraint() const
Returns the type constraint associated with this template parameter (if any).
Definition: DeclTemplate.h:1346
clang::StaticAssertDecl
Represents a C++11 static_assert declaration.
Definition: DeclCXX.h:3910
clang::TypedefType::getDecl
TypedefNameDecl * getDecl() const
Definition: Type.h:4381
clang::ElaboratedType::getNamedType
QualType getNamedType() const
Retrieve the type named by the qualified-id.
Definition: Type.h:5447
clang::ClassTemplateDecl
Declaration of a class template.
Definition: DeclTemplate.h:2247
clang::ValueDecl
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:676
clang::ComplexType
Complex values, per C99 6.2.5p11.
Definition: Type.h:2587
clang::ConstDeclVisitor
A simple visitor class that helps create declaration visitors.
Definition: DeclVisitor.h:73
clang::TemplateName
Represents a C++ template name within the type system.
Definition: TemplateName.h:192
clang::DecltypeType
Represents the type decltype(expr) (C++11).
Definition: Type.h:4488
clang::ODRHash::AddType
void AddType(const Type *T)
Definition: ODRHash.cpp:1119
clang::ObjCObjectType::isKindOfType
bool isKindOfType() const
Whether this ia a "__kindof" type (semantically).
Definition: Type.cpp:789
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3885
clang::TypeOfExprType::getUnderlyingExpr
Expr * getUnderlyingExpr() const
Definition: Type.h:4431
clang::DeclContext::getParent
DeclContext * getParent()
getParent - Returns the containing DeclContext.
Definition: DeclBase.h:1860
clang::TemplateDecl
The base class of all kinds of template declarations (e.g., class, function, etc.).
Definition: DeclTemplate.h:399
clang::BlockPointerType::getPointeeType
QualType getPointeeType() const
Definition: Type.h:2732
clang::QualType::isNull
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Definition: Type.h:738
DeclVisitor.h
Value
Value
Definition: UninitializedValues.cpp:102
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:89
clang::ODRHash::AddNestedNameSpecifier
void AddNestedNameSpecifier(const NestedNameSpecifier *NNS)
Definition: ODRHash.cpp:109
clang::DeclarationName::ObjCZeroArgSelector
@ ObjCZeroArgSelector
Definition: DeclarationName.h:204
clang::DependentSizedExtVectorType::getElementType
QualType getElementType() const
Definition: Type.h:3205
StmtVisitor.h
clang::DeclarationName::ObjCOneArgSelector
@ ObjCOneArgSelector
Definition: DeclarationName.h:205
clang::FunctionProtoType::getNumParams
unsigned getNumParams() const
Definition: Type.h:4095
clang::ODRHash::AddCXXRecordDecl
void AddCXXRecordDecl(const CXXRecordDecl *Record)
Definition: ODRHash.cpp:472
clang::InjectedClassNameType
The injected class name of a C++ class template or class template partial specialization.
Definition: Type.h:5256
clang::TemplateArgumentList
A template argument list.
Definition: DeclTemplate.h:236
clang::TemplateSpecializationType::template_arguments
ArrayRef< TemplateArgument > template_arguments() const
Definition: Type.h:5195
clang::DeclContext::isFileContext
bool isFileContext() const
Definition: DeclBase.h:1930
clang::FunctionType::ExtInfo::Profile
void Profile(llvm::FoldingSetNodeID &ID) const
Definition: Type.h:3776
clang::TemplateParameterList::size
unsigned size() const
Definition: DeclTemplate.h:129
clang::VarDecl::getInit
const Expr * getInit() const
Definition: Decl.h:1285
clang::SplitQualType
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
Definition: Type.h:612
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:84
clang::TemplateParameterList::asArray
ArrayRef< NamedDecl * > asArray()
Definition: DeclTemplate.h:131
clang::TypedefDecl
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Definition: Decl.h:3282
clang::TypeOfExprType
Represents a typeof (or typeof) expression (a GCC extension).
Definition: Type.h:4422
clang::TypeWithKeyword
A helper class for Type nodes having an ElaboratedTypeKeyword.
Definition: Type.h:5355
ODRHash.h
clang::TemplateTypeParmDecl::isParameterPack
bool isParameterPack() const
Returns whether this is a parameter pack.
Definition: DeclTemplate.cpp:684
clang::MemberPointerType
A pointer to member type per C++ 8.3.3 - Pointers to members.
Definition: Type.h:2831
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::DependentTemplateSpecializationType
Represents a template specialization type whose template cannot be resolved, e.g.
Definition: Type.h:5541
clang::BuiltinType::getKind
Kind getKind() const
Definition: Type.h:2528
clang::TemplateName::SubstTemplateTemplateParm
@ SubstTemplateTemplateParm
A template template parameter that has been substituted for some other template name.
Definition: TemplateName.h:224
clang::FunctionTemplateDecl::getTemplatedDecl
FunctionDecl * getTemplatedDecl() const
Get the underlying function declaration of the template.
Definition: DeclTemplate.h:1033
clang::TemplateArgument::getAsDecl
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
Definition: TemplateBase.h:276
clang::RValueReferenceType
An rvalue reference type, per C++11 [dcl.ref].
Definition: Type.h:2813
clang::UnresolvedUsingType::getDecl
UnresolvedUsingTypenameDecl * getDecl() const
Definition: Type.h:4352
clang::PointerType
PointerType - C99 6.7.5.1 - Pointer Declarators.
Definition: Type.h:2640
clang::ODRHash::AddStmt
void AddStmt(const Stmt *S)
Definition: ODRHash.cpp:24
clang::ObjCProtocolQualifiers::getProtocols
ArrayRef< ObjCProtocolDecl * > getProtocols() const
Retrieve all of the protocol qualifiers.
Definition: Type.h:5734
clang::IdentifierInfo::getName
StringRef getName() const
Return the actual identifier string.
Definition: IdentifierTable.h:195
clang::Builtin::ID
ID
Definition: Builtins.h:48
clang::TemplateTemplateParmDecl::getDefaultArgument
const TemplateArgumentLoc & getDefaultArgument() const
Retrieve the default argument, if any.
Definition: DeclTemplate.h:1722
clang::TemplateArgument::Type
@ Type
The template argument is a type.
Definition: TemplateBase.h:71
clang::AttributedType::getEquivalentType
QualType getEquivalentType() const
Definition: Type.h:4691
clang::TemplateTypeParmType::getDepth
unsigned getDepth() const
Definition: Type.h:4806
clang
Definition: CalledOnceCheck.h:17
clang::VectorType::getElementType
QualType getElementType() const
Definition: Type.h:3270
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:748
clang::NestedNameSpecifier::getAsType
const Type * getAsType() const
Retrieve the type stored in this nested name specifier.
Definition: NestedNameSpecifier.h:196
clang::TypeOfType::getUnderlyingType
QualType getUnderlyingType() const
Definition: Type.h:4476
clang::TemplateArgument::Template
@ Template
The template argument is a template name that was provided for a template template parameter.
Definition: TemplateBase.h:87
clang::NonTypeTemplateParmDecl::isParameterPack
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
Definition: DeclTemplate.h:1498
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:69
clang::VarDecl::isConstexpr
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
Definition: Decl.h:1479
clang::CXXRecordDecl::hasDefinition
bool hasDefinition() const
Definition: DeclCXX.h:542
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6395
clang::FunctionType::getReturnType
QualType getReturnType() const
Definition: Type.h:3809
clang::NamedDecl::getDeclName
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:313
clang::NestedNameSpecifier::getPrefix
NestedNameSpecifier * getPrefix() const
Return the prefix of this nested name specifier.
Definition: NestedNameSpecifier.h:169
clang::TemplateName::AssumedTemplate
@ AssumedTemplate
An unqualified-id that has been assumed to name a function template that will be found by ADL.
Definition: TemplateName.h:212
unsigned
clang::DependentTemplateSpecializationType::getQualifier
NestedNameSpecifier * getQualifier() const
Definition: Type.h:5567
clang::TypedefNameDecl
Base class for declarations which introduce a typedef-name.
Definition: Decl.h:3180
clang::ODRHash::AddSubDecl
void AddSubDecl(const Decl *D)
Definition: ODRHash.cpp:466
clang::TemplateName::OverloadedTemplate
@ OverloadedTemplate
A set of overloaded template declarations.
Definition: TemplateName.h:208
clang::ODRHash::AddEnumDecl
void AddEnumDecl(const EnumDecl *Enum)
Definition: ODRHash.cpp:602
clang::DependentNameType
Represents a qualified type name for which the type name is dependent.
Definition: Type.h:5490
clang::QualType::getTypePtr
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
Definition: Type.h:6424
clang::DeducedTemplateSpecializationType::getTemplateName
TemplateName getTemplateName() const
Retrieve the name of the template that we are deducing.
Definition: Type.h:5065
clang::FunctionType::isConst
bool isConst() const
Definition: Type.h:3827
clang::ExtVectorType
ExtVectorType - Extended vector type.
Definition: Type.h:3350
Parent
NodeId Parent
Definition: ASTDiff.cpp:192
clang::ReferenceType
Base for LValueReferenceType and RValueReferenceType.
Definition: Type.h:2751
clang::AttributedType::getAttrKind
Kind getAttrKind() const
Definition: Type.h:4686
clang::PointerType::getPointeeType
QualType getPointeeType() const
Definition: Type.h:2650
clang::NestedNameSpecifier::TypeSpec
@ TypeSpec
A type, stored as a Type*.
Definition: NestedNameSpecifier.h:90
clang::VectorType::getNumElements
unsigned getNumElements() const
Definition: Type.h:3271
clang::TemplateArgument::pack_size
unsigned pack_size() const
The number of template arguments in the given template argument pack.
Definition: TemplateBase.h:372
GCCTypeClass::Pointer
@ Pointer
clang::ODRHash::CalculateHash
unsigned CalculateHash()
Definition: ODRHash.cpp:204
clang::ObjCTypeParamType
Represents a type parameter type in Objective C.
Definition: Type.h:5741
clang::TypeAliasDecl
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Definition: Decl.h:3302
clang::DeclarationName::ObjCMultiArgSelector
@ ObjCMultiArgSelector
Definition: DeclarationName.h:217
clang::ValueDecl::getType
QualType getType() const
Definition: Decl.h:687
clang::InjectedClassNameType::getDecl
CXXRecordDecl * getDecl() const
Definition: Type.cpp:3587
clang::DeducedType
Common base class for placeholders for types that get replaced by placeholder type deduction: C++11 a...
Definition: Type.h:4946
clang::ArrayType::getElementType
QualType getElementType() const
Definition: Type.h:2904
clang::RedeclarableTemplateDecl::isMemberSpecialization
bool isMemberSpecialization() const
Determines whether this template was a specialization of a member template.
Definition: DeclTemplate.h:889
clang::TemplateTypeParmType::isParameterPack
bool isParameterPack() const
Definition: Type.h:4808
clang::NestedNameSpecifier::getKind
SpecifierKind getKind() const
Determine what kind of nested name specifier is stored.
Definition: NestedNameSpecifier.cpp:143
clang::EnumType
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums.
Definition: Type.h:4639
clang::TypeOfExprType::isSugared
bool isSugared() const
Returns whether this type directly provides sugar.
Definition: Type.cpp:3424
clang::DependentSizedExtVectorType
Represents an extended vector type where either the type or size is dependent.
Definition: Type.h:3189
clang::AttributedType::getModifiedType
QualType getModifiedType() const
Definition: Type.h:4690
clang::SplitQualType::Quals
Qualifiers Quals
The local qualifiers.
Definition: Type.h:617
clang::DependentNameType::getIdentifier
const IdentifierInfo * getIdentifier() const
Retrieve the type named by the typename specifier as an identifier.
Definition: Type.h:5515
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1856
clang::TypeWithKeyword::getKeyword
ElaboratedTypeKeyword getKeyword() const
Definition: Type.h:5364
clang::DependentDecltypeType
Internal representation of canonical, dependent decltype(expr) types.
Definition: Type.h:4516
clang::ObjCInterfaceType
Interfaces are the core concept in Objective-C for object oriented design.
Definition: Type.h:6016
clang::ObjCObjectType::getTypeArgsAsWritten
ArrayRef< QualType > getTypeArgsAsWritten() const
Retrieve the type arguments of this object type as they were written.
Definition: Type.h:5927
clang::TypeConstraint
Definition: ASTConcept.h:169
clang::DecayedType
Represents a pointer type decayed from an array or function type.
Definition: Type.h:2703
clang::AdjustedType::getOriginalType
QualType getOriginalType() const
Definition: Type.h:2682
clang::ParenType
Sugar for parentheses used when specifying types.
Definition: Type.h:2614
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::FriendDecl::getFriendType
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
Definition: DeclFriend.h:123
clang::UnaryTransformType::getUnderlyingType
QualType getUnderlyingType() const
Definition: Type.h:4556
clang::TemplateArgument::getAsType
QualType getAsType() const
Retrieve the type for a type template argument.
Definition: TemplateBase.h:269
clang::TemplateTemplateParmDecl::isParameterPack
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
Definition: DeclTemplate.h:1670
clang::LValueReferenceType
An lvalue reference type, per C++11 [dcl.ref].
Definition: Type.h:2795
clang::TemplateArgument::Pack
@ Pack
The template argument is actually a parameter pack.
Definition: TemplateBase.h:101
clang::CXXMethodDecl
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:1948
clang::Decl::getDeclContext
DeclContext * getDeclContext()
Definition: DeclBase.h:439
clang::TemplateSpecializationType::getTemplateName
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
Definition: Type.h:5179
clang::TemplateName::DependentTemplate
@ DependentTemplate
A dependent template name that has not been resolved to a template (or set of templates).
Definition: TemplateName.h:220