clang  9.0.0svn
TextNodeDumper.cpp
Go to the documentation of this file.
1 //===--- TextNodeDumper.cpp - Printing of AST nodes -----------------------===//
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 // This file implements AST dumping of components of individual AST nodes.
10 //
11 //===----------------------------------------------------------------------===//
12 
14 #include "clang/AST/DeclFriend.h"
15 #include "clang/AST/DeclOpenMP.h"
16 #include "clang/AST/DeclTemplate.h"
17 #include "clang/AST/LocInfoType.h"
18 
19 using namespace clang;
20 
21 static void dumpPreviousDeclImpl(raw_ostream &OS, ...) {}
22 
23 template <typename T>
24 static void dumpPreviousDeclImpl(raw_ostream &OS, const Mergeable<T> *D) {
25  const T *First = D->getFirstDecl();
26  if (First != D)
27  OS << " first " << First;
28 }
29 
30 template <typename T>
31 static void dumpPreviousDeclImpl(raw_ostream &OS, const Redeclarable<T> *D) {
32  const T *Prev = D->getPreviousDecl();
33  if (Prev)
34  OS << " prev " << Prev;
35 }
36 
37 /// Dump the previous declaration in the redeclaration chain for a declaration,
38 /// if any.
39 static void dumpPreviousDecl(raw_ostream &OS, const Decl *D) {
40  switch (D->getKind()) {
41 #define DECL(DERIVED, BASE) \
42  case Decl::DERIVED: \
43  return dumpPreviousDeclImpl(OS, cast<DERIVED##Decl>(D));
44 #define ABSTRACT_DECL(DECL)
45 #include "clang/AST/DeclNodes.inc"
46  }
47  llvm_unreachable("Decl that isn't part of DeclNodes.inc!");
48 }
49 
50 TextNodeDumper::TextNodeDumper(raw_ostream &OS, bool ShowColors,
51  const SourceManager *SM,
52  const PrintingPolicy &PrintPolicy,
53  const comments::CommandTraits *Traits)
54  : TextTreeStructure(OS, ShowColors), OS(OS), ShowColors(ShowColors), SM(SM),
55  PrintPolicy(PrintPolicy), Traits(Traits) {}
56 
58  const comments::FullComment *FC) {
59  if (!C) {
60  ColorScope Color(OS, ShowColors, NullColor);
61  OS << "<<<NULL>>>";
62  return;
63  }
64 
65  {
66  ColorScope Color(OS, ShowColors, CommentColor);
67  OS << C->getCommentKindName();
68  }
69  dumpPointer(C);
71 
72  ConstCommentVisitor<TextNodeDumper, void,
73  const comments::FullComment *>::visit(C, FC);
74 }
75 
76 void TextNodeDumper::Visit(const Attr *A) {
77  {
78  ColorScope Color(OS, ShowColors, AttrColor);
79 
80  switch (A->getKind()) {
81 #define ATTR(X) \
82  case attr::X: \
83  OS << #X; \
84  break;
85 #include "clang/Basic/AttrList.inc"
86  }
87  OS << "Attr";
88  }
89  dumpPointer(A);
91  if (A->isInherited())
92  OS << " Inherited";
93  if (A->isImplicit())
94  OS << " Implicit";
95 
97 }
98 
100  const Decl *From, StringRef Label) {
101  OS << "TemplateArgument";
102  if (R.isValid())
103  dumpSourceRange(R);
104 
105  if (From)
106  dumpDeclRef(From, Label);
107 
109 }
110 
112  if (!Node) {
113  ColorScope Color(OS, ShowColors, NullColor);
114  OS << "<<<NULL>>>";
115  return;
116  }
117  {
118  ColorScope Color(OS, ShowColors, StmtColor);
119  OS << Node->getStmtClassName();
120  }
121  dumpPointer(Node);
123 
124  if (const auto *E = dyn_cast<Expr>(Node)) {
125  dumpType(E->getType());
126 
127  {
128  ColorScope Color(OS, ShowColors, ValueKindColor);
129  switch (E->getValueKind()) {
130  case VK_RValue:
131  break;
132  case VK_LValue:
133  OS << " lvalue";
134  break;
135  case VK_XValue:
136  OS << " xvalue";
137  break;
138  }
139  }
140 
141  {
142  ColorScope Color(OS, ShowColors, ObjectKindColor);
143  switch (E->getObjectKind()) {
144  case OK_Ordinary:
145  break;
146  case OK_BitField:
147  OS << " bitfield";
148  break;
149  case OK_ObjCProperty:
150  OS << " objcproperty";
151  break;
152  case OK_ObjCSubscript:
153  OS << " objcsubscript";
154  break;
155  case OK_VectorComponent:
156  OS << " vectorcomponent";
157  break;
158  }
159  }
160  }
161 
163 }
164 
165 void TextNodeDumper::Visit(const Type *T) {
166  if (!T) {
167  ColorScope Color(OS, ShowColors, NullColor);
168  OS << "<<<NULL>>>";
169  return;
170  }
171  if (isa<LocInfoType>(T)) {
172  {
173  ColorScope Color(OS, ShowColors, TypeColor);
174  OS << "LocInfo Type";
175  }
176  dumpPointer(T);
177  return;
178  }
179 
180  {
181  ColorScope Color(OS, ShowColors, TypeColor);
182  OS << T->getTypeClassName() << "Type";
183  }
184  dumpPointer(T);
185  OS << " ";
186  dumpBareType(QualType(T, 0), false);
187 
188  QualType SingleStepDesugar =
190  if (SingleStepDesugar != QualType(T, 0))
191  OS << " sugar";
192 
193  if (T->isDependentType())
194  OS << " dependent";
195  else if (T->isInstantiationDependentType())
196  OS << " instantiation_dependent";
197 
198  if (T->isVariablyModifiedType())
199  OS << " variably_modified";
201  OS << " contains_unexpanded_pack";
202  if (T->isFromAST())
203  OS << " imported";
204 
206 }
207 
209  OS << "QualType";
211  OS << " ";
212  dumpBareType(T, false);
213  OS << " " << T.split().Quals.getAsString();
214 }
215 
216 void TextNodeDumper::Visit(const Decl *D) {
217  if (!D) {
218  ColorScope Color(OS, ShowColors, NullColor);
219  OS << "<<<NULL>>>";
220  return;
221  }
222 
223  {
224  ColorScope Color(OS, ShowColors, DeclKindNameColor);
225  OS << D->getDeclKindName() << "Decl";
226  }
227  dumpPointer(D);
228  if (D->getLexicalDeclContext() != D->getDeclContext())
229  OS << " parent " << cast<Decl>(D->getDeclContext());
230  dumpPreviousDecl(OS, D);
232  OS << ' ';
234  if (D->isFromASTFile())
235  OS << " imported";
236  if (Module *M = D->getOwningModule())
237  OS << " in " << M->getFullModuleName();
238  if (auto *ND = dyn_cast<NamedDecl>(D))
240  const_cast<NamedDecl *>(ND)))
241  AddChild([=] { OS << "also in " << M->getFullModuleName(); });
242  if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
243  if (ND->isHidden())
244  OS << " hidden";
245  if (D->isImplicit())
246  OS << " implicit";
247 
248  if (D->isUsed())
249  OS << " used";
250  else if (D->isThisDeclarationReferenced())
251  OS << " referenced";
252 
253  if (D->isInvalidDecl())
254  OS << " invalid";
255  if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D))
256  if (FD->isConstexpr())
257  OS << " constexpr";
258 
259  if (!isa<FunctionDecl>(*D)) {
260  const auto *MD = dyn_cast<ObjCMethodDecl>(D);
261  if (!MD || !MD->isThisDeclarationADefinition()) {
262  const auto *DC = dyn_cast<DeclContext>(D);
263  if (DC && DC->hasExternalLexicalStorage()) {
264  ColorScope Color(OS, ShowColors, UndeserializedColor);
265  OS << " <undeserialized declarations>";
266  }
267  }
268  }
269 
271 }
272 
274  OS << "CXXCtorInitializer";
275  if (Init->isAnyMemberInitializer()) {
276  OS << ' ';
277  dumpBareDeclRef(Init->getAnyMember());
278  } else if (Init->isBaseInitializer()) {
279  dumpType(QualType(Init->getBaseClass(), 0));
280  } else if (Init->isDelegatingInitializer()) {
281  dumpType(Init->getTypeSourceInfo()->getType());
282  } else {
283  llvm_unreachable("Unknown initializer type");
284  }
285 }
286 
288  OS << "capture";
289  if (C.isByRef())
290  OS << " byref";
291  if (C.isNested())
292  OS << " nested";
293  if (C.getVariable()) {
294  OS << ' ';
296  }
297 }
298 
300  if (!C) {
301  ColorScope Color(OS, ShowColors, NullColor);
302  OS << "<<<NULL>>> OMPClause";
303  return;
304  }
305  {
306  ColorScope Color(OS, ShowColors, AttrColor);
307  StringRef ClauseName(getOpenMPClauseName(C->getClauseKind()));
308  OS << "OMP" << ClauseName.substr(/*Start=*/0, /*N=*/1).upper()
309  << ClauseName.drop_front() << "Clause";
310  }
311  dumpPointer(C);
313  if (C->isImplicit())
314  OS << " <implicit>";
315 }
316 
318  const TypeSourceInfo *TSI = A.getTypeSourceInfo();
319  if (TSI) {
320  OS << "case ";
321  dumpType(TSI->getType());
322  } else {
323  OS << "default";
324  }
325 
326  if (A.isSelected())
327  OS << " selected";
328 }
329 
330 void TextNodeDumper::dumpPointer(const void *Ptr) {
331  ColorScope Color(OS, ShowColors, AddressColor);
332  OS << ' ' << Ptr;
333 }
334 
336  if (!SM)
337  return;
338 
339  ColorScope Color(OS, ShowColors, LocationColor);
340  SourceLocation SpellingLoc = SM->getSpellingLoc(Loc);
341 
342  // The general format we print out is filename:line:col, but we drop pieces
343  // that haven't changed since the last loc printed.
344  PresumedLoc PLoc = SM->getPresumedLoc(SpellingLoc);
345 
346  if (PLoc.isInvalid()) {
347  OS << "<invalid sloc>";
348  return;
349  }
350 
351  if (strcmp(PLoc.getFilename(), LastLocFilename) != 0) {
352  OS << PLoc.getFilename() << ':' << PLoc.getLine() << ':'
353  << PLoc.getColumn();
354  LastLocFilename = PLoc.getFilename();
355  LastLocLine = PLoc.getLine();
356  } else if (PLoc.getLine() != LastLocLine) {
357  OS << "line" << ':' << PLoc.getLine() << ':' << PLoc.getColumn();
358  LastLocLine = PLoc.getLine();
359  } else {
360  OS << "col" << ':' << PLoc.getColumn();
361  }
362 }
363 
365  // Can't translate locations if a SourceManager isn't available.
366  if (!SM)
367  return;
368 
369  OS << " <";
370  dumpLocation(R.getBegin());
371  if (R.getBegin() != R.getEnd()) {
372  OS << ", ";
373  dumpLocation(R.getEnd());
374  }
375  OS << ">";
376 
377  // <t2.c:123:421[blah], t2.c:412:321>
378 }
379 
381  ColorScope Color(OS, ShowColors, TypeColor);
382 
383  SplitQualType T_split = T.split();
384  OS << "'" << QualType::getAsString(T_split, PrintPolicy) << "'";
385 
386  if (Desugar && !T.isNull()) {
387  // If the type is sugared, also dump a (shallow) desugared type.
388  SplitQualType D_split = T.getSplitDesugaredType();
389  if (T_split != D_split)
390  OS << ":'" << QualType::getAsString(D_split, PrintPolicy) << "'";
391  }
392 }
393 
395  OS << ' ';
396  dumpBareType(T);
397 }
398 
400  if (!D) {
401  ColorScope Color(OS, ShowColors, NullColor);
402  OS << "<<<NULL>>>";
403  return;
404  }
405 
406  {
407  ColorScope Color(OS, ShowColors, DeclKindNameColor);
408  OS << D->getDeclKindName();
409  }
410  dumpPointer(D);
411 
412  if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
413  ColorScope Color(OS, ShowColors, DeclNameColor);
414  OS << " '" << ND->getDeclName() << '\'';
415  }
416 
417  if (const ValueDecl *VD = dyn_cast<ValueDecl>(D))
418  dumpType(VD->getType());
419 }
420 
422  if (ND->getDeclName()) {
423  ColorScope Color(OS, ShowColors, DeclNameColor);
424  OS << ' ' << ND->getNameAsString();
425  }
426 }
427 
429  switch (AS) {
430  case AS_none:
431  break;
432  case AS_public:
433  OS << "public";
434  break;
435  case AS_protected:
436  OS << "protected";
437  break;
438  case AS_private:
439  OS << "private";
440  break;
441  }
442 }
443 
444 void TextNodeDumper::dumpCXXTemporary(const CXXTemporary *Temporary) {
445  OS << "(CXXTemporary";
446  dumpPointer(Temporary);
447  OS << ")";
448 }
449 
450 void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef Label) {
451  if (!D)
452  return;
453 
454  AddChild([=] {
455  if (!Label.empty())
456  OS << Label << ' ';
457  dumpBareDeclRef(D);
458  });
459 }
460 
461 const char *TextNodeDumper::getCommandName(unsigned CommandID) {
462  if (Traits)
463  return Traits->getCommandInfo(CommandID)->Name;
464  const comments::CommandInfo *Info =
466  if (Info)
467  return Info->Name;
468  return "<not a builtin command>";
469 }
470 
472  const comments::FullComment *) {
473  OS << " Text=\"" << C->getText() << "\"";
474 }
475 
478  OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
479  switch (C->getRenderKind()) {
481  OS << " RenderNormal";
482  break;
484  OS << " RenderBold";
485  break;
487  OS << " RenderMonospaced";
488  break;
490  OS << " RenderEmphasized";
491  break;
492  }
493 
494  for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
495  OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
496 }
497 
500  OS << " Name=\"" << C->getTagName() << "\"";
501  if (C->getNumAttrs() != 0) {
502  OS << " Attrs: ";
503  for (unsigned i = 0, e = C->getNumAttrs(); i != e; ++i) {
505  OS << " \"" << Attr.Name << "=\"" << Attr.Value << "\"";
506  }
507  }
508  if (C->isSelfClosing())
509  OS << " SelfClosing";
510 }
511 
514  OS << " Name=\"" << C->getTagName() << "\"";
515 }
516 
519  OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
520  for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
521  OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
522 }
523 
526  OS << " "
528 
529  if (C->isDirectionExplicit())
530  OS << " explicitly";
531  else
532  OS << " implicitly";
533 
534  if (C->hasParamName()) {
535  if (C->isParamIndexValid())
536  OS << " Param=\"" << C->getParamName(FC) << "\"";
537  else
538  OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
539  }
540 
541  if (C->isParamIndexValid() && !C->isVarArgParam())
542  OS << " ParamIndex=" << C->getParamIndex();
543 }
544 
547  if (C->hasParamName()) {
548  if (C->isPositionValid())
549  OS << " Param=\"" << C->getParamName(FC) << "\"";
550  else
551  OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
552  }
553 
554  if (C->isPositionValid()) {
555  OS << " Position=<";
556  for (unsigned i = 0, e = C->getDepth(); i != e; ++i) {
557  OS << C->getIndex(i);
558  if (i != e - 1)
559  OS << ", ";
560  }
561  OS << ">";
562  }
563 }
564 
567  OS << " Name=\"" << getCommandName(C->getCommandID())
568  << "\""
569  " CloseName=\""
570  << C->getCloseName() << "\"";
571 }
572 
575  const comments::FullComment *) {
576  OS << " Text=\"" << C->getText() << "\"";
577 }
578 
581  OS << " Text=\"" << C->getText() << "\"";
582 }
583 
585  OS << " null";
586 }
587 
589  OS << " type";
590  dumpType(TA.getAsType());
591 }
592 
594  const TemplateArgument &TA) {
595  OS << " decl";
596  dumpDeclRef(TA.getAsDecl());
597 }
598 
600  OS << " nullptr";
601 }
602 
604  OS << " integral " << TA.getAsIntegral();
605 }
606 
608  OS << " template ";
609  TA.getAsTemplate().dump(OS);
610 }
611 
613  const TemplateArgument &TA) {
614  OS << " template expansion ";
616 }
617 
619  OS << " expr";
620 }
621 
623  OS << " pack";
624 }
625 
626 static void dumpBasePath(raw_ostream &OS, const CastExpr *Node) {
627  if (Node->path_empty())
628  return;
629 
630  OS << " (";
631  bool First = true;
632  for (CastExpr::path_const_iterator I = Node->path_begin(),
633  E = Node->path_end();
634  I != E; ++I) {
635  const CXXBaseSpecifier *Base = *I;
636  if (!First)
637  OS << " -> ";
638 
639  const CXXRecordDecl *RD =
640  cast<CXXRecordDecl>(Base->getType()->getAs<RecordType>()->getDecl());
641 
642  if (Base->isVirtual())
643  OS << "virtual ";
644  OS << RD->getName();
645  First = false;
646  }
647 
648  OS << ')';
649 }
650 
652  if (Node->hasInitStorage())
653  OS << " has_init";
654  if (Node->hasVarStorage())
655  OS << " has_var";
656  if (Node->hasElseStorage())
657  OS << " has_else";
658 }
659 
661  if (Node->hasInitStorage())
662  OS << " has_init";
663  if (Node->hasVarStorage())
664  OS << " has_var";
665 }
666 
668  if (Node->hasVarStorage())
669  OS << " has_var";
670 }
671 
673  OS << " '" << Node->getName() << "'";
674 }
675 
677  OS << " '" << Node->getLabel()->getName() << "'";
678  dumpPointer(Node->getLabel());
679 }
680 
682  if (Node->caseStmtIsGNURange())
683  OS << " gnu_range";
684 }
685 
687  if (Node->usesADL())
688  OS << " adl";
689 }
690 
692  OS << " <";
693  {
694  ColorScope Color(OS, ShowColors, CastColor);
695  OS << Node->getCastKindName();
696  }
697  dumpBasePath(OS, Node);
698  OS << ">";
699 }
700 
702  VisitCastExpr(Node);
703  if (Node->isPartOfExplicitCast())
704  OS << " part_of_explicit_cast";
705 }
706 
708  OS << " ";
709  dumpBareDeclRef(Node->getDecl());
710  if (Node->getDecl() != Node->getFoundDecl()) {
711  OS << " (";
712  dumpBareDeclRef(Node->getFoundDecl());
713  OS << ")";
714  }
715 }
716 
718  const UnresolvedLookupExpr *Node) {
719  OS << " (";
720  if (!Node->requiresADL())
721  OS << "no ";
722  OS << "ADL) = '" << Node->getName() << '\'';
723 
725  E = Node->decls_end();
726  if (I == E)
727  OS << " empty";
728  for (; I != E; ++I)
729  dumpPointer(*I);
730 }
731 
733  {
734  ColorScope Color(OS, ShowColors, DeclKindNameColor);
735  OS << " " << Node->getDecl()->getDeclKindName() << "Decl";
736  }
737  OS << "='" << *Node->getDecl() << "'";
738  dumpPointer(Node->getDecl());
739  if (Node->isFreeIvar())
740  OS << " isFreeIvar";
741 }
742 
744  OS << " " << PredefinedExpr::getIdentKindName(Node->getIdentKind());
745 }
746 
748  ColorScope Color(OS, ShowColors, ValueColor);
749  OS << " " << Node->getValue();
750 }
751 
753  bool isSigned = Node->getType()->isSignedIntegerType();
754  ColorScope Color(OS, ShowColors, ValueColor);
755  OS << " " << Node->getValue().toString(10, isSigned);
756 }
757 
759  ColorScope Color(OS, ShowColors, ValueColor);
760  OS << " " << Node->getValueAsString(/*Radix=*/10);
761 }
762 
764  ColorScope Color(OS, ShowColors, ValueColor);
765  OS << " " << Node->getValueAsApproximateDouble();
766 }
767 
769  ColorScope Color(OS, ShowColors, ValueColor);
770  OS << " ";
771  Str->outputString(OS);
772 }
773 
775  if (auto *Field = ILE->getInitializedFieldInUnion()) {
776  OS << " field ";
777  dumpBareDeclRef(Field);
778  }
779 }
780 
782  if (E->isResultDependent())
783  OS << " result_dependent";
784 }
785 
787  OS << " " << (Node->isPostfix() ? "postfix" : "prefix") << " '"
788  << UnaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
789  if (!Node->canOverflow())
790  OS << " cannot overflow";
791 }
792 
795  switch (Node->getKind()) {
796  case UETT_SizeOf:
797  OS << " sizeof";
798  break;
799  case UETT_AlignOf:
800  OS << " alignof";
801  break;
802  case UETT_VecStep:
803  OS << " vec_step";
804  break;
806  OS << " __builtin_omp_required_simd_align";
807  break;
809  OS << " __alignof";
810  break;
811  }
812  if (Node->isArgumentType())
813  dumpType(Node->getArgumentType());
814 }
815 
817  OS << " " << (Node->isArrow() ? "->" : ".") << *Node->getMemberDecl();
818  dumpPointer(Node->getMemberDecl());
819 }
820 
822  const ExtVectorElementExpr *Node) {
823  OS << " " << Node->getAccessor().getNameStart();
824 }
825 
827  OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
828 }
829 
831  const CompoundAssignOperator *Node) {
832  OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode())
833  << "' ComputeLHSTy=";
835  OS << " ComputeResultTy=";
837 }
838 
840  OS << " " << Node->getLabel()->getName();
841  dumpPointer(Node->getLabel());
842 }
843 
845  OS << " " << Node->getCastName() << "<"
846  << Node->getTypeAsWritten().getAsString() << ">"
847  << " <" << Node->getCastKindName();
848  dumpBasePath(OS, Node);
849  OS << ">";
850 }
851 
853  OS << " " << (Node->getValue() ? "true" : "false");
854 }
855 
857  if (Node->isImplicit())
858  OS << " implicit";
859  OS << " this";
860 }
861 
863  const CXXFunctionalCastExpr *Node) {
864  OS << " functional cast to " << Node->getTypeAsWritten().getAsString() << " <"
865  << Node->getCastKindName() << ">";
866 }
867 
870  dumpType(Node->getTypeAsWritten());
871  if (Node->isListInitialization())
872  OS << " list";
873 }
874 
876  CXXConstructorDecl *Ctor = Node->getConstructor();
877  dumpType(Ctor->getType());
878  if (Node->isElidable())
879  OS << " elidable";
880  if (Node->isListInitialization())
881  OS << " list";
882  if (Node->isStdInitListInitialization())
883  OS << " std::initializer_list";
884  if (Node->requiresZeroInitialization())
885  OS << " zeroing";
886 }
887 
889  const CXXBindTemporaryExpr *Node) {
890  OS << " ";
891  dumpCXXTemporary(Node->getTemporary());
892 }
893 
895  if (Node->isGlobalNew())
896  OS << " global";
897  if (Node->isArray())
898  OS << " array";
899  if (Node->getOperatorNew()) {
900  OS << ' ';
902  }
903  // We could dump the deallocation function used in case of error, but it's
904  // usually not that interesting.
905 }
906 
908  if (Node->isGlobalDelete())
909  OS << " global";
910  if (Node->isArrayForm())
911  OS << " array";
912  if (Node->getOperatorDelete()) {
913  OS << ' ';
915  }
916 }
917 
920  if (const ValueDecl *VD = Node->getExtendingDecl()) {
921  OS << " extended by ";
922  dumpBareDeclRef(VD);
923  }
924 }
925 
927  for (unsigned i = 0, e = Node->getNumObjects(); i != e; ++i)
928  dumpDeclRef(Node->getObject(i), "cleanup");
929 }
930 
932  dumpPointer(Node->getPack());
933  dumpName(Node->getPack());
934 }
935 
938  OS << " " << (Node->isArrow() ? "->" : ".") << Node->getMember();
939 }
940 
942  OS << " selector=";
943  Node->getSelector().print(OS);
944  switch (Node->getReceiverKind()) {
946  break;
947 
949  OS << " class=";
951  break;
952 
954  OS << " super (instance)";
955  break;
956 
958  OS << " super (class)";
959  break;
960  }
961 }
962 
964  if (auto *BoxingMethod = Node->getBoxingMethod()) {
965  OS << " selector=";
966  BoxingMethod->getSelector().print(OS);
967  }
968 }
969 
971  if (!Node->getCatchParamDecl())
972  OS << " catch all";
973 }
974 
976  dumpType(Node->getEncodedType());
977 }
978 
980  OS << " ";
981  Node->getSelector().print(OS);
982 }
983 
985  OS << ' ' << *Node->getProtocol();
986 }
987 
989  if (Node->isImplicitProperty()) {
990  OS << " Kind=MethodRef Getter=\"";
991  if (Node->getImplicitPropertyGetter())
993  else
994  OS << "(null)";
995 
996  OS << "\" Setter=\"";
997  if (ObjCMethodDecl *Setter = Node->getImplicitPropertySetter())
998  Setter->getSelector().print(OS);
999  else
1000  OS << "(null)";
1001  OS << "\"";
1002  } else {
1003  OS << " Kind=PropertyRef Property=\"" << *Node->getExplicitProperty()
1004  << '"';
1005  }
1006 
1007  if (Node->isSuperReceiver())
1008  OS << " super";
1009 
1010  OS << " Messaging=";
1011  if (Node->isMessagingGetter() && Node->isMessagingSetter())
1012  OS << "Getter&Setter";
1013  else if (Node->isMessagingGetter())
1014  OS << "Getter";
1015  else if (Node->isMessagingSetter())
1016  OS << "Setter";
1017 }
1018 
1020  const ObjCSubscriptRefExpr *Node) {
1021  if (Node->isArraySubscriptRefExpr())
1022  OS << " Kind=ArraySubscript GetterForArray=\"";
1023  else
1024  OS << " Kind=DictionarySubscript GetterForDictionary=\"";
1025  if (Node->getAtIndexMethodDecl())
1026  Node->getAtIndexMethodDecl()->getSelector().print(OS);
1027  else
1028  OS << "(null)";
1029 
1030  if (Node->isArraySubscriptRefExpr())
1031  OS << "\" SetterForArray=\"";
1032  else
1033  OS << "\" SetterForDictionary=\"";
1034  if (Node->setAtIndexMethodDecl())
1035  Node->setAtIndexMethodDecl()->getSelector().print(OS);
1036  else
1037  OS << "(null)";
1038 }
1039 
1041  OS << " " << (Node->getValue() ? "__objc_yes" : "__objc_no");
1042 }
1043 
1045  if (T->isSpelledAsLValue())
1046  OS << " written as lvalue reference";
1047 }
1048 
1050  switch (T->getSizeModifier()) {
1051  case ArrayType::Normal:
1052  break;
1053  case ArrayType::Static:
1054  OS << " static";
1055  break;
1056  case ArrayType::Star:
1057  OS << " *";
1058  break;
1059  }
1060  OS << " " << T->getIndexTypeQualifiers().getAsString();
1061 }
1062 
1064  OS << " " << T->getSize();
1065  VisitArrayType(T);
1066 }
1067 
1069  OS << " ";
1071  VisitArrayType(T);
1072 }
1073 
1075  const DependentSizedArrayType *T) {
1076  VisitArrayType(T);
1077  OS << " ";
1079 }
1080 
1082  const DependentSizedExtVectorType *T) {
1083  OS << " ";
1085 }
1086 
1088  switch (T->getVectorKind()) {
1090  break;
1092  OS << " altivec";
1093  break;
1095  OS << " altivec pixel";
1096  break;
1098  OS << " altivec bool";
1099  break;
1101  OS << " neon";
1102  break;
1104  OS << " neon poly";
1105  break;
1106  }
1107  OS << " " << T->getNumElements();
1108 }
1109 
1111  auto EI = T->getExtInfo();
1112  if (EI.getNoReturn())
1113  OS << " noreturn";
1114  if (EI.getProducesResult())
1115  OS << " produces_result";
1116  if (EI.getHasRegParm())
1117  OS << " regparm " << EI.getRegParm();
1118  OS << " " << FunctionType::getNameForCallConv(EI.getCC());
1119 }
1120 
1122  auto EPI = T->getExtProtoInfo();
1123  if (EPI.HasTrailingReturn)
1124  OS << " trailing_return";
1125  if (T->isConst())
1126  OS << " const";
1127  if (T->isVolatile())
1128  OS << " volatile";
1129  if (T->isRestrict())
1130  OS << " restrict";
1131  if (T->getExtProtoInfo().Variadic)
1132  OS << " variadic";
1133  switch (EPI.RefQualifier) {
1134  case RQ_None:
1135  break;
1136  case RQ_LValue:
1137  OS << " &";
1138  break;
1139  case RQ_RValue:
1140  OS << " &&";
1141  break;
1142  }
1143  // FIXME: Exception specification.
1144  // FIXME: Consumed parameters.
1145  VisitFunctionType(T);
1146 }
1147 
1149  dumpDeclRef(T->getDecl());
1150 }
1151 
1153  dumpDeclRef(T->getDecl());
1154 }
1155 
1157  switch (T->getUTTKind()) {
1159  OS << " underlying_type";
1160  break;
1161  }
1162 }
1163 
1165  dumpDeclRef(T->getDecl());
1166 }
1167 
1169  OS << " depth " << T->getDepth() << " index " << T->getIndex();
1170  if (T->isParameterPack())
1171  OS << " pack";
1172  dumpDeclRef(T->getDecl());
1173 }
1174 
1176  if (T->isDecltypeAuto())
1177  OS << " decltype(auto)";
1178  if (!T->isDeduced())
1179  OS << " undeduced";
1180 }
1181 
1183  const TemplateSpecializationType *T) {
1184  if (T->isTypeAlias())
1185  OS << " alias";
1186  OS << " ";
1187  T->getTemplateName().dump(OS);
1188 }
1189 
1191  const InjectedClassNameType *T) {
1192  dumpDeclRef(T->getDecl());
1193 }
1194 
1196  dumpDeclRef(T->getDecl());
1197 }
1198 
1200  if (auto N = T->getNumExpansions())
1201  OS << " expansions " << *N;
1202 }
1203 
1205 
1207  dumpName(D);
1209  if (D->isModulePrivate())
1210  OS << " __module_private__";
1211 }
1212 
1214  if (D->isScoped()) {
1215  if (D->isScopedUsingClassTag())
1216  OS << " class";
1217  else
1218  OS << " struct";
1219  }
1220  dumpName(D);
1221  if (D->isModulePrivate())
1222  OS << " __module_private__";
1223  if (D->isFixed())
1224  dumpType(D->getIntegerType());
1225 }
1226 
1228  OS << ' ' << D->getKindName();
1229  dumpName(D);
1230  if (D->isModulePrivate())
1231  OS << " __module_private__";
1232  if (D->isCompleteDefinition())
1233  OS << " definition";
1234 }
1235 
1237  dumpName(D);
1238  dumpType(D->getType());
1239 }
1240 
1242  dumpName(D);
1243  dumpType(D->getType());
1244 
1245  for (const auto *Child : D->chain())
1246  dumpDeclRef(Child);
1247 }
1248 
1250  dumpName(D);
1251  dumpType(D->getType());
1252 
1253  StorageClass SC = D->getStorageClass();
1254  if (SC != SC_None)
1255  OS << ' ' << VarDecl::getStorageClassSpecifierString(SC);
1256  if (D->isInlineSpecified())
1257  OS << " inline";
1258  if (D->isVirtualAsWritten())
1259  OS << " virtual";
1260  if (D->isModulePrivate())
1261  OS << " __module_private__";
1262 
1263  if (D->isPure())
1264  OS << " pure";
1265  if (D->isDefaulted()) {
1266  OS << " default";
1267  if (D->isDeleted())
1268  OS << "_delete";
1269  }
1270  if (D->isDeletedAsWritten())
1271  OS << " delete";
1272  if (D->isTrivial())
1273  OS << " trivial";
1274 
1275  if (const auto *FPT = D->getType()->getAs<FunctionProtoType>()) {
1276  FunctionProtoType::ExtProtoInfo EPI = FPT->getExtProtoInfo();
1277  switch (EPI.ExceptionSpec.Type) {
1278  default:
1279  break;
1280  case EST_Unevaluated:
1281  OS << " noexcept-unevaluated " << EPI.ExceptionSpec.SourceDecl;
1282  break;
1283  case EST_Uninstantiated:
1284  OS << " noexcept-uninstantiated " << EPI.ExceptionSpec.SourceTemplate;
1285  break;
1286  }
1287  }
1288 
1289  if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
1290  if (MD->size_overridden_methods() != 0) {
1291  auto dumpOverride = [=](const CXXMethodDecl *D) {
1292  SplitQualType T_split = D->getType().split();
1293  OS << D << " " << D->getParent()->getName()
1294  << "::" << D->getNameAsString() << " '"
1295  << QualType::getAsString(T_split, PrintPolicy) << "'";
1296  };
1297 
1298  AddChild([=] {
1299  auto Overrides = MD->overridden_methods();
1300  OS << "Overrides: [ ";
1301  dumpOverride(*Overrides.begin());
1302  for (const auto *Override :
1303  llvm::make_range(Overrides.begin() + 1, Overrides.end())) {
1304  OS << ", ";
1305  dumpOverride(Override);
1306  }
1307  OS << " ]";
1308  });
1309  }
1310  }
1311 
1312  // Since NumParams comes from the FunctionProtoType of the FunctionDecl and
1313  // the Params are set later, it is possible for a dump during debugging to
1314  // encounter a FunctionDecl that has been created but hasn't been assigned
1315  // ParmVarDecls yet.
1316  if (!D->param_empty() && !D->param_begin())
1317  OS << " <<<NULL params x " << D->getNumParams() << ">>>";
1318 }
1319 
1321  dumpName(D);
1322  dumpType(D->getType());
1323  if (D->isMutable())
1324  OS << " mutable";
1325  if (D->isModulePrivate())
1326  OS << " __module_private__";
1327 }
1328 
1330  dumpName(D);
1331  dumpType(D->getType());
1332  StorageClass SC = D->getStorageClass();
1333  if (SC != SC_None)
1334  OS << ' ' << VarDecl::getStorageClassSpecifierString(SC);
1335  switch (D->getTLSKind()) {
1336  case VarDecl::TLS_None:
1337  break;
1338  case VarDecl::TLS_Static:
1339  OS << " tls";
1340  break;
1341  case VarDecl::TLS_Dynamic:
1342  OS << " tls_dynamic";
1343  break;
1344  }
1345  if (D->isModulePrivate())
1346  OS << " __module_private__";
1347  if (D->isNRVOVariable())
1348  OS << " nrvo";
1349  if (D->isInline())
1350  OS << " inline";
1351  if (D->isConstexpr())
1352  OS << " constexpr";
1353  if (D->hasInit()) {
1354  switch (D->getInitStyle()) {
1355  case VarDecl::CInit:
1356  OS << " cinit";
1357  break;
1358  case VarDecl::CallInit:
1359  OS << " callinit";
1360  break;
1361  case VarDecl::ListInit:
1362  OS << " listinit";
1363  break;
1364  }
1365  }
1366 }
1367 
1369  dumpName(D);
1370  dumpType(D->getType());
1371 }
1372 
1374  if (D->isNothrow())
1375  OS << " nothrow";
1376 }
1377 
1379  OS << ' ' << D->getImportedModule()->getFullModuleName();
1380 
1381  for (Decl *InitD :
1383  dumpDeclRef(InitD, "initializer");
1384 }
1385 
1387  OS << ' ';
1388  switch (D->getCommentKind()) {
1389  case PCK_Unknown:
1390  llvm_unreachable("unexpected pragma comment kind");
1391  case PCK_Compiler:
1392  OS << "compiler";
1393  break;
1394  case PCK_ExeStr:
1395  OS << "exestr";
1396  break;
1397  case PCK_Lib:
1398  OS << "lib";
1399  break;
1400  case PCK_Linker:
1401  OS << "linker";
1402  break;
1403  case PCK_User:
1404  OS << "user";
1405  break;
1406  }
1407  StringRef Arg = D->getArg();
1408  if (!Arg.empty())
1409  OS << " \"" << Arg << "\"";
1410 }
1411 
1413  const PragmaDetectMismatchDecl *D) {
1414  OS << " \"" << D->getName() << "\" \"" << D->getValue() << "\"";
1415 }
1416 
1418  const OMPDeclareReductionDecl *D) {
1419  dumpName(D);
1420  dumpType(D->getType());
1421  OS << " combiner";
1422  dumpPointer(D->getCombiner());
1423  if (const auto *Initializer = D->getInitializer()) {
1424  OS << " initializer";
1425  dumpPointer(Initializer);
1426  switch (D->getInitializerKind()) {
1428  OS << " omp_priv = ";
1429  break;
1431  OS << " omp_priv ()";
1432  break;
1434  break;
1435  }
1436  }
1437 }
1438 
1440  for (const auto *C : D->clauselists()) {
1441  AddChild([=] {
1442  if (!C) {
1443  ColorScope Color(OS, ShowColors, NullColor);
1444  OS << "<<<NULL>>> OMPClause";
1445  return;
1446  }
1447  {
1448  ColorScope Color(OS, ShowColors, AttrColor);
1449  StringRef ClauseName(getOpenMPClauseName(C->getClauseKind()));
1450  OS << "OMP" << ClauseName.substr(/*Start=*/0, /*N=*/1).upper()
1451  << ClauseName.drop_front() << "Clause";
1452  }
1453  dumpPointer(C);
1454  dumpSourceRange(SourceRange(C->getBeginLoc(), C->getEndLoc()));
1455  });
1456  }
1457 }
1458 
1460  dumpName(D);
1461  dumpType(D->getType());
1462 }
1463 
1465  dumpName(D);
1466  if (D->isInline())
1467  OS << " inline";
1468  if (!D->isOriginalNamespace())
1469  dumpDeclRef(D->getOriginalNamespace(), "original");
1470 }
1471 
1473  OS << ' ';
1475 }
1476 
1478  dumpName(D);
1480 }
1481 
1483  dumpName(D);
1485 }
1486 
1488  const TypeAliasTemplateDecl *D) {
1489  dumpName(D);
1490 }
1491 
1493  VisitRecordDecl(D);
1494  if (!D->isCompleteDefinition())
1495  return;
1496 
1497  AddChild([=] {
1498  {
1499  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1500  OS << "DefinitionData";
1501  }
1502 #define FLAG(fn, name) \
1503  if (D->fn()) \
1504  OS << " " #name;
1505  FLAG(isParsingBaseSpecifiers, parsing_base_specifiers);
1506 
1507  FLAG(isGenericLambda, generic);
1508  FLAG(isLambda, lambda);
1509 
1510  FLAG(canPassInRegisters, pass_in_registers);
1511  FLAG(isEmpty, empty);
1512  FLAG(isAggregate, aggregate);
1513  FLAG(isStandardLayout, standard_layout);
1514  FLAG(isTriviallyCopyable, trivially_copyable);
1515  FLAG(isPOD, pod);
1516  FLAG(isTrivial, trivial);
1517  FLAG(isPolymorphic, polymorphic);
1518  FLAG(isAbstract, abstract);
1519  FLAG(isLiteral, literal);
1520 
1521  FLAG(hasUserDeclaredConstructor, has_user_declared_ctor);
1522  FLAG(hasConstexprNonCopyMoveConstructor, has_constexpr_non_copy_move_ctor);
1523  FLAG(hasMutableFields, has_mutable_fields);
1524  FLAG(hasVariantMembers, has_variant_members);
1525  FLAG(allowConstDefaultInit, can_const_default_init);
1526 
1527  AddChild([=] {
1528  {
1529  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1530  OS << "DefaultConstructor";
1531  }
1532  FLAG(hasDefaultConstructor, exists);
1533  FLAG(hasTrivialDefaultConstructor, trivial);
1534  FLAG(hasNonTrivialDefaultConstructor, non_trivial);
1535  FLAG(hasUserProvidedDefaultConstructor, user_provided);
1536  FLAG(hasConstexprDefaultConstructor, constexpr);
1537  FLAG(needsImplicitDefaultConstructor, needs_implicit);
1538  FLAG(defaultedDefaultConstructorIsConstexpr, defaulted_is_constexpr);
1539  });
1540 
1541  AddChild([=] {
1542  {
1543  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1544  OS << "CopyConstructor";
1545  }
1546  FLAG(hasSimpleCopyConstructor, simple);
1547  FLAG(hasTrivialCopyConstructor, trivial);
1548  FLAG(hasNonTrivialCopyConstructor, non_trivial);
1549  FLAG(hasUserDeclaredCopyConstructor, user_declared);
1550  FLAG(hasCopyConstructorWithConstParam, has_const_param);
1551  FLAG(needsImplicitCopyConstructor, needs_implicit);
1552  FLAG(needsOverloadResolutionForCopyConstructor,
1553  needs_overload_resolution);
1555  FLAG(defaultedCopyConstructorIsDeleted, defaulted_is_deleted);
1556  FLAG(implicitCopyConstructorHasConstParam, implicit_has_const_param);
1557  });
1558 
1559  AddChild([=] {
1560  {
1561  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1562  OS << "MoveConstructor";
1563  }
1564  FLAG(hasMoveConstructor, exists);
1565  FLAG(hasSimpleMoveConstructor, simple);
1566  FLAG(hasTrivialMoveConstructor, trivial);
1567  FLAG(hasNonTrivialMoveConstructor, non_trivial);
1568  FLAG(hasUserDeclaredMoveConstructor, user_declared);
1569  FLAG(needsImplicitMoveConstructor, needs_implicit);
1570  FLAG(needsOverloadResolutionForMoveConstructor,
1571  needs_overload_resolution);
1573  FLAG(defaultedMoveConstructorIsDeleted, defaulted_is_deleted);
1574  });
1575 
1576  AddChild([=] {
1577  {
1578  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1579  OS << "CopyAssignment";
1580  }
1581  FLAG(hasTrivialCopyAssignment, trivial);
1582  FLAG(hasNonTrivialCopyAssignment, non_trivial);
1583  FLAG(hasCopyAssignmentWithConstParam, has_const_param);
1584  FLAG(hasUserDeclaredCopyAssignment, user_declared);
1585  FLAG(needsImplicitCopyAssignment, needs_implicit);
1586  FLAG(needsOverloadResolutionForCopyAssignment, needs_overload_resolution);
1587  FLAG(implicitCopyAssignmentHasConstParam, implicit_has_const_param);
1588  });
1589 
1590  AddChild([=] {
1591  {
1592  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1593  OS << "MoveAssignment";
1594  }
1595  FLAG(hasMoveAssignment, exists);
1596  FLAG(hasSimpleMoveAssignment, simple);
1597  FLAG(hasTrivialMoveAssignment, trivial);
1598  FLAG(hasNonTrivialMoveAssignment, non_trivial);
1599  FLAG(hasUserDeclaredMoveAssignment, user_declared);
1600  FLAG(needsImplicitMoveAssignment, needs_implicit);
1601  FLAG(needsOverloadResolutionForMoveAssignment, needs_overload_resolution);
1602  });
1603 
1604  AddChild([=] {
1605  {
1606  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1607  OS << "Destructor";
1608  }
1609  FLAG(hasSimpleDestructor, simple);
1610  FLAG(hasIrrelevantDestructor, irrelevant);
1611  FLAG(hasTrivialDestructor, trivial);
1612  FLAG(hasNonTrivialDestructor, non_trivial);
1613  FLAG(hasUserDeclaredDestructor, user_declared);
1614  FLAG(needsImplicitDestructor, needs_implicit);
1615  FLAG(needsOverloadResolutionForDestructor, needs_overload_resolution);
1617  FLAG(defaultedDestructorIsDeleted, defaulted_is_deleted);
1618  });
1619  });
1620 
1621  for (const auto &I : D->bases()) {
1622  AddChild([=] {
1623  if (I.isVirtual())
1624  OS << "virtual ";
1625  dumpAccessSpecifier(I.getAccessSpecifier());
1626  dumpType(I.getType());
1627  if (I.isPackExpansion())
1628  OS << "...";
1629  });
1630  }
1631 }
1632 
1634  dumpName(D);
1635 }
1636 
1638  dumpName(D);
1639 }
1640 
1642  dumpName(D);
1643 }
1644 
1646  dumpName(D);
1647 }
1648 
1650  if (D->wasDeclaredWithTypename())
1651  OS << " typename";
1652  else
1653  OS << " class";
1654  OS << " depth " << D->getDepth() << " index " << D->getIndex();
1655  if (D->isParameterPack())
1656  OS << " ...";
1657  dumpName(D);
1658 }
1659 
1661  const NonTypeTemplateParmDecl *D) {
1662  dumpType(D->getType());
1663  OS << " depth " << D->getDepth() << " index " << D->getIndex();
1664  if (D->isParameterPack())
1665  OS << " ...";
1666  dumpName(D);
1667 }
1668 
1670  const TemplateTemplateParmDecl *D) {
1671  OS << " depth " << D->getDepth() << " index " << D->getIndex();
1672  if (D->isParameterPack())
1673  OS << " ...";
1674  dumpName(D);
1675 }
1676 
1678  OS << ' ';
1679  if (D->getQualifier())
1681  OS << D->getNameAsString();
1682 }
1683 
1685  const UnresolvedUsingTypenameDecl *D) {
1686  OS << ' ';
1687  if (D->getQualifier())
1689  OS << D->getNameAsString();
1690 }
1691 
1693  const UnresolvedUsingValueDecl *D) {
1694  OS << ' ';
1695  if (D->getQualifier())
1697  OS << D->getNameAsString();
1698  dumpType(D->getType());
1699 }
1700 
1702  OS << ' ';
1704 }
1705 
1707  const ConstructorUsingShadowDecl *D) {
1708  if (D->constructsVirtualBase())
1709  OS << " virtual";
1710 
1711  AddChild([=] {
1712  OS << "target ";
1714  });
1715 
1716  AddChild([=] {
1717  OS << "nominated ";
1719  OS << ' ';
1721  });
1722 
1723  AddChild([=] {
1724  OS << "constructed ";
1726  OS << ' ';
1728  });
1729 }
1730 
1732  switch (D->getLanguage()) {
1734  OS << " C";
1735  break;
1737  OS << " C++";
1738  break;
1739  }
1740 }
1741 
1743  OS << ' ';
1745 }
1746 
1748  if (TypeSourceInfo *T = D->getFriendType())
1749  dumpType(T->getType());
1750 }
1751 
1753  dumpName(D);
1754  dumpType(D->getType());
1755  if (D->getSynthesize())
1756  OS << " synthesize";
1757 
1758  switch (D->getAccessControl()) {
1759  case ObjCIvarDecl::None:
1760  OS << " none";
1761  break;
1762  case ObjCIvarDecl::Private:
1763  OS << " private";
1764  break;
1766  OS << " protected";
1767  break;
1768  case ObjCIvarDecl::Public:
1769  OS << " public";
1770  break;
1771  case ObjCIvarDecl::Package:
1772  OS << " package";
1773  break;
1774  }
1775 }
1776 
1778  if (D->isInstanceMethod())
1779  OS << " -";
1780  else
1781  OS << " +";
1782  dumpName(D);
1783  dumpType(D->getReturnType());
1784 
1785  if (D->isVariadic())
1786  OS << " variadic";
1787 }
1788 
1790  dumpName(D);
1791  switch (D->getVariance()) {
1793  break;
1794 
1796  OS << " covariant";
1797  break;
1798 
1800  OS << " contravariant";
1801  break;
1802  }
1803 
1804  if (D->hasExplicitBound())
1805  OS << " bounded";
1807 }
1808 
1810  dumpName(D);
1813  for (const auto *P : D->protocols())
1814  dumpDeclRef(P);
1815 }
1816 
1818  dumpName(D);
1821 }
1822 
1824  dumpName(D);
1825 
1826  for (const auto *Child : D->protocols())
1827  dumpDeclRef(Child);
1828 }
1829 
1831  dumpName(D);
1832  dumpDeclRef(D->getSuperClass(), "super");
1833 
1835  for (const auto *Child : D->protocols())
1836  dumpDeclRef(Child);
1837 }
1838 
1840  const ObjCImplementationDecl *D) {
1841  dumpName(D);
1842  dumpDeclRef(D->getSuperClass(), "super");
1844 }
1845 
1847  const ObjCCompatibleAliasDecl *D) {
1848  dumpName(D);
1850 }
1851 
1853  dumpName(D);
1854  dumpType(D->getType());
1855 
1857  OS << " required";
1859  OS << " optional";
1860 
1862  if (Attrs != ObjCPropertyDecl::OBJC_PR_noattr) {
1864  OS << " readonly";
1866  OS << " assign";
1868  OS << " readwrite";
1870  OS << " retain";
1871  if (Attrs & ObjCPropertyDecl::OBJC_PR_copy)
1872  OS << " copy";
1874  OS << " nonatomic";
1876  OS << " atomic";
1877  if (Attrs & ObjCPropertyDecl::OBJC_PR_weak)
1878  OS << " weak";
1880  OS << " strong";
1882  OS << " unsafe_unretained";
1883  if (Attrs & ObjCPropertyDecl::OBJC_PR_class)
1884  OS << " class";
1886  dumpDeclRef(D->getGetterMethodDecl(), "getter");
1888  dumpDeclRef(D->getSetterMethodDecl(), "setter");
1889  }
1890 }
1891 
1893  dumpName(D->getPropertyDecl());
1895  OS << " synthesize";
1896  else
1897  OS << " dynamic";
1900 }
1901 
1903  if (D->isVariadic())
1904  OS << " variadic";
1905 
1906  if (D->capturesCXXThis())
1907  OS << " captures_this";
1908 }
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:570
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
Definition: DeclCXX.h:2332
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:1054
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node)
bool path_empty() const
Definition: Expr.h:3106
void VisitVarTemplateDecl(const VarTemplateDecl *D)
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
Definition: DeclCXX.h:3208
Represents a function declaration or definition.
Definition: Decl.h:1737
static const TerminalColor StmtColor
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
Definition: Expr.h:1184
void VisitGenericSelectionExpr(const GenericSelectionExpr *E)
bool getValue() const
Definition: ExprObjC.h:93
bool isVarArgParam() const LLVM_READONLY
Definition: Comment.h:776
The receiver is an object instance.
Definition: ExprObjC.h:1048
void VisitCXXDeleteExpr(const CXXDeleteExpr *Node)
protocol_range protocols() const
Definition: DeclObjC.h:1365
A class which contains all the information about a particular captured value.
Definition: Decl.h:3863
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
Definition: DeclBase.h:754
Represents the dependent type named by a dependently-scoped typename using declaration, e.g.
Definition: Type.h:4126
void VisitIfStmt(const IfStmt *Node)
StringRef getArgText(unsigned Idx) const
Definition: Comment.h:672
A (possibly-)qualified type.
Definition: Type.h:634
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
const char * getDeclKindName() const
Definition: DeclBase.cpp:122
base_class_range bases()
Definition: DeclCXX.h:822
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition: Expr.h:2811
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition: ExprObjC.h:847
ObjCInterfaceDecl * getClassInterface()
Definition: DeclObjC.h:2324
Selector getSelector() const
Definition: ExprObjC.cpp:337
void VisitCXXConstructExpr(const CXXConstructExpr *Node)
ObjCIvarDecl * getPropertyIvarDecl() const
Definition: DeclObjC.h:2826
bool isSuperReceiver() const
Definition: ExprObjC.h:732
bool hasVarStorage() const
True if this IfStmt has storage for a variable declaration.
Definition: Stmt.h:1776
static void dumpPreviousDeclImpl(raw_ostream &OS,...)
bool isListInitialization() const
Determine whether this expression models list-initialization.
Definition: ExprCXX.h:3222
bool isPositionValid() const LLVM_READONLY
Definition: Comment.h:842
void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D)
ObjCProtocolDecl * getProtocol() const
Definition: ExprObjC.h:483
Stmt - This represents one statement.
Definition: Stmt.h:65
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: Type.h:3360
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1706
ObjCMethodDecl * setAtIndexMethodDecl() const
Definition: ExprObjC.h:851
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:2785
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:1019
Represents the declaration of a typedef-name via the &#39;typedef&#39; type specifier.
Definition: Decl.h:3017
void VisitOMPRequiresDecl(const OMPRequiresDecl *D)
bool isDecltypeAuto() const
Definition: Type.h:4765
void VisitPredefinedExpr(const PredefinedExpr *Node)
void VisitCompoundAssignOperator(const CompoundAssignOperator *Node)
void VisitFriendDecl(const FriendDecl *D)
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
Definition: DeclCXX.h:1190
TagDecl * getDecl() const
Definition: Type.cpp:3222
void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node)
ObjCMethodDecl * getImplicitPropertySetter() const
Definition: ExprObjC.h:673
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
bool isNothrow() const
Definition: Decl.cpp:4474
FunctionDecl * getOperatorNew() const
Definition: ExprCXX.h:2032
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
Definition: DeclCXX.h:244
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:2827
Defines the C++ template declaration subclasses.
Opcode getOpcode() const
Definition: Expr.h:3348
Represents a C++11 auto or C++14 decltype(auto) type.
Definition: Type.h:4754
void visitTParamCommandComment(const comments::TParamCommandComment *C, const comments::FullComment *FC)
void VisitCaseStmt(const CaseStmt *Node)
The base class of the type hierarchy.
Definition: Type.h:1409
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
Definition: ExprCXX.h:1372
void VisitCastExpr(const CastExpr *Node)
The parameter is covariant, e.g., X<T> is a subtype of X<U> when the type parameter is covariant and ...
Declaration of a variable template.
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Definition: Type.h:2817
void VisitImportDecl(const ImportDecl *D)
Represent a C++ namespace.
Definition: Decl.h:514
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1261
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:796
RetTy Visit(const Type *T)
Performs the operation associated with this visitor object.
Definition: TypeVisitor.h:68
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:97
StringRef getParamName(const FullComment *FC) const
Definition: Comment.cpp:356
A container of type source information.
Definition: Decl.h:86
void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D)
bool hasVarStorage() const
True if this SwitchStmt has storage for a condition variable.
Definition: Stmt.h:1963
IdentKind getIdentKind() const
Definition: Expr.h:1839
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node)
TemplateTypeParmDecl * getDecl() const
Definition: Type.h:4574
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2491
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:4155
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
Definition: Decl.h:1999
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class...
Definition: DeclCXX.h:1007
void VisitObjCProtocolDecl(const ObjCProtocolDecl *D)
static const TerminalColor ObjectKindColor
void dumpSourceRange(SourceRange R)
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
Definition: Decl.h:3168
Represents a #pragma comment line.
Definition: Decl.h:139
void VisitSizeOfPackExpr(const SizeOfPackExpr *Node)
void VisitTypedefDecl(const TypedefDecl *D)
const CXXBaseSpecifier *const * path_const_iterator
Definition: Expr.h:3105
unsigned getDepth() const
Get the nesting depth of the template parameter.
FriendDecl - Represents the declaration of a friend entity, which can be a function, a type, or a templated function or type.
Definition: DeclFriend.h:53
An Objective-C array/dictionary subscripting which reads an object or writes at the subscripted array...
Definition: Specifiers.h:140
Represents a variable declaration or definition.
Definition: Decl.h:812
StringRef getArgText(unsigned Idx) const
Definition: Comment.h:360
void VisitTagType(const TagType *T)
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
Definition: Decl.h:3528
const T * getAs() const
Member-template getAs<specific type>&#39;.
Definition: Type.h:6761
ObjCCategoryImplDecl * getImplementation() const
Definition: DeclObjC.cpp:2019
void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node)
Extra information about a function prototype.
Definition: Type.h:3772
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:138
bool hasInitStorage() const
True if this SwitchStmt has storage for an init statement.
Definition: Stmt.h:1960
void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D)
void VisitVectorType(const VectorType *T)
void VisitClassTemplateDecl(const ClassTemplateDecl *D)
DeclarationName getName() const
Gets the name looked up.
Definition: ExprCXX.h:2743
bool isConst() const
Definition: Type.h:3635
const char * getName() const
Definition: Stmt.cpp:340
bool isInvalidDecl() const
Definition: DeclBase.h:544
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition: ExprCXX.h:2895
Not a TLS variable.
Definition: Decl.h:829
Describes how types, statements, expressions, and declarations should be printed. ...
Definition: PrettyPrinter.h:37
unsigned getIndex(unsigned Depth) const
Definition: Comment.h:851
protocol_range protocols() const
Definition: DeclObjC.h:2128
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:3088
Represents the builtin template declaration which is used to implement __make_integer_seq and other b...
void VisitBindingDecl(const BindingDecl *D)
const ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.h:2688
ObjCPropertyDecl * getExplicitProperty() const
Definition: ExprObjC.h:663
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
void VisitTemplateSpecializationType(const TemplateSpecializationType *T)
Information about a single command.
const char * getStmtClassName() const
Definition: Stmt.cpp:74
SourceLocation getAttributeLoc() const
Definition: Type.h:3150
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1612
Represents a struct/union/class.
Definition: Decl.h:3592
void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node)
clauselist_range clauselists()
Definition: DeclOpenMP.h:390
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Definition: DeclCXX.h:2867
void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D)
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:297
const char * getOpenMPClauseName(OpenMPClauseKind Kind)
Definition: OpenMPKinds.cpp:61
Provides common interface for the Decls that can be redeclared.
Definition: Redeclarable.h:84
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node)
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
Definition: DeclFriend.h:123
unsigned getDepth() const
Retrieve the depth of the template parameter.
QualType getComputationResultType() const
Definition: Expr.h:3556
bool isImplicit() const
Returns true if the attribute has been implicitly created instead of explicitly written by the user...
Definition: Attr.h:101
void VisitObjCIvarDecl(const ObjCIvarDecl *D)
A vector component is an element or range of elements on a vector.
Definition: Specifiers.h:131
bool isInline() const
Returns true if this is an inline namespace declaration.
Definition: Decl.h:575
is ARM Neon vector
Definition: Type.h:3189
RenderKind getRenderKind() const
Definition: Comment.h:352
Used for GCC&#39;s __alignof.
Definition: TypeTraits.h:106
The parameter is contravariant, e.g., X<T> is a subtype of X<U> when the type parameter is covariant ...
bool isSpelledAsLValue() const
Definition: Type.h:2694
void VisitPackTemplateArgument(const TemplateArgument &TA)
Represents a member of a struct/union/class.
Definition: Decl.h:2578
void VisitEnumConstantDecl(const EnumConstantDecl *D)
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
Definition: Type.h:4909
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
Definition: DeclCXX.h:2393
void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D)
StringRef getText() const LLVM_READONLY
Definition: Comment.h:883
StringRef getValue() const
Definition: Decl.h:197
void VisitTypeAliasDecl(const TypeAliasDecl *D)
InitKind getInitializerKind() const
Get initializer kind.
Definition: DeclOpenMP.h:173
ObjCMethodDecl * getSetterMethodDecl() const
Definition: DeclObjC.h:924
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:31
void VisitFunctionProtoType(const FunctionProtoType *T)
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
Definition: DeclBase.h:408
void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D)
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:5320
Represents an access specifier followed by colon &#39;:&#39;.
Definition: DeclCXX.h:131
void VisitUsingDecl(const UsingDecl *D)
Describes a module or submodule.
Definition: Module.h:64
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
Definition: Specifiers.h:109
Selector getSelector() const
Definition: ExprObjC.h:435
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:73
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
StringRef getOpcodeStr() const
Definition: Expr.h:3369
void VisitSwitchStmt(const SwitchStmt *Node)
A command with word-like arguments that is considered inline content.
Definition: Comment.h:298
Describes an C or C++ initializer list.
Definition: Expr.h:4211
Represents a C++ using-declaration.
Definition: DeclCXX.h:3359
void VisitRecordDecl(const RecordDecl *D)
void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node)
Expr * getInitializer()
Get initializer expression (if specified) of the declare reduction construct.
Definition: DeclOpenMP.h:170
UnresolvedUsingTypenameDecl * getDecl() const
Definition: Type.h:4137
AssociationTy< true > ConstAssociation
Definition: Expr.h:5196
void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D)
An lvalue ref-qualifier was provided (&).
Definition: Type.h:1365
A line of text contained in a verbatim block.
Definition: Comment.h:863
bool isMessagingSetter() const
True if the property reference will result in a message to the setter.
Definition: ExprObjC.h:700
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2209
void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D)
std::string getFullModuleName(bool AllowStringLiterals=false) const
Retrieve the full name of this module, including the path from its top-level module.
Definition: Module.cpp:213
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1339
bool isGlobalNew() const
Definition: ExprCXX.h:2073
A verbatim line command.
Definition: Comment.h:943
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node)
ArrayRef< NamedDecl * > chain() const
Definition: Decl.h:2846
An x-value expression is a reference to an object with independent storage but which can be "moved"...
Definition: Specifiers.h:118
bool isTypeAlias() const
Determine if this template specialization type is for a type alias template that has been substituted...
Definition: Type.h:4894
path_iterator path_begin()
Definition: Expr.h:3108
PropertyAttributeKind getPropertyAttributes() const
Definition: DeclObjC.h:839
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node)
const clang::PrintingPolicy & getPrintingPolicy() const
Definition: ASTContext.h:653
bool isByRef() const
Whether this is a "by ref" capture, i.e.
Definition: Decl.h:3888
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
Definition: Type.h:1833
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3313
static bool isPostfix(Opcode Op)
isPostfix - Return true if this is a postfix operation, like x++.
Definition: Expr.h:1976
Any part of the comment.
Definition: Comment.h:52
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node)
bool hasElseStorage() const
True if this IfStmt has storage for an else statement.
Definition: Stmt.h:1779
CXXRecordDecl * getDecl() const
Definition: Type.cpp:3312
bool isArrow() const
Definition: Expr.h:2912
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
Definition: Decl.h:1381
static const TerminalColor DeclNameColor
void VisitTemplateTypeParmType(const TemplateTypeParmType *T)
void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA)
static const TerminalColor LocationColor
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
CaseStmt - Represent a case statement.
Definition: Stmt.h:1390
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
bool isAnyMemberInitializer() const
Definition: DeclCXX.h:2340
void dumpLocation(SourceLocation Loc)
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3036
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2063
unsigned getParamIndex() const LLVM_READONLY
Definition: Comment.h:785
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1216
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC)...
Definition: DeclBase.h:823
SourceLocation getSpellingLoc(SourceLocation Loc) const
Given a SourceLocation object, return the spelling location referenced by the ID. ...
CXXTemporary * getTemporary()
Definition: ExprCXX.h:1235
FieldDecl * getAnyMember() const
Definition: DeclCXX.h:2405
PropertyControl getPropertyImplementation() const
Definition: DeclObjC.h:932
void * getAsOpaquePtr() const
Definition: Type.h:679
void VisitLabelStmt(const LabelStmt *Node)
An ordinary object is located at an address in memory.
Definition: Specifiers.h:125
bool hasExplicitBound() const
Whether this type parameter has an explicitly-written type bound, e.g., "T : NSView".
Definition: DeclObjC.h:618
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3283
Represents the body of a CapturedStmt, and serves as its DeclContext.
Definition: Decl.h:4043
Represents an ObjC class declaration.
Definition: DeclObjC.h:1171
Represents a linkage specification.
Definition: DeclCXX.h:2833
QualType getReturnType() const
Definition: DeclObjC.h:322
void print(raw_ostream &OS, const PrintingPolicy &Policy, bool ResolveTemplateArguments=false) const
Print this nested name specifier to the given output stream.
void VisitObjCImplementationDecl(const ObjCImplementationDecl *D)
is ARM Neon polynomial vector
Definition: Type.h:3192
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
FunctionDecl * SourceDecl
The function whose exception specification this is, for EST_Unevaluated and EST_Uninstantiated.
Definition: Type.h:3758
SplitQualType getSplitDesugaredType() const
Definition: Type.h:938
A binding in a decomposition declaration.
Definition: DeclCXX.h:3802
void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
Represents an extended vector type where either the type or size is dependent.
Definition: Type.h:3133
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
param_iterator param_begin()
Definition: Decl.h:2273
Represents the this expression in C++.
Definition: ExprCXX.h:975
Module * getImportedModule() const
Retrieve the module that was imported by the import declaration.
Definition: Decl.h:4192
ObjCIvarDecl * getDecl()
Definition: ExprObjC.h:536
StringRef getArg() const
Definition: Decl.h:164
bool isArrayForm() const
Definition: ExprCXX.h:2196
static bool canPassInRegisters(Sema &S, CXXRecordDecl *D, TargetInfo::CallingConvKind CCK)
Determine whether a type is permitted to be passed or returned in registers, per C++ [class...
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Definition: DeclObjC.h:2758
#define FLAG(fn, name)
QualType getTypeAsWritten() const
getTypeAsWritten - Returns the type that this expression is casting to, as written in the source code...
Definition: Expr.h:3239
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
Definition: Redeclarable.h:318
A verbatim block command (e.
Definition: Comment.h:891
void VisitInjectedClassNameType(const InjectedClassNameType *T)
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition: ExprCXX.h:4218
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T)
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
StringRef getText() const LLVM_READONLY
Definition: Comment.h:282
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Definition: ExprCXX.h:1363
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Definition: Decl.h:3037
ArrayRef< Module * > getModulesWithMergedDefinition(const NamedDecl *Def)
Get the additional modules in which the definition Def has been merged.
Definition: ASTContext.h:989
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3692
void VisitImplicitCastExpr(const ImplicitCastExpr *Node)
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1333
QualType getComputationLHSType() const
Definition: Expr.h:3553
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
Definition: OpenMPClause.h:78
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
Definition: DeclCXX.h:2360
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
Definition: Expr.h:2255
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node)
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
void VisitCXXRecordDecl(const CXXRecordDecl *D)
Expr * getCombiner()
Get combiner expression of the declare reduction construct.
Definition: DeclOpenMP.h:152
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
Definition: TemplateBase.h:263
void outputString(raw_ostream &OS) const
Definition: Expr.cpp:1004
This represents &#39;#pragma omp requires...&#39; directive.
Definition: DeclOpenMP.h:345
unsigned getValue() const
Definition: Expr.h:1459
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
Definition: Specifiers.h:135
Represents an array type in C++ whose size is a value-dependent expression.
Definition: Type.h:3031
ObjCMethodDecl * getBoxingMethod() const
Definition: ExprObjC.h:137
static const TerminalColor ValueColor
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Definition: Decl.h:2341
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Definition: DeclCXX.h:3247
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:3857
static const TerminalColor CommentColor
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:636
StringRef getKindName() const
Definition: Decl.h:3238
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
void visitInlineCommandComment(const comments::InlineCommandComment *C, const comments::FullComment *)
bool isDefaulted() const
Whether this function is defaulted per C++0x.
Definition: Decl.h:2033
bool isInvalid() const
Return true if this object is invalid or uninitialized.
std::string Label
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3522
Declaration of a template type parameter.
unsigned getIndex() const
Definition: Type.h:4571
void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node)
unsigned getLine() const
Return the presumed line number of this location.
void visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node)
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
Definition: DeclBase.h:549
TextNodeDumper(raw_ostream &OS, bool ShowColors, const SourceManager *SM, const PrintingPolicy &PrintPolicy, const comments::CommandTraits *Traits)
const char * getTypeClassName() const
Definition: Type.cpp:2702
QualType getArgumentType() const
Definition: Expr.h:2292
A command that has zero or more word-like arguments (number of word-like arguments depends on command...
Definition: Comment.h:596
DeclContext * getDeclContext()
Definition: DeclBase.h:429
ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.cpp:337
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:422
TLSKind getTLSKind() const
Definition: Decl.cpp:1935
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:3843
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:2330
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
ConstructorUsingShadowDecl * getNominatedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the direct base class from which this using shadow dec...
Definition: DeclCXX.h:3314
IdentifierInfo & getAccessor() const
Definition: Expr.h:5342
void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D)
decls_iterator decls_begin() const
Definition: ExprCXX.h:2726
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
Definition: DeclCXX.h:3330
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
Definition: Type.h:573
void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D)
bool isSignedIntegerType() const
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char, signed char, short, int, long..], or an enum decl which has a signed representation.
Definition: Type.cpp:1844
void print(llvm::raw_ostream &OS) const
Prints the full selector name (e.g. "foo:bar:").
QualType getType() const
Definition: Expr.h:130
static const TerminalColor ValueKindColor
StorageClass
Storage classes.
Definition: Specifiers.h:205
A unary type transform, which is a type constructed from another.
Definition: Type.h:4294
void VisitGotoStmt(const GotoStmt *Node)
void dump(raw_ostream &OS) const
Debugging aid that dumps the template name.
Direct list-initialization (C++11)
Definition: Decl.h:823
Qualifiers Quals
The local qualifiers.
Definition: Type.h:578
bool isDirectionExplicit() const LLVM_READONLY
Definition: Comment.h:749
Declaration of an alias template.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
Definition: DeclBase.h:1755
LabelDecl * getLabel() const
Definition: Stmt.h:2336
QualType getEncodedType() const
Definition: ExprObjC.h:400
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:897
void VisitTypedefType(const TypedefType *T)
Represents an unpacked "presumed" location which can be presented to the user.
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition: ExprObjC.h:668
SourceLocation getEnd() const
UnaryOperator - This represents the unary-expression&#39;s (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
Definition: Expr.h:1929
bool isInstanceMethod() const
Definition: DeclObjC.h:421
void dumpBareType(QualType T, bool Desugar=true)
Represents a GCC generic vector type.
Definition: Type.h:3173
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition: ExprObjC.h:1181
An opening HTML tag with attributes.
Definition: Comment.h:413
ArraySizeModifier getSizeModifier() const
Definition: Type.h:2854
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
UTTKind getUTTKind() const
Definition: Type.h:4322
StringRef getName() const
Definition: Decl.h:196
ValueDecl * getDecl()
Definition: Expr.h:1147
void VisitPragmaCommentDecl(const PragmaCommentDecl *D)
Selector getSelector() const
Definition: DeclObjC.h:320
std::string getAsString() const
static QualType Desugar(ASTContext &Context, QualType QT, bool &ShouldAKA)
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
Definition: Decl.h:2025
void VisitExprWithCleanups(const ExprWithCleanups *Node)
bool isNull() const
Return true if this QualType doesn&#39;t point to a type yet.
Definition: Type.h:699
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
Definition: Decl.h:1278
void visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
void VisitFloatingLiteral(const FloatingLiteral *Node)
QualType getType() const
Definition: DeclObjC.h:828
bool getValue() const
Definition: ExprCXX.h:573
const SourceManager & SM
Definition: Format.cpp:1489
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
static const char * getDirectionAsString(PassDirection D)
Definition: Comment.cpp:177
void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D)
void VisitCapturedDecl(const CapturedDecl *D)
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition: DeclCXX.h:3713
void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D)
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
Definition: Type.h:6085
const char * getFilename() const
Return the presumed filename of this location.
This class provides information about commands that can be used in comments.
void VisitIndirectFieldDecl(const IndirectFieldDecl *D)
is AltiVec &#39;vector Pixel&#39;
Definition: Type.h:3183
static StringRef getIdentKindName(IdentKind IK)
Definition: Expr.cpp:512
not a target-specific vector type
Definition: Type.h:3177
ExceptionSpecificationType Type
The kind of exception specification this is.
Definition: Type.h:3748
bool isImplicitProperty() const
Definition: ExprObjC.h:660
decl_type * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
Definition: Redeclarable.h:203
void VisitNullTemplateArgument(const TemplateArgument &TA)
ExtProtoInfo getExtProtoInfo() const
Definition: Type.h:3904
unsigned getColumn() const
Return the presumed column number of this location.
bool isParameterPack() const
Returns whether this is a parameter pack.
Encodes a location in the source.
bool getSynthesize() const
Definition: DeclObjC.h:1990
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
Definition: Type.h:5756
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
bool isPure() const
Whether this virtual function is pure, i.e.
Definition: Decl.h:2008
void VisitDependentSizedArrayType(const DependentSizedArrayType *T)
bool hasVarStorage() const
True if this WhileStmt has storage for a condition variable.
Definition: Stmt.h:2129
This represents &#39;#pragma omp declare reduction ...&#39; directive.
Definition: DeclOpenMP.h:102
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition: DeclCXX.h:3623
void dumpPointer(const void *Ptr)
Pseudo declaration for capturing expressions.
Definition: DeclOpenMP.h:312
Represents a C++ temporary.
Definition: ExprCXX.h:1184
void VisitFixedPointLiteral(const FixedPointLiteral *Node)
Interfaces are the core concept in Objective-C for object oriented design.
Definition: Type.h:5743
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
Definition: Type.h:2097
void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D)
std::string getNameAsString() const
Get a human-readable name for the declaration, even if it is one of the special kinds of names (C++ c...
Definition: Decl.h:291
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:1913
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the &#39;typename&#39; keyword.
SourceRange getSourceRange() const LLVM_READONLY
Definition: Comment.h:215
ASTContext & getASTContext() const LLVM_READONLY
Definition: DeclBase.cpp:375
ObjCCategoryDecl * getCategoryDecl() const
Definition: DeclObjC.cpp:2063
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
bool isParamIndexValid() const LLVM_READONLY
Definition: Comment.h:772
Represents the declaration of a label.
Definition: Decl.h:468
Represents a dependent using declaration which was not marked with typename.
Definition: DeclCXX.h:3578
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node)
static void dumpBasePath(raw_ostream &OS, const CastExpr *Node)
const CommandInfo * getCommandInfo(StringRef Name) const
bool isRestrict() const
Definition: Type.h:3637
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:2048
QualType getLocallyUnqualifiedSingleStepDesugaredType() const
Pull a single level of sugar off of this locally-unqualified type.
Definition: Type.cpp:302
std::string getValueAsString(unsigned Radix) const
Definition: Expr.cpp:821
void VisitMemberExpr(const MemberExpr *Node)
void VisitCallExpr(const CallExpr *Node)
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
Definition: Expr.h:1972
No ref-qualifier was provided.
Definition: Type.h:1362
C-style initialization with assignment.
Definition: Decl.h:817
const char * getNameStart() const
Return the beginning of the actual null-terminated string for this identifier.
This file defines OpenMP nodes for declarative directives.
bool isParameterPack() const
Definition: Type.h:4572
bool isLiteral(TokenKind K)
Return true if this is a "literal" kind, like a numeric constant, string, etc.
Definition: TokenKinds.h:85
void VisitBlockDecl(const BlockDecl *D)
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2279
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:50
UnaryExprOrTypeTrait getKind() const
Definition: Expr.h:2286
bool isArray() const
Definition: ExprCXX.h:2037
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3519
static const TerminalColor NullColor
void VisitVarDecl(const VarDecl *D)
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:467
StringRef getParamNameAsWritten() const
Definition: Comment.h:834
is AltiVec &#39;vector bool ...&#39;
Definition: Type.h:3186
ConstructorUsingShadowDecl * getConstructedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the base class for which we don&#39;t have an explicit ini...
Definition: DeclCXX.h:3320
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:728
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3153
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
Definition: DeclBase.h:697
void dumpDeclRef(const Decl *D, StringRef Label={})
bool isMessagingGetter() const
True if the property reference will result in a message to the getter.
Definition: ExprObjC.h:693
is AltiVec vector
Definition: Type.h:3180
PassDirection getDirection() const LLVM_READONLY
Definition: Comment.h:745
void VisitCXXNewExpr(const CXXNewExpr *Node)
Qualifiers getIndexTypeQualifiers() const
Definition: Type.h:2858
Used for C&#39;s _Alignof and C++&#39;s alignof.
Definition: TypeTraits.h:100
void VisitVariableArrayType(const VariableArrayType *T)
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required...
Definition: DeclBase.cpp:396
bool isOriginalNamespace() const
Return true if this declaration is an original (first) declaration of the namespace.
Definition: DeclCXX.cpp:2626
VarDecl * getVariable() const
The variable being captured.
Definition: Decl.h:3884
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
Definition: TemplateBase.h:300
void VisitInitListExpr(const InitListExpr *ILE)
void VisitFieldDecl(const FieldDecl *D)
A closing HTML tag.
Definition: Comment.h:507
An rvalue ref-qualifier was provided (&&).
Definition: Type.h:1368
SourceRange getBracketsRange() const
Definition: Type.h:3059
void VisitPackExpansionType(const PackExpansionType *T)
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:116
bool isArgumentType() const
Definition: Expr.h:2291
ObjCImplementationDecl * getImplementation() const
Definition: DeclObjC.cpp:1548
Optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
Definition: Type.h:5385
bool isPartOfExplicitCast() const
Definition: Expr.h:3172
std::string getAsString() const
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
Definition: Type.h:2087
void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node)
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Definition: Decl.h:4148
Doxygen \tparam command, describes a template parameter.
Definition: Comment.h:799
protocol_range protocols() const
Definition: DeclObjC.h:2355
The injected class name of a C++ class template or class template partial specialization.
Definition: Type.h:4983
Represents a pack expansion of types.
Definition: Type.h:5360
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:3530
ArrayRef< Decl * > getModuleInitializers(Module *M)
Get the initializations to perform when importing a module, if any.
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
Definition: Decl.cpp:1887
void VisitArrayType(const ArrayType *T)
Represents a C11 generic selection.
Definition: Expr.h:5036
SourceRange getRange() const
Definition: Attr.h:94
void VisitIntegerLiteral(const IntegerLiteral *Node)
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:3783
ast_type_traits::DynTypedNode Node
void dumpAccessSpecifier(AccessSpecifier AS)
TLS with a dynamic initializer.
Definition: Decl.h:835
Represents a template argument.
Definition: TemplateBase.h:50
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
Definition: DeclBase.h:577
bool isDeduced() const
Definition: Type.h:4743
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2439
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
Definition: DeclCXX.cpp:2581
Dataflow Directional Tag Classes.
bool isResultDependent() const
Whether this generic selection is result-dependent.
Definition: Expr.h:5216
ExtInfo getExtInfo() const
Definition: Type.h:3629
not evaluated yet, for special member function
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1791
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1265
static const TerminalColor AttrColor
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2169
bool isNested() const
Whether this is a nested capture, i.e.
Definition: Decl.h:3900
bool isVariadic() const
Definition: Decl.h:3932
Kind getPropertyImplementation() const
Definition: DeclObjC.h:2822
bool isImplicit() const
Definition: ExprCXX.h:996
bool hasInitStorage() const
True if this IfStmt has the storage for an init statement.
Definition: Stmt.h:1773
Represents a field injected from an anonymous union/struct into the parent scope. ...
Definition: Decl.h:2824
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
QualType getUnderlyingType() const
Definition: Decl.h:2970
AccessSpecifier getAccess() const
Definition: DeclBase.h:464
NamespaceDecl * getOriginalNamespace()
Get the original (first) namespace declaration.
Definition: DeclCXX.cpp:2612
unsigned getIndex() const
Retrieve the index of the template parameter.
bool usesADL() const
Definition: Expr.h:2557
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
Definition: ExprCXX.h:3429
Represents a dependent using declaration which was marked with typename.
Definition: DeclCXX.h:3674
bool isImplicit() const
Definition: OpenMPClause.h:80
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:558
VectorKind getVectorKind() const
Definition: Type.h:3218
static std::string getAsString(SplitQualType split, const PrintingPolicy &Policy)
Definition: Type.h:967
Kind getKind() const
Definition: DeclBase.h:423
void VisitUnresolvedUsingType(const UnresolvedUsingType *T)
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition: ExprCXX.h:1352
const Type * getBaseClass() const
If this is a base class initializer, returns the type of the base class.
Definition: DeclCXX.cpp:2281
void VisitDeclRefExpr(const DeclRefExpr *Node)
Represents an enum.
Definition: Decl.h:3325
PresumedLoc getPresumedLoc(SourceLocation Loc, bool UseLineDirectives=true) const
Returns the "presumed" location of a SourceLocation specifies.
void VisitObjCMessageExpr(const ObjCMessageExpr *Node)
SourceLocation getBeginLoc() const
Returns the starting location of the clause.
Definition: OpenMPClause.h:66
void VisitUsingShadowDecl(const UsingShadowDecl *D)
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2746
llvm::APInt getValue() const
Definition: Expr.h:1325
LabelDecl * getLabel() const
Definition: Expr.h:3805
void VisitTypeTemplateArgument(const TemplateArgument &TA)
SourceLocation getEndLoc() const
Returns the ending location of the clause.
Definition: OpenMPClause.h:69
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
Definition: ExprObjC.h:1226
path_iterator path_end()
Definition: Expr.h:3109
StringRef getTagName() const LLVM_READONLY
Definition: Comment.h:395
void VisitAddrLabelExpr(const AddrLabelExpr *Node)
SwitchStmt - This represents a &#39;switch&#39; stmt.
Definition: Stmt.h:1905
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class...
Definition: DeclCXX.h:1097
void Visit(const comments::Comment *C, const comments::FullComment *FC)
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition: DeclObjC.h:2551
FunctionDecl * SourceTemplate
The function template whose exception specification this is instantiated from, for EST_Uninstantiated...
Definition: Type.h:3762
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
Definition: Redeclarable.h:312
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: Type.h:4375
void VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node)
static const CommandInfo * getBuiltinCommandInfo(StringRef Name)
void VisitFunctionType(const FunctionType *T)
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2263
unsigned getNumObjects() const
Definition: ExprCXX.h:3119
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:379
bool isFromAST() const
Whether this type comes from an AST file.
Definition: Type.h:1816
void VisitConstantArrayType(const ConstantArrayType *T)
static void dumpPreviousDecl(raw_ostream &OS, const Decl *D)
Dump the previous declaration in the redeclaration chain for a declaration, if any.
static const TerminalColor CastColor
const llvm::APInt & getSize() const
Definition: Type.h:2895
static const TerminalColor TypeColor
Opcode getOpcode() const
Definition: Expr.h:1954
Base for LValueReferenceType and RValueReferenceType.
Definition: Type.h:2678
static const TerminalColor DeclKindNameColor
SourceRange getBracketsRange() const
Definition: Type.h:3002
static const char * getCastKindName(CastKind CK)
Definition: Expr.cpp:1744
bool isVolatile() const
Definition: Type.h:3636
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node)
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3390
Represents a base class of a C++ class.
Definition: DeclCXX.h:191
A bitfield object is a bitfield on a C or C++ record.
Definition: Specifiers.h:128
void VisitCharacterLiteral(const CharacterLiteral *Node)
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:506
bool capturesCXXThis() const
Definition: Decl.h:3989
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3168
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2323
void VisitBinaryOperator(const BinaryOperator *Node)
TypedefNameDecl * getDecl() const
Definition: Type.h:4172
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
unsigned getDepth() const
Definition: Type.h:4570
bool isFreeIvar() const
Definition: ExprObjC.h:545
Call-style initialization (C++98)
Definition: Decl.h:820
void dumpName(const NamedDecl *ND)
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:2720
bool isMutable() const
Determines whether this field is mutable (C++ only).
Definition: Decl.h:2653
Represents a C++ struct/union/class.
Definition: DeclCXX.h:299
const char * getCommentKindName() const
Definition: Comment.cpp:20
bool isValid() const
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO)...
Definition: Decl.h:1324
void VisitUnaryTransformType(const UnaryTransformType *T)
void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D)
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
Definition: ExprCXX.h:1518
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1944
WhileStmt - This represents a &#39;while&#39; stmt.
Definition: Stmt.h:2082
void dumpBareDeclRef(const Decl *D)
CleanupObject getObject(unsigned i) const
Definition: ExprCXX.h:3121
bool isInherited() const
Definition: Attr.h:97
const Attribute & getAttr(unsigned Idx) const
Definition: Comment.h:476
Declaration of a class template.
void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D)
void VisitLinkageSpecDecl(const LinkageSpecDecl *D)
bool isVariadic() const
Definition: DeclObjC.h:426
The receiver is a class.
Definition: ExprObjC.h:1045
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Definition: Stmt.cpp:251
bool isGlobalDelete() const
Definition: ExprCXX.h:2195
void VisitObjCInterfaceType(const ObjCInterfaceType *T)
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1599
void dumpType(QualType T)
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2429
TLS with a known-constant initializer.
Definition: Decl.h:832
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
Definition: Decl.h:3479
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Definition: Decl.h:275
void VisitEnumDecl(const EnumDecl *D)
StringRef getParamNameAsWritten() const
Definition: Comment.h:764
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition: DeclCXX.h:3402
bool constructsVirtualBase() const
Returns true if the constructed base class is a virtual base class subobject of this declaration&#39;s cl...
Definition: DeclCXX.h:3339
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:269
unsigned getNumElements() const
Definition: Type.h:3209
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:81
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
Definition: Type.h:2081
QualType getAsType() const
Retrieve the type for a type template argument.
Definition: TemplateBase.h:256
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1074
Represents a type template specialization; the template must be a class template, a type alias templa...
Definition: Type.h:4846
ObjCPropertyDecl * getPropertyDecl() const
Definition: DeclObjC.h:2817
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
Definition: DeclObjC.h:601
Doxygen \param command.
Definition: Comment.h:711
bool isDeleted() const
Whether this function has been deleted.
Definition: Decl.h:2135
void VisitAccessSpecDecl(const AccessSpecDecl *D)
const VarDecl * getCatchParamDecl() const
Definition: StmtObjC.h:93
const char * getCastName() const
getCastName - Get the name of the C++ cast being used, e.g., "static_cast", "dynamic_cast", "reinterpret_cast", or "const_cast".
Definition: ExprCXX.cpp:677
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Definition: Expr.h:4323
bool isArraySubscriptRefExpr() const
Definition: ExprObjC.h:855
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
Definition: ExprCXX.h:3203
static StringRef getNameForCallConv(CallingConv CC)
Definition: Type.cpp:2878
QualType getType() const
Definition: Decl.h:647
An l-value expression is a reference to an object with independent storage.
Definition: Specifiers.h:113
void VisitNamespaceDecl(const NamespaceDecl *D)
void VisitAutoType(const AutoType *T)
static const TerminalColor AddressColor
A trivial tuple used to represent a source range.
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined...
Definition: DeclBase.h:598
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to...
Definition: Expr.cpp:1192
ObjCMethodDecl * getGetterMethodDecl() const
Definition: DeclObjC.h:921
CXXRecordDecl * getNominatedBaseClass() const
Get the base class that was named in the using declaration.
Definition: DeclCXX.cpp:2720
This represents a decl that may have a name.
Definition: Decl.h:248
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:561
StringRef getParamName(const FullComment *FC) const
Definition: Comment.cpp:363
Represents a C array with a specified size that is not an integer-constant-expression.
Definition: Type.h:2976
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D)
Represents a C++ namespace alias.
Definition: DeclCXX.h:3027
void VisitCXXThisExpr(const CXXThisExpr *Node)
bool isInline() const
Whether this variable is (C++1z) inline.
Definition: Decl.h:1363
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
Definition: TemplateBase.h:280
AccessControl getAccessControl() const
Definition: DeclObjC.h:1983
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node)
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
Represents C++ using-directive.
Definition: DeclCXX.h:2923
Represents a #pragma detect_mismatch line.
Definition: Decl.h:173
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
double getValueAsApproximateDouble() const
getValueAsApproximateDouble - This returns the value as an inaccurate double.
Definition: Expr.cpp:895
attr::Kind getKind() const
Definition: Attr.h:86
The receiver is a superclass.
Definition: ExprObjC.h:1051
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name.
Definition: TemplateBase.h:287
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
Definition: Decl.cpp:3054
bool hasInit() const
Definition: Decl.cpp:2163
SourceLocation getBegin() const
NamedDecl * getPack() const
Retrieve the parameter pack.
Definition: ExprCXX.h:3914
decls_iterator decls_end() const
Definition: ExprCXX.h:2729
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
Definition: DeclObjC.h:2498
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
Definition: Stmt.h:1459
Represents the canonical version of C arrays with a specified constant size.
Definition: Type.h:2877
This class handles loading and caching of source files into memory.
The parameter is invariant: must match exactly.
ExceptionSpecInfo ExceptionSpec
Definition: Type.h:3778
void VisitUnaryOperator(const UnaryOperator *Node)
void VisitLabelDecl(const LabelDecl *D)
Declaration of a template function.
Definition: DeclTemplate.h:968
void AddChild(Fn DoAddChild)
Add a child of the current node. Calls DoAddChild without arguments.
void VisitFunctionDecl(const FunctionDecl *D)
Attr - This represents one attribute.
Definition: Attr.h:43
bool isDeletedAsWritten() const
Definition: Decl.h:2139
SourceLocation getLocation() const
Definition: DeclBase.h:420
void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D)
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
Definition: DeclCXX.h:3146
A full comment attached to a declaration, contains block content.
Definition: Comment.h:1091
QualType getType() const
Return the type wrapped by this type source info.
Definition: Decl.h:97
void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node)
NamedDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
Definition: DeclCXX.h:3123
PragmaMSCommentKind getCommentKind() const
Definition: Decl.h:162
ObjCCompatibleAliasDecl - Represents alias of a class.
Definition: DeclObjC.h:2728
bool param_empty() const
Definition: Decl.h:2272
static const TerminalColor UndeserializedColor
void VisitWhileStmt(const WhileStmt *Node)
void VisitStringLiteral(const StringLiteral *Str)
QualType getType() const
Retrieves the type of the base class.
Definition: DeclCXX.h:290
void VisitRValueReferenceType(const ReferenceType *T)