clang  12.0.0git
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/APValue.h"
15 #include "clang/AST/DeclFriend.h"
16 #include "clang/AST/DeclOpenMP.h"
17 #include "clang/AST/DeclTemplate.h"
18 #include "clang/AST/LocInfoType.h"
19 #include "clang/AST/Type.h"
20 #include "clang/Basic/Module.h"
22 #include "clang/Basic/Specifiers.h"
23 #include "clang/Basic/TypeTraits.h"
24 
25 #include <algorithm>
26 #include <utility>
27 
28 using namespace clang;
29 
30 static void dumpPreviousDeclImpl(raw_ostream &OS, ...) {}
31 
32 template <typename T>
33 static void dumpPreviousDeclImpl(raw_ostream &OS, const Mergeable<T> *D) {
34  const T *First = D->getFirstDecl();
35  if (First != D)
36  OS << " first " << First;
37 }
38 
39 template <typename T>
40 static void dumpPreviousDeclImpl(raw_ostream &OS, const Redeclarable<T> *D) {
41  const T *Prev = D->getPreviousDecl();
42  if (Prev)
43  OS << " prev " << Prev;
44 }
45 
46 /// Dump the previous declaration in the redeclaration chain for a declaration,
47 /// if any.
48 static void dumpPreviousDecl(raw_ostream &OS, const Decl *D) {
49  switch (D->getKind()) {
50 #define DECL(DERIVED, BASE) \
51  case Decl::DERIVED: \
52  return dumpPreviousDeclImpl(OS, cast<DERIVED##Decl>(D));
53 #define ABSTRACT_DECL(DECL)
54 #include "clang/AST/DeclNodes.inc"
55  }
56  llvm_unreachable("Decl that isn't part of DeclNodes.inc!");
57 }
58 
59 TextNodeDumper::TextNodeDumper(raw_ostream &OS, const ASTContext &Context,
60  bool ShowColors)
61  : TextTreeStructure(OS, ShowColors), OS(OS), ShowColors(ShowColors),
62  Context(&Context), SM(&Context.getSourceManager()),
63  PrintPolicy(Context.getPrintingPolicy()),
64  Traits(&Context.getCommentCommandTraits()) {}
65 
66 TextNodeDumper::TextNodeDumper(raw_ostream &OS, bool ShowColors)
67  : TextTreeStructure(OS, ShowColors), OS(OS), ShowColors(ShowColors) {}
68 
70  const comments::FullComment *FC) {
71  if (!C) {
72  ColorScope Color(OS, ShowColors, NullColor);
73  OS << "<<<NULL>>>";
74  return;
75  }
76 
77  {
78  ColorScope Color(OS, ShowColors, CommentColor);
79  OS << C->getCommentKindName();
80  }
81  dumpPointer(C);
83 
84  ConstCommentVisitor<TextNodeDumper, void,
85  const comments::FullComment *>::visit(C, FC);
86 }
87 
88 void TextNodeDumper::Visit(const Attr *A) {
89  {
90  ColorScope Color(OS, ShowColors, AttrColor);
91 
92  switch (A->getKind()) {
93 #define ATTR(X) \
94  case attr::X: \
95  OS << #X; \
96  break;
97 #include "clang/Basic/AttrList.inc"
98  }
99  OS << "Attr";
100  }
101  dumpPointer(A);
103  if (A->isInherited())
104  OS << " Inherited";
105  if (A->isImplicit())
106  OS << " Implicit";
107 
109 }
110 
112  const Decl *From, StringRef Label) {
113  OS << "TemplateArgument";
114  if (R.isValid())
115  dumpSourceRange(R);
116 
117  if (From)
118  dumpDeclRef(From, Label);
119 
121 }
122 
124  if (!Node) {
125  ColorScope Color(OS, ShowColors, NullColor);
126  OS << "<<<NULL>>>";
127  return;
128  }
129  {
130  ColorScope Color(OS, ShowColors, StmtColor);
131  OS << Node->getStmtClassName();
132  }
133  dumpPointer(Node);
135 
136  if (const auto *E = dyn_cast<Expr>(Node)) {
137  dumpType(E->getType());
138 
139  if (E->containsErrors()) {
140  ColorScope Color(OS, ShowColors, ErrorsColor);
141  OS << " contains-errors";
142  }
143 
144  {
145  ColorScope Color(OS, ShowColors, ValueKindColor);
146  switch (E->getValueKind()) {
147  case VK_RValue:
148  break;
149  case VK_LValue:
150  OS << " lvalue";
151  break;
152  case VK_XValue:
153  OS << " xvalue";
154  break;
155  }
156  }
157 
158  {
159  ColorScope Color(OS, ShowColors, ObjectKindColor);
160  switch (E->getObjectKind()) {
161  case OK_Ordinary:
162  break;
163  case OK_BitField:
164  OS << " bitfield";
165  break;
166  case OK_ObjCProperty:
167  OS << " objcproperty";
168  break;
169  case OK_ObjCSubscript:
170  OS << " objcsubscript";
171  break;
172  case OK_VectorComponent:
173  OS << " vectorcomponent";
174  break;
175  case OK_MatrixComponent:
176  OS << " matrixcomponent";
177  break;
178  }
179  }
180  }
181 
183 }
184 
185 void TextNodeDumper::Visit(const Type *T) {
186  if (!T) {
187  ColorScope Color(OS, ShowColors, NullColor);
188  OS << "<<<NULL>>>";
189  return;
190  }
191  if (isa<LocInfoType>(T)) {
192  {
193  ColorScope Color(OS, ShowColors, TypeColor);
194  OS << "LocInfo Type";
195  }
196  dumpPointer(T);
197  return;
198  }
199 
200  {
201  ColorScope Color(OS, ShowColors, TypeColor);
202  OS << T->getTypeClassName() << "Type";
203  }
204  dumpPointer(T);
205  OS << " ";
206  dumpBareType(QualType(T, 0), false);
207 
208  QualType SingleStepDesugar =
210  if (SingleStepDesugar != QualType(T, 0))
211  OS << " sugar";
212 
213  if (T->containsErrors()) {
214  ColorScope Color(OS, ShowColors, ErrorsColor);
215  OS << " contains-errors";
216  }
217 
218  if (T->isDependentType())
219  OS << " dependent";
220  else if (T->isInstantiationDependentType())
221  OS << " instantiation_dependent";
222 
223  if (T->isVariablyModifiedType())
224  OS << " variably_modified";
226  OS << " contains_unexpanded_pack";
227  if (T->isFromAST())
228  OS << " imported";
229 
231 }
232 
234  OS << "QualType";
236  OS << " ";
237  dumpBareType(T, false);
238  OS << " " << T.split().Quals.getAsString();
239 }
240 
241 void TextNodeDumper::Visit(const Decl *D) {
242  if (!D) {
243  ColorScope Color(OS, ShowColors, NullColor);
244  OS << "<<<NULL>>>";
245  return;
246  }
247 
248  {
249  ColorScope Color(OS, ShowColors, DeclKindNameColor);
250  OS << D->getDeclKindName() << "Decl";
251  }
252  dumpPointer(D);
253  if (D->getLexicalDeclContext() != D->getDeclContext())
254  OS << " parent " << cast<Decl>(D->getDeclContext());
255  dumpPreviousDecl(OS, D);
257  OS << ' ';
259  if (D->isFromASTFile())
260  OS << " imported";
261  if (Module *M = D->getOwningModule())
262  OS << " in " << M->getFullModuleName();
263  if (auto *ND = dyn_cast<NamedDecl>(D))
265  const_cast<NamedDecl *>(ND)))
266  AddChild([=] { OS << "also in " << M->getFullModuleName(); });
267  if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
268  if (!ND->isUnconditionallyVisible())
269  OS << " hidden";
270  if (D->isImplicit())
271  OS << " implicit";
272 
273  if (D->isUsed())
274  OS << " used";
275  else if (D->isThisDeclarationReferenced())
276  OS << " referenced";
277 
278  if (D->isInvalidDecl())
279  OS << " invalid";
280  if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
281  if (FD->isConstexprSpecified())
282  OS << " constexpr";
283  if (FD->isConsteval())
284  OS << " consteval";
285  }
286 
287  if (!isa<FunctionDecl>(*D)) {
288  const auto *MD = dyn_cast<ObjCMethodDecl>(D);
289  if (!MD || !MD->isThisDeclarationADefinition()) {
290  const auto *DC = dyn_cast<DeclContext>(D);
291  if (DC && DC->hasExternalLexicalStorage()) {
292  ColorScope Color(OS, ShowColors, UndeserializedColor);
293  OS << " <undeserialized declarations>";
294  }
295  }
296  }
297 
299 }
300 
302  OS << "CXXCtorInitializer";
303  if (Init->isAnyMemberInitializer()) {
304  OS << ' ';
305  dumpBareDeclRef(Init->getAnyMember());
306  } else if (Init->isBaseInitializer()) {
307  dumpType(QualType(Init->getBaseClass(), 0));
308  } else if (Init->isDelegatingInitializer()) {
309  dumpType(Init->getTypeSourceInfo()->getType());
310  } else {
311  llvm_unreachable("Unknown initializer type");
312  }
313 }
314 
316  OS << "capture";
317  if (C.isByRef())
318  OS << " byref";
319  if (C.isNested())
320  OS << " nested";
321  if (C.getVariable()) {
322  OS << ' ';
324  }
325 }
326 
328  if (!C) {
329  ColorScope Color(OS, ShowColors, NullColor);
330  OS << "<<<NULL>>> OMPClause";
331  return;
332  }
333  {
334  ColorScope Color(OS, ShowColors, AttrColor);
335  StringRef ClauseName(llvm::omp::getOpenMPClauseName(C->getClauseKind()));
336  OS << "OMP" << ClauseName.substr(/*Start=*/0, /*N=*/1).upper()
337  << ClauseName.drop_front() << "Clause";
338  }
339  dumpPointer(C);
341  if (C->isImplicit())
342  OS << " <implicit>";
343 }
344 
346  const TypeSourceInfo *TSI = A.getTypeSourceInfo();
347  if (TSI) {
348  OS << "case ";
349  dumpType(TSI->getType());
350  } else {
351  OS << "default";
352  }
353 
354  if (A.isSelected())
355  OS << " selected";
356 }
357 
358 static double GetApproxValue(const llvm::APFloat &F) {
359  llvm::APFloat V = F;
360  bool ignored;
361  V.convert(llvm::APFloat::IEEEdouble(), llvm::APFloat::rmNearestTiesToEven,
362  &ignored);
363  return V.convertToDouble();
364 }
365 
366 /// True if the \p APValue \p Value can be folded onto the current line.
367 static bool isSimpleAPValue(const APValue &Value) {
368  switch (Value.getKind()) {
369  case APValue::None:
371  case APValue::Int:
372  case APValue::Float:
373  case APValue::FixedPoint:
374  case APValue::ComplexInt:
376  case APValue::LValue:
379  return true;
380  case APValue::Vector:
381  case APValue::Array:
382  case APValue::Struct:
383  return false;
384  case APValue::Union:
385  return isSimpleAPValue(Value.getUnionValue());
386  }
387  llvm_unreachable("unexpected APValue kind!");
388 }
389 
390 /// Dump the children of the \p APValue \p Value.
391 ///
392 /// \param[in] Value The \p APValue to visit
393 /// \param[in] Ty The \p QualType passed to \p Visit
394 ///
395 /// \param[in] IdxToChildFun A function mapping an \p APValue and an index
396 /// to one of the child of the \p APValue
397 ///
398 /// \param[in] NumChildren \p IdxToChildFun will be called on \p Value with
399 /// the indices in the range \p [0,NumChildren(
400 ///
401 /// \param[in] LabelSingular The label to use on a line with a single child
402 /// \param[in] LabelPlurial The label to use on a line with multiple children
403 void TextNodeDumper::dumpAPValueChildren(
404  const APValue &Value, QualType Ty,
405  const APValue &(*IdxToChildFun)(const APValue &, unsigned),
406  unsigned NumChildren, StringRef LabelSingular, StringRef LabelPlurial) {
407  // To save some vertical space we print up to MaxChildrenPerLine APValues
408  // considered to be simple (by isSimpleAPValue) on a single line.
409  constexpr unsigned MaxChildrenPerLine = 4;
410  unsigned I = 0;
411  while (I < NumChildren) {
412  unsigned J = I;
413  while (J < NumChildren) {
414  if (isSimpleAPValue(IdxToChildFun(Value, J)) &&
415  (J - I < MaxChildrenPerLine)) {
416  ++J;
417  continue;
418  }
419  break;
420  }
421 
422  J = std::max(I + 1, J);
423 
424  // Print [I,J) on a single line.
425  AddChild(J - I > 1 ? LabelPlurial : LabelSingular, [=]() {
426  for (unsigned X = I; X < J; ++X) {
427  Visit(IdxToChildFun(Value, X), Ty);
428  if (X + 1 != J)
429  OS << ", ";
430  }
431  });
432  I = J;
433  }
434 }
435 
436 void TextNodeDumper::Visit(const APValue &Value, QualType Ty) {
437  ColorScope Color(OS, ShowColors, ValueKindColor);
438  switch (Value.getKind()) {
439  case APValue::None:
440  OS << "None";
441  return;
443  OS << "Indeterminate";
444  return;
445  case APValue::Int:
446  OS << "Int ";
447  {
448  ColorScope Color(OS, ShowColors, ValueColor);
449  OS << Value.getInt();
450  }
451  return;
452  case APValue::Float:
453  OS << "Float ";
454  {
455  ColorScope Color(OS, ShowColors, ValueColor);
456  OS << GetApproxValue(Value.getFloat());
457  }
458  return;
459  case APValue::FixedPoint:
460  OS << "FixedPoint ";
461  {
462  ColorScope Color(OS, ShowColors, ValueColor);
463  OS << Value.getFixedPoint();
464  }
465  return;
466  case APValue::Vector: {
467  unsigned VectorLength = Value.getVectorLength();
468  OS << "Vector length=" << VectorLength;
469 
470  dumpAPValueChildren(
471  Value, Ty,
472  [](const APValue &Value, unsigned Index) -> const APValue & {
473  return Value.getVectorElt(Index);
474  },
475  VectorLength, "element", "elements");
476  return;
477  }
478  case APValue::ComplexInt:
479  OS << "ComplexInt ";
480  {
481  ColorScope Color(OS, ShowColors, ValueColor);
482  OS << Value.getComplexIntReal() << " + " << Value.getComplexIntImag()
483  << 'i';
484  }
485  return;
487  OS << "ComplexFloat ";
488  {
489  ColorScope Color(OS, ShowColors, ValueColor);
490  OS << GetApproxValue(Value.getComplexFloatReal()) << " + "
491  << GetApproxValue(Value.getComplexFloatImag()) << 'i';
492  }
493  return;
494  case APValue::LValue:
495  (void)Context;
496  OS << "LValue <todo>";
497  return;
498  case APValue::Array: {
499  unsigned ArraySize = Value.getArraySize();
500  unsigned NumInitializedElements = Value.getArrayInitializedElts();
501  OS << "Array size=" << ArraySize;
502 
503  dumpAPValueChildren(
504  Value, Ty,
505  [](const APValue &Value, unsigned Index) -> const APValue & {
506  return Value.getArrayInitializedElt(Index);
507  },
508  NumInitializedElements, "element", "elements");
509 
510  if (Value.hasArrayFiller()) {
511  AddChild("filler", [=] {
512  {
513  ColorScope Color(OS, ShowColors, ValueColor);
514  OS << ArraySize - NumInitializedElements << " x ";
515  }
516  Visit(Value.getArrayFiller(), Ty);
517  });
518  }
519 
520  return;
521  }
522  case APValue::Struct: {
523  OS << "Struct";
524 
525  dumpAPValueChildren(
526  Value, Ty,
527  [](const APValue &Value, unsigned Index) -> const APValue & {
528  return Value.getStructBase(Index);
529  },
530  Value.getStructNumBases(), "base", "bases");
531 
532  dumpAPValueChildren(
533  Value, Ty,
534  [](const APValue &Value, unsigned Index) -> const APValue & {
535  return Value.getStructField(Index);
536  },
537  Value.getStructNumFields(), "field", "fields");
538 
539  return;
540  }
541  case APValue::Union: {
542  OS << "Union";
543  {
544  ColorScope Color(OS, ShowColors, ValueColor);
545  if (const FieldDecl *FD = Value.getUnionField())
546  OS << " ." << *cast<NamedDecl>(FD);
547  }
548  // If the union value is considered to be simple, fold it into the
549  // current line to save some vertical space.
550  const APValue &UnionValue = Value.getUnionValue();
551  if (isSimpleAPValue(UnionValue)) {
552  OS << ' ';
553  Visit(UnionValue, Ty);
554  } else {
555  AddChild([=] { Visit(UnionValue, Ty); });
556  }
557 
558  return;
559  }
561  OS << "MemberPointer <todo>";
562  return;
564  OS << "AddrLabelDiff <todo>";
565  return;
566  }
567  llvm_unreachable("Unknown APValue kind!");
568 }
569 
570 void TextNodeDumper::dumpPointer(const void *Ptr) {
571  ColorScope Color(OS, ShowColors, AddressColor);
572  OS << ' ' << Ptr;
573 }
574 
576  if (!SM)
577  return;
578 
579  ColorScope Color(OS, ShowColors, LocationColor);
580  SourceLocation SpellingLoc = SM->getSpellingLoc(Loc);
581 
582  // The general format we print out is filename:line:col, but we drop pieces
583  // that haven't changed since the last loc printed.
584  PresumedLoc PLoc = SM->getPresumedLoc(SpellingLoc);
585 
586  if (PLoc.isInvalid()) {
587  OS << "<invalid sloc>";
588  return;
589  }
590 
591  if (strcmp(PLoc.getFilename(), LastLocFilename) != 0) {
592  OS << PLoc.getFilename() << ':' << PLoc.getLine() << ':'
593  << PLoc.getColumn();
594  LastLocFilename = PLoc.getFilename();
595  LastLocLine = PLoc.getLine();
596  } else if (PLoc.getLine() != LastLocLine) {
597  OS << "line" << ':' << PLoc.getLine() << ':' << PLoc.getColumn();
598  LastLocLine = PLoc.getLine();
599  } else {
600  OS << "col" << ':' << PLoc.getColumn();
601  }
602 }
603 
605  // Can't translate locations if a SourceManager isn't available.
606  if (!SM)
607  return;
608 
609  OS << " <";
610  dumpLocation(R.getBegin());
611  if (R.getBegin() != R.getEnd()) {
612  OS << ", ";
613  dumpLocation(R.getEnd());
614  }
615  OS << ">";
616 
617  // <t2.c:123:421[blah], t2.c:412:321>
618 }
619 
621  ColorScope Color(OS, ShowColors, TypeColor);
622 
623  SplitQualType T_split = T.split();
624  OS << "'" << QualType::getAsString(T_split, PrintPolicy) << "'";
625 
626  if (Desugar && !T.isNull()) {
627  // If the type is sugared, also dump a (shallow) desugared type.
628  SplitQualType D_split = T.getSplitDesugaredType();
629  if (T_split != D_split)
630  OS << ":'" << QualType::getAsString(D_split, PrintPolicy) << "'";
631  }
632 }
633 
635  OS << ' ';
636  dumpBareType(T);
637 }
638 
640  if (!D) {
641  ColorScope Color(OS, ShowColors, NullColor);
642  OS << "<<<NULL>>>";
643  return;
644  }
645 
646  {
647  ColorScope Color(OS, ShowColors, DeclKindNameColor);
648  OS << D->getDeclKindName();
649  }
650  dumpPointer(D);
651 
652  if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
653  ColorScope Color(OS, ShowColors, DeclNameColor);
654  OS << " '" << ND->getDeclName() << '\'';
655  }
656 
657  if (const ValueDecl *VD = dyn_cast<ValueDecl>(D))
658  dumpType(VD->getType());
659 }
660 
662  if (ND->getDeclName()) {
663  ColorScope Color(OS, ShowColors, DeclNameColor);
664  OS << ' ' << ND->getNameAsString();
665  }
666 }
667 
669  const auto AccessSpelling = getAccessSpelling(AS);
670  if (AccessSpelling.empty())
671  return;
672  OS << AccessSpelling;
673 }
674 
677  if (auto *BD = C.dyn_cast<BlockDecl *>())
678  dumpDeclRef(BD, "cleanup");
679  else if (auto *CLE = C.dyn_cast<CompoundLiteralExpr *>())
680  AddChild([=] {
681  OS << "cleanup ";
682  {
683  ColorScope Color(OS, ShowColors, StmtColor);
684  OS << CLE->getStmtClassName();
685  }
686  dumpPointer(CLE);
687  });
688  else
689  llvm_unreachable("unexpected cleanup type");
690 }
691 
692 void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef Label) {
693  if (!D)
694  return;
695 
696  AddChild([=] {
697  if (!Label.empty())
698  OS << Label << ' ';
699  dumpBareDeclRef(D);
700  });
701 }
702 
703 const char *TextNodeDumper::getCommandName(unsigned CommandID) {
704  if (Traits)
705  return Traits->getCommandInfo(CommandID)->Name;
706  const comments::CommandInfo *Info =
708  if (Info)
709  return Info->Name;
710  return "<not a builtin command>";
711 }
712 
714  const comments::FullComment *) {
715  OS << " Text=\"" << C->getText() << "\"";
716 }
717 
720  OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
721  switch (C->getRenderKind()) {
723  OS << " RenderNormal";
724  break;
726  OS << " RenderBold";
727  break;
729  OS << " RenderMonospaced";
730  break;
732  OS << " RenderEmphasized";
733  break;
735  OS << " RenderAnchor";
736  break;
737  }
738 
739  for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
740  OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
741 }
742 
745  OS << " Name=\"" << C->getTagName() << "\"";
746  if (C->getNumAttrs() != 0) {
747  OS << " Attrs: ";
748  for (unsigned i = 0, e = C->getNumAttrs(); i != e; ++i) {
750  OS << " \"" << Attr.Name << "=\"" << Attr.Value << "\"";
751  }
752  }
753  if (C->isSelfClosing())
754  OS << " SelfClosing";
755 }
756 
759  OS << " Name=\"" << C->getTagName() << "\"";
760 }
761 
764  OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
765  for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
766  OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
767 }
768 
771  OS << " "
773 
774  if (C->isDirectionExplicit())
775  OS << " explicitly";
776  else
777  OS << " implicitly";
778 
779  if (C->hasParamName()) {
780  if (C->isParamIndexValid())
781  OS << " Param=\"" << C->getParamName(FC) << "\"";
782  else
783  OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
784  }
785 
786  if (C->isParamIndexValid() && !C->isVarArgParam())
787  OS << " ParamIndex=" << C->getParamIndex();
788 }
789 
792  if (C->hasParamName()) {
793  if (C->isPositionValid())
794  OS << " Param=\"" << C->getParamName(FC) << "\"";
795  else
796  OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
797  }
798 
799  if (C->isPositionValid()) {
800  OS << " Position=<";
801  for (unsigned i = 0, e = C->getDepth(); i != e; ++i) {
802  OS << C->getIndex(i);
803  if (i != e - 1)
804  OS << ", ";
805  }
806  OS << ">";
807  }
808 }
809 
812  OS << " Name=\"" << getCommandName(C->getCommandID())
813  << "\""
814  " CloseName=\""
815  << C->getCloseName() << "\"";
816 }
817 
820  const comments::FullComment *) {
821  OS << " Text=\"" << C->getText() << "\"";
822 }
823 
826  OS << " Text=\"" << C->getText() << "\"";
827 }
828 
830  OS << " null";
831 }
832 
834  OS << " type";
835  dumpType(TA.getAsType());
836 }
837 
839  const TemplateArgument &TA) {
840  OS << " decl";
841  dumpDeclRef(TA.getAsDecl());
842 }
843 
845  OS << " nullptr";
846 }
847 
849  OS << " integral " << TA.getAsIntegral();
850 }
851 
853  OS << " template ";
854  TA.getAsTemplate().dump(OS);
855 }
856 
858  const TemplateArgument &TA) {
859  OS << " template expansion ";
861 }
862 
864  OS << " expr";
865 }
866 
868  OS << " pack";
869 }
870 
871 static void dumpBasePath(raw_ostream &OS, const CastExpr *Node) {
872  if (Node->path_empty())
873  return;
874 
875  OS << " (";
876  bool First = true;
877  for (CastExpr::path_const_iterator I = Node->path_begin(),
878  E = Node->path_end();
879  I != E; ++I) {
880  const CXXBaseSpecifier *Base = *I;
881  if (!First)
882  OS << " -> ";
883 
884  const auto *RD =
885  cast<CXXRecordDecl>(Base->getType()->castAs<RecordType>()->getDecl());
886 
887  if (Base->isVirtual())
888  OS << "virtual ";
889  OS << RD->getName();
890  First = false;
891  }
892 
893  OS << ')';
894 }
895 
897  if (Node->hasInitStorage())
898  OS << " has_init";
899  if (Node->hasVarStorage())
900  OS << " has_var";
901  if (Node->hasElseStorage())
902  OS << " has_else";
903 }
904 
906  if (Node->hasInitStorage())
907  OS << " has_init";
908  if (Node->hasVarStorage())
909  OS << " has_var";
910 }
911 
913  if (Node->hasVarStorage())
914  OS << " has_var";
915 }
916 
918  OS << " '" << Node->getName() << "'";
919 }
920 
922  OS << " '" << Node->getLabel()->getName() << "'";
923  dumpPointer(Node->getLabel());
924 }
925 
927  if (Node->caseStmtIsGNURange())
928  OS << " gnu_range";
929 }
930 
932  if (Node->hasAPValueResult())
933  AddChild("value",
934  [=] { Visit(Node->getAPValueResult(), Node->getType()); });
935 }
936 
938  if (Node->usesADL())
939  OS << " adl";
940 }
941 
943  const char *OperatorSpelling = clang::getOperatorSpelling(Node->getOperator());
944  if (OperatorSpelling)
945  OS << " '" << OperatorSpelling << "'";
946 
947  VisitCallExpr(Node);
948 }
949 
951  OS << " <";
952  {
953  ColorScope Color(OS, ShowColors, CastColor);
954  OS << Node->getCastKindName();
955  }
956  dumpBasePath(OS, Node);
957  OS << ">";
958 }
959 
961  VisitCastExpr(Node);
962  if (Node->isPartOfExplicitCast())
963  OS << " part_of_explicit_cast";
964 }
965 
967  OS << " ";
968  dumpBareDeclRef(Node->getDecl());
969  if (Node->getDecl() != Node->getFoundDecl()) {
970  OS << " (";
971  dumpBareDeclRef(Node->getFoundDecl());
972  OS << ")";
973  }
974  switch (Node->isNonOdrUse()) {
975  case NOUR_None: break;
976  case NOUR_Unevaluated: OS << " non_odr_use_unevaluated"; break;
977  case NOUR_Constant: OS << " non_odr_use_constant"; break;
978  case NOUR_Discarded: OS << " non_odr_use_discarded"; break;
979  }
980 }
981 
983  const UnresolvedLookupExpr *Node) {
984  OS << " (";
985  if (!Node->requiresADL())
986  OS << "no ";
987  OS << "ADL) = '" << Node->getName() << '\'';
988 
990  E = Node->decls_end();
991  if (I == E)
992  OS << " empty";
993  for (; I != E; ++I)
994  dumpPointer(*I);
995 }
996 
998  {
999  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1000  OS << " " << Node->getDecl()->getDeclKindName() << "Decl";
1001  }
1002  OS << "='" << *Node->getDecl() << "'";
1003  dumpPointer(Node->getDecl());
1004  if (Node->isFreeIvar())
1005  OS << " isFreeIvar";
1006 }
1007 
1009  OS << " " << PredefinedExpr::getIdentKindName(Node->getIdentKind());
1010 }
1011 
1013  ColorScope Color(OS, ShowColors, ValueColor);
1014  OS << " " << Node->getValue();
1015 }
1016 
1018  bool isSigned = Node->getType()->isSignedIntegerType();
1019  ColorScope Color(OS, ShowColors, ValueColor);
1020  OS << " " << Node->getValue().toString(10, isSigned);
1021 }
1022 
1024  ColorScope Color(OS, ShowColors, ValueColor);
1025  OS << " " << Node->getValueAsString(/*Radix=*/10);
1026 }
1027 
1029  ColorScope Color(OS, ShowColors, ValueColor);
1030  OS << " " << Node->getValueAsApproximateDouble();
1031 }
1032 
1034  ColorScope Color(OS, ShowColors, ValueColor);
1035  OS << " ";
1036  Str->outputString(OS);
1037 }
1038 
1040  if (auto *Field = ILE->getInitializedFieldInUnion()) {
1041  OS << " field ";
1042  dumpBareDeclRef(Field);
1043  }
1044 }
1045 
1047  if (E->isResultDependent())
1048  OS << " result_dependent";
1049 }
1050 
1052  OS << " " << (Node->isPostfix() ? "postfix" : "prefix") << " '"
1053  << UnaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
1054  if (!Node->canOverflow())
1055  OS << " cannot overflow";
1056 }
1057 
1059  const UnaryExprOrTypeTraitExpr *Node) {
1060  OS << " " << getTraitSpelling(Node->getKind());
1061 
1062  if (Node->isArgumentType())
1063  dumpType(Node->getArgumentType());
1064 }
1065 
1067  OS << " " << (Node->isArrow() ? "->" : ".") << *Node->getMemberDecl();
1068  dumpPointer(Node->getMemberDecl());
1069  switch (Node->isNonOdrUse()) {
1070  case NOUR_None: break;
1071  case NOUR_Unevaluated: OS << " non_odr_use_unevaluated"; break;
1072  case NOUR_Constant: OS << " non_odr_use_constant"; break;
1073  case NOUR_Discarded: OS << " non_odr_use_discarded"; break;
1074  }
1075 }
1076 
1078  const ExtVectorElementExpr *Node) {
1079  OS << " " << Node->getAccessor().getNameStart();
1080 }
1081 
1083  OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
1084 }
1085 
1087  const CompoundAssignOperator *Node) {
1088  OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode())
1089  << "' ComputeLHSTy=";
1091  OS << " ComputeResultTy=";
1093 }
1094 
1096  OS << " " << Node->getLabel()->getName();
1097  dumpPointer(Node->getLabel());
1098 }
1099 
1101  OS << " " << Node->getCastName() << "<"
1102  << Node->getTypeAsWritten().getAsString() << ">"
1103  << " <" << Node->getCastKindName();
1104  dumpBasePath(OS, Node);
1105  OS << ">";
1106 }
1107 
1109  OS << " " << (Node->getValue() ? "true" : "false");
1110 }
1111 
1113  if (Node->isImplicit())
1114  OS << " implicit";
1115  OS << " this";
1116 }
1117 
1119  const CXXFunctionalCastExpr *Node) {
1120  OS << " functional cast to " << Node->getTypeAsWritten().getAsString() << " <"
1121  << Node->getCastKindName() << ">";
1122 }
1123 
1126  dumpType(Node->getTypeAsWritten());
1127  if (Node->isListInitialization())
1128  OS << " list";
1129 }
1130 
1132  CXXConstructorDecl *Ctor = Node->getConstructor();
1133  dumpType(Ctor->getType());
1134  if (Node->isElidable())
1135  OS << " elidable";
1136  if (Node->isListInitialization())
1137  OS << " list";
1138  if (Node->isStdInitListInitialization())
1139  OS << " std::initializer_list";
1140  if (Node->requiresZeroInitialization())
1141  OS << " zeroing";
1142 }
1143 
1145  const CXXBindTemporaryExpr *Node) {
1146  OS << " (CXXTemporary";
1147  dumpPointer(Node);
1148  OS << ")";
1149 }
1150 
1152  if (Node->isGlobalNew())
1153  OS << " global";
1154  if (Node->isArray())
1155  OS << " array";
1156  if (Node->getOperatorNew()) {
1157  OS << ' ';
1159  }
1160  // We could dump the deallocation function used in case of error, but it's
1161  // usually not that interesting.
1162 }
1163 
1165  if (Node->isGlobalDelete())
1166  OS << " global";
1167  if (Node->isArrayForm())
1168  OS << " array";
1169  if (Node->getOperatorDelete()) {
1170  OS << ' ';
1172  }
1173 }
1174 
1176  OS << " " << getTraitSpelling(Node->getTrait());
1177 }
1178 
1180  OS << " " << getTraitSpelling(Node->getTrait());
1181 }
1182 
1184  OS << " " << getTraitSpelling(Node->getTrait());
1185 }
1186 
1188  const MaterializeTemporaryExpr *Node) {
1189  if (const ValueDecl *VD = Node->getExtendingDecl()) {
1190  OS << " extended by ";
1191  dumpBareDeclRef(VD);
1192  }
1193 }
1194 
1196  for (unsigned i = 0, e = Node->getNumObjects(); i != e; ++i)
1197  dumpCleanupObject(Node->getObject(i));
1198 }
1199 
1201  dumpPointer(Node->getPack());
1202  dumpName(Node->getPack());
1203 }
1204 
1207  OS << " " << (Node->isArrow() ? "->" : ".") << Node->getMember();
1208 }
1209 
1211  OS << " selector=";
1212  Node->getSelector().print(OS);
1213  switch (Node->getReceiverKind()) {
1215  break;
1216 
1218  OS << " class=";
1219  dumpBareType(Node->getClassReceiver());
1220  break;
1221 
1223  OS << " super (instance)";
1224  break;
1225 
1227  OS << " super (class)";
1228  break;
1229  }
1230 }
1231 
1233  if (auto *BoxingMethod = Node->getBoxingMethod()) {
1234  OS << " selector=";
1235  BoxingMethod->getSelector().print(OS);
1236  }
1237 }
1238 
1240  if (!Node->getCatchParamDecl())
1241  OS << " catch all";
1242 }
1243 
1245  dumpType(Node->getEncodedType());
1246 }
1247 
1249  OS << " ";
1250  Node->getSelector().print(OS);
1251 }
1252 
1254  OS << ' ' << *Node->getProtocol();
1255 }
1256 
1258  if (Node->isImplicitProperty()) {
1259  OS << " Kind=MethodRef Getter=\"";
1260  if (Node->getImplicitPropertyGetter())
1262  else
1263  OS << "(null)";
1264 
1265  OS << "\" Setter=\"";
1266  if (ObjCMethodDecl *Setter = Node->getImplicitPropertySetter())
1267  Setter->getSelector().print(OS);
1268  else
1269  OS << "(null)";
1270  OS << "\"";
1271  } else {
1272  OS << " Kind=PropertyRef Property=\"" << *Node->getExplicitProperty()
1273  << '"';
1274  }
1275 
1276  if (Node->isSuperReceiver())
1277  OS << " super";
1278 
1279  OS << " Messaging=";
1280  if (Node->isMessagingGetter() && Node->isMessagingSetter())
1281  OS << "Getter&Setter";
1282  else if (Node->isMessagingGetter())
1283  OS << "Getter";
1284  else if (Node->isMessagingSetter())
1285  OS << "Setter";
1286 }
1287 
1289  const ObjCSubscriptRefExpr *Node) {
1290  if (Node->isArraySubscriptRefExpr())
1291  OS << " Kind=ArraySubscript GetterForArray=\"";
1292  else
1293  OS << " Kind=DictionarySubscript GetterForDictionary=\"";
1294  if (Node->getAtIndexMethodDecl())
1295  Node->getAtIndexMethodDecl()->getSelector().print(OS);
1296  else
1297  OS << "(null)";
1298 
1299  if (Node->isArraySubscriptRefExpr())
1300  OS << "\" SetterForArray=\"";
1301  else
1302  OS << "\" SetterForDictionary=\"";
1303  if (Node->setAtIndexMethodDecl())
1304  Node->setAtIndexMethodDecl()->getSelector().print(OS);
1305  else
1306  OS << "(null)";
1307 }
1308 
1310  OS << " " << (Node->getValue() ? "__objc_yes" : "__objc_no");
1311 }
1312 
1314  OS << " ";
1315  for (unsigned I = 0, E = Node->numOfIterators(); I < E; ++I) {
1316  Visit(Node->getIteratorDecl(I));
1317  OS << " = ";
1318  const OMPIteratorExpr::IteratorRange Range = Node->getIteratorRange(I);
1319  OS << " begin ";
1320  Visit(Range.Begin);
1321  OS << " end ";
1322  Visit(Range.End);
1323  if (Range.Step) {
1324  OS << " step ";
1325  Visit(Range.Step);
1326  }
1327  }
1328 }
1329 
1331  if (T->isSpelledAsLValue())
1332  OS << " written as lvalue reference";
1333 }
1334 
1336  switch (T->getSizeModifier()) {
1337  case ArrayType::Normal:
1338  break;
1339  case ArrayType::Static:
1340  OS << " static";
1341  break;
1342  case ArrayType::Star:
1343  OS << " *";
1344  break;
1345  }
1346  OS << " " << T->getIndexTypeQualifiers().getAsString();
1347 }
1348 
1350  OS << " " << T->getSize();
1351  VisitArrayType(T);
1352 }
1353 
1355  OS << " ";
1357  VisitArrayType(T);
1358 }
1359 
1361  const DependentSizedArrayType *T) {
1362  VisitArrayType(T);
1363  OS << " ";
1365 }
1366 
1368  const DependentSizedExtVectorType *T) {
1369  OS << " ";
1371 }
1372 
1374  switch (T->getVectorKind()) {
1376  break;
1378  OS << " altivec";
1379  break;
1381  OS << " altivec pixel";
1382  break;
1384  OS << " altivec bool";
1385  break;
1387  OS << " neon";
1388  break;
1390  OS << " neon poly";
1391  break;
1392  }
1393  OS << " " << T->getNumElements();
1394 }
1395 
1397  auto EI = T->getExtInfo();
1398  if (EI.getNoReturn())
1399  OS << " noreturn";
1400  if (EI.getProducesResult())
1401  OS << " produces_result";
1402  if (EI.getHasRegParm())
1403  OS << " regparm " << EI.getRegParm();
1404  OS << " " << FunctionType::getNameForCallConv(EI.getCC());
1405 }
1406 
1408  auto EPI = T->getExtProtoInfo();
1409  if (EPI.HasTrailingReturn)
1410  OS << " trailing_return";
1411  if (T->isConst())
1412  OS << " const";
1413  if (T->isVolatile())
1414  OS << " volatile";
1415  if (T->isRestrict())
1416  OS << " restrict";
1417  if (T->getExtProtoInfo().Variadic)
1418  OS << " variadic";
1419  switch (EPI.RefQualifier) {
1420  case RQ_None:
1421  break;
1422  case RQ_LValue:
1423  OS << " &";
1424  break;
1425  case RQ_RValue:
1426  OS << " &&";
1427  break;
1428  }
1429  // FIXME: Exception specification.
1430  // FIXME: Consumed parameters.
1431  VisitFunctionType(T);
1432 }
1433 
1435  dumpDeclRef(T->getDecl());
1436 }
1437 
1439  dumpDeclRef(T->getDecl());
1440 }
1441 
1443  switch (T->getUTTKind()) {
1445  OS << " underlying_type";
1446  break;
1447  }
1448 }
1449 
1451  dumpDeclRef(T->getDecl());
1452 }
1453 
1455  OS << " depth " << T->getDepth() << " index " << T->getIndex();
1456  if (T->isParameterPack())
1457  OS << " pack";
1458  dumpDeclRef(T->getDecl());
1459 }
1460 
1462  if (T->isDecltypeAuto())
1463  OS << " decltype(auto)";
1464  if (!T->isDeduced())
1465  OS << " undeduced";
1466  if (T->isConstrained()) {
1468  for (const auto &Arg : T->getTypeConstraintArguments())
1469  VisitTemplateArgument(Arg);
1470  }
1471 }
1472 
1474  const TemplateSpecializationType *T) {
1475  if (T->isTypeAlias())
1476  OS << " alias";
1477  OS << " ";
1478  T->getTemplateName().dump(OS);
1479 }
1480 
1482  const InjectedClassNameType *T) {
1483  dumpDeclRef(T->getDecl());
1484 }
1485 
1487  dumpDeclRef(T->getDecl());
1488 }
1489 
1491  if (auto N = T->getNumExpansions())
1492  OS << " expansions " << *N;
1493 }
1494 
1496 
1498  dumpName(D);
1500  if (D->isModulePrivate())
1501  OS << " __module_private__";
1502 }
1503 
1505  if (D->isScoped()) {
1506  if (D->isScopedUsingClassTag())
1507  OS << " class";
1508  else
1509  OS << " struct";
1510  }
1511  dumpName(D);
1512  if (D->isModulePrivate())
1513  OS << " __module_private__";
1514  if (D->isFixed())
1515  dumpType(D->getIntegerType());
1516 }
1517 
1519  OS << ' ' << D->getKindName();
1520  dumpName(D);
1521  if (D->isModulePrivate())
1522  OS << " __module_private__";
1523  if (D->isCompleteDefinition())
1524  OS << " definition";
1525 }
1526 
1528  dumpName(D);
1529  dumpType(D->getType());
1530 }
1531 
1533  dumpName(D);
1534  dumpType(D->getType());
1535 
1536  for (const auto *Child : D->chain())
1537  dumpDeclRef(Child);
1538 }
1539 
1541  dumpName(D);
1542  dumpType(D->getType());
1543 
1544  StorageClass SC = D->getStorageClass();
1545  if (SC != SC_None)
1546  OS << ' ' << VarDecl::getStorageClassSpecifierString(SC);
1547  if (D->isInlineSpecified())
1548  OS << " inline";
1549  if (D->isVirtualAsWritten())
1550  OS << " virtual";
1551  if (D->isModulePrivate())
1552  OS << " __module_private__";
1553 
1554  if (D->isPure())
1555  OS << " pure";
1556  if (D->isDefaulted()) {
1557  OS << " default";
1558  if (D->isDeleted())
1559  OS << "_delete";
1560  }
1561  if (D->isDeletedAsWritten())
1562  OS << " delete";
1563  if (D->isTrivial())
1564  OS << " trivial";
1565 
1566  if (const auto *FPT = D->getType()->getAs<FunctionProtoType>()) {
1567  FunctionProtoType::ExtProtoInfo EPI = FPT->getExtProtoInfo();
1568  switch (EPI.ExceptionSpec.Type) {
1569  default:
1570  break;
1571  case EST_Unevaluated:
1572  OS << " noexcept-unevaluated " << EPI.ExceptionSpec.SourceDecl;
1573  break;
1574  case EST_Uninstantiated:
1575  OS << " noexcept-uninstantiated " << EPI.ExceptionSpec.SourceTemplate;
1576  break;
1577  }
1578  }
1579 
1580  if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
1581  if (MD->size_overridden_methods() != 0) {
1582  auto dumpOverride = [=](const CXXMethodDecl *D) {
1583  SplitQualType T_split = D->getType().split();
1584  OS << D << " " << D->getParent()->getName()
1585  << "::" << D->getNameAsString() << " '"
1586  << QualType::getAsString(T_split, PrintPolicy) << "'";
1587  };
1588 
1589  AddChild([=] {
1590  auto Overrides = MD->overridden_methods();
1591  OS << "Overrides: [ ";
1592  dumpOverride(*Overrides.begin());
1593  for (const auto *Override :
1594  llvm::make_range(Overrides.begin() + 1, Overrides.end())) {
1595  OS << ", ";
1596  dumpOverride(Override);
1597  }
1598  OS << " ]";
1599  });
1600  }
1601  }
1602 
1603  // Since NumParams comes from the FunctionProtoType of the FunctionDecl and
1604  // the Params are set later, it is possible for a dump during debugging to
1605  // encounter a FunctionDecl that has been created but hasn't been assigned
1606  // ParmVarDecls yet.
1607  if (!D->param_empty() && !D->param_begin())
1608  OS << " <<<NULL params x " << D->getNumParams() << ">>>";
1609 }
1610 
1612  const LifetimeExtendedTemporaryDecl *D) {
1613  OS << " extended by ";
1615  OS << " mangling ";
1616  {
1617  ColorScope Color(OS, ShowColors, ValueColor);
1618  OS << D->getManglingNumber();
1619  }
1620 }
1621 
1623  dumpName(D);
1624  dumpType(D->getType());
1625  if (D->isMutable())
1626  OS << " mutable";
1627  if (D->isModulePrivate())
1628  OS << " __module_private__";
1629 }
1630 
1632  dumpName(D);
1633  dumpType(D->getType());
1634  StorageClass SC = D->getStorageClass();
1635  if (SC != SC_None)
1636  OS << ' ' << VarDecl::getStorageClassSpecifierString(SC);
1637  switch (D->getTLSKind()) {
1638  case VarDecl::TLS_None:
1639  break;
1640  case VarDecl::TLS_Static:
1641  OS << " tls";
1642  break;
1643  case VarDecl::TLS_Dynamic:
1644  OS << " tls_dynamic";
1645  break;
1646  }
1647  if (D->isModulePrivate())
1648  OS << " __module_private__";
1649  if (D->isNRVOVariable())
1650  OS << " nrvo";
1651  if (D->isInline())
1652  OS << " inline";
1653  if (D->isConstexpr())
1654  OS << " constexpr";
1655  if (D->hasInit()) {
1656  switch (D->getInitStyle()) {
1657  case VarDecl::CInit:
1658  OS << " cinit";
1659  break;
1660  case VarDecl::CallInit:
1661  OS << " callinit";
1662  break;
1663  case VarDecl::ListInit:
1664  OS << " listinit";
1665  break;
1666  }
1667  }
1668  if (D->needsDestruction(D->getASTContext()))
1669  OS << " destroyed";
1670  if (D->isParameterPack())
1671  OS << " pack";
1672 
1673  if (D->hasInit()) {
1674  const Expr *E = D->getInit();
1675  // Only dump the value of constexpr VarDecls for now.
1676  if (E && !E->isValueDependent() && D->isConstexpr()) {
1677  const APValue *Value = D->evaluateValue();
1678  if (Value)
1679  AddChild("value", [=] { Visit(*Value, E->getType()); });
1680  }
1681  }
1682 }
1683 
1685  dumpName(D);
1686  dumpType(D->getType());
1687 }
1688 
1690  if (D->isNothrow())
1691  OS << " nothrow";
1692 }
1693 
1695  OS << ' ' << D->getImportedModule()->getFullModuleName();
1696 
1697  for (Decl *InitD :
1699  dumpDeclRef(InitD, "initializer");
1700 }
1701 
1703  OS << ' ';
1704  switch (D->getCommentKind()) {
1705  case PCK_Unknown:
1706  llvm_unreachable("unexpected pragma comment kind");
1707  case PCK_Compiler:
1708  OS << "compiler";
1709  break;
1710  case PCK_ExeStr:
1711  OS << "exestr";
1712  break;
1713  case PCK_Lib:
1714  OS << "lib";
1715  break;
1716  case PCK_Linker:
1717  OS << "linker";
1718  break;
1719  case PCK_User:
1720  OS << "user";
1721  break;
1722  }
1723  StringRef Arg = D->getArg();
1724  if (!Arg.empty())
1725  OS << " \"" << Arg << "\"";
1726 }
1727 
1729  const PragmaDetectMismatchDecl *D) {
1730  OS << " \"" << D->getName() << "\" \"" << D->getValue() << "\"";
1731 }
1732 
1734  const OMPExecutableDirective *D) {
1735  if (D->isStandaloneDirective())
1736  OS << " openmp_standalone_directive";
1737 }
1738 
1740  const OMPDeclareReductionDecl *D) {
1741  dumpName(D);
1742  dumpType(D->getType());
1743  OS << " combiner";
1744  dumpPointer(D->getCombiner());
1745  if (const auto *Initializer = D->getInitializer()) {
1746  OS << " initializer";
1748  switch (D->getInitializerKind()) {
1750  OS << " omp_priv = ";
1751  break;
1753  OS << " omp_priv ()";
1754  break;
1756  break;
1757  }
1758  }
1759 }
1760 
1762  for (const auto *C : D->clauselists()) {
1763  AddChild([=] {
1764  if (!C) {
1765  ColorScope Color(OS, ShowColors, NullColor);
1766  OS << "<<<NULL>>> OMPClause";
1767  return;
1768  }
1769  {
1770  ColorScope Color(OS, ShowColors, AttrColor);
1771  StringRef ClauseName(
1772  llvm::omp::getOpenMPClauseName(C->getClauseKind()));
1773  OS << "OMP" << ClauseName.substr(/*Start=*/0, /*N=*/1).upper()
1774  << ClauseName.drop_front() << "Clause";
1775  }
1776  dumpPointer(C);
1777  dumpSourceRange(SourceRange(C->getBeginLoc(), C->getEndLoc()));
1778  });
1779  }
1780 }
1781 
1783  dumpName(D);
1784  dumpType(D->getType());
1785 }
1786 
1788  dumpName(D);
1789  if (D->isInline())
1790  OS << " inline";
1791  if (!D->isOriginalNamespace())
1792  dumpDeclRef(D->getOriginalNamespace(), "original");
1793 }
1794 
1796  OS << ' ';
1798 }
1799 
1801  dumpName(D);
1803 }
1804 
1806  dumpName(D);
1808 }
1809 
1811  const TypeAliasTemplateDecl *D) {
1812  dumpName(D);
1813 }
1814 
1816  VisitRecordDecl(D);
1817  if (!D->isCompleteDefinition())
1818  return;
1819 
1820  AddChild([=] {
1821  {
1822  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1823  OS << "DefinitionData";
1824  }
1825 #define FLAG(fn, name) \
1826  if (D->fn()) \
1827  OS << " " #name;
1828  FLAG(isParsingBaseSpecifiers, parsing_base_specifiers);
1829 
1830  FLAG(isGenericLambda, generic);
1831  FLAG(isLambda, lambda);
1832 
1833  FLAG(isAnonymousStructOrUnion, is_anonymous);
1834  FLAG(canPassInRegisters, pass_in_registers);
1835  FLAG(isEmpty, empty);
1836  FLAG(isAggregate, aggregate);
1837  FLAG(isStandardLayout, standard_layout);
1838  FLAG(isTriviallyCopyable, trivially_copyable);
1839  FLAG(isPOD, pod);
1840  FLAG(isTrivial, trivial);
1841  FLAG(isPolymorphic, polymorphic);
1842  FLAG(isAbstract, abstract);
1843  FLAG(isLiteral, literal);
1844 
1845  FLAG(hasUserDeclaredConstructor, has_user_declared_ctor);
1846  FLAG(hasConstexprNonCopyMoveConstructor, has_constexpr_non_copy_move_ctor);
1847  FLAG(hasMutableFields, has_mutable_fields);
1848  FLAG(hasVariantMembers, has_variant_members);
1849  FLAG(allowConstDefaultInit, can_const_default_init);
1850 
1851  AddChild([=] {
1852  {
1853  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1854  OS << "DefaultConstructor";
1855  }
1856  FLAG(hasDefaultConstructor, exists);
1857  FLAG(hasTrivialDefaultConstructor, trivial);
1858  FLAG(hasNonTrivialDefaultConstructor, non_trivial);
1859  FLAG(hasUserProvidedDefaultConstructor, user_provided);
1860  FLAG(hasConstexprDefaultConstructor, constexpr);
1861  FLAG(needsImplicitDefaultConstructor, needs_implicit);
1862  FLAG(defaultedDefaultConstructorIsConstexpr, defaulted_is_constexpr);
1863  });
1864 
1865  AddChild([=] {
1866  {
1867  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1868  OS << "CopyConstructor";
1869  }
1870  FLAG(hasSimpleCopyConstructor, simple);
1871  FLAG(hasTrivialCopyConstructor, trivial);
1872  FLAG(hasNonTrivialCopyConstructor, non_trivial);
1873  FLAG(hasUserDeclaredCopyConstructor, user_declared);
1874  FLAG(hasCopyConstructorWithConstParam, has_const_param);
1875  FLAG(needsImplicitCopyConstructor, needs_implicit);
1876  FLAG(needsOverloadResolutionForCopyConstructor,
1877  needs_overload_resolution);
1879  FLAG(defaultedCopyConstructorIsDeleted, defaulted_is_deleted);
1880  FLAG(implicitCopyConstructorHasConstParam, implicit_has_const_param);
1881  });
1882 
1883  AddChild([=] {
1884  {
1885  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1886  OS << "MoveConstructor";
1887  }
1888  FLAG(hasMoveConstructor, exists);
1889  FLAG(hasSimpleMoveConstructor, simple);
1890  FLAG(hasTrivialMoveConstructor, trivial);
1891  FLAG(hasNonTrivialMoveConstructor, non_trivial);
1892  FLAG(hasUserDeclaredMoveConstructor, user_declared);
1893  FLAG(needsImplicitMoveConstructor, needs_implicit);
1894  FLAG(needsOverloadResolutionForMoveConstructor,
1895  needs_overload_resolution);
1897  FLAG(defaultedMoveConstructorIsDeleted, defaulted_is_deleted);
1898  });
1899 
1900  AddChild([=] {
1901  {
1902  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1903  OS << "CopyAssignment";
1904  }
1905  FLAG(hasSimpleCopyAssignment, simple);
1906  FLAG(hasTrivialCopyAssignment, trivial);
1907  FLAG(hasNonTrivialCopyAssignment, non_trivial);
1908  FLAG(hasCopyAssignmentWithConstParam, has_const_param);
1909  FLAG(hasUserDeclaredCopyAssignment, user_declared);
1910  FLAG(needsImplicitCopyAssignment, needs_implicit);
1911  FLAG(needsOverloadResolutionForCopyAssignment, needs_overload_resolution);
1912  FLAG(implicitCopyAssignmentHasConstParam, implicit_has_const_param);
1913  });
1914 
1915  AddChild([=] {
1916  {
1917  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1918  OS << "MoveAssignment";
1919  }
1920  FLAG(hasMoveAssignment, exists);
1921  FLAG(hasSimpleMoveAssignment, simple);
1922  FLAG(hasTrivialMoveAssignment, trivial);
1923  FLAG(hasNonTrivialMoveAssignment, non_trivial);
1924  FLAG(hasUserDeclaredMoveAssignment, user_declared);
1925  FLAG(needsImplicitMoveAssignment, needs_implicit);
1926  FLAG(needsOverloadResolutionForMoveAssignment, needs_overload_resolution);
1927  });
1928 
1929  AddChild([=] {
1930  {
1931  ColorScope Color(OS, ShowColors, DeclKindNameColor);
1932  OS << "Destructor";
1933  }
1934  FLAG(hasSimpleDestructor, simple);
1935  FLAG(hasIrrelevantDestructor, irrelevant);
1936  FLAG(hasTrivialDestructor, trivial);
1937  FLAG(hasNonTrivialDestructor, non_trivial);
1938  FLAG(hasUserDeclaredDestructor, user_declared);
1939  FLAG(hasConstexprDestructor, constexpr);
1940  FLAG(needsImplicitDestructor, needs_implicit);
1941  FLAG(needsOverloadResolutionForDestructor, needs_overload_resolution);
1943  FLAG(defaultedDestructorIsDeleted, defaulted_is_deleted);
1944  });
1945  });
1946 
1947  for (const auto &I : D->bases()) {
1948  AddChild([=] {
1949  if (I.isVirtual())
1950  OS << "virtual ";
1951  dumpAccessSpecifier(I.getAccessSpecifier());
1952  dumpType(I.getType());
1953  if (I.isPackExpansion())
1954  OS << "...";
1955  });
1956  }
1957 }
1958 
1960  dumpName(D);
1961 }
1962 
1964  dumpName(D);
1965 }
1966 
1968  dumpName(D);
1969 }
1970 
1972  dumpName(D);
1973 }
1974 
1976  if (const auto *TC = D->getTypeConstraint()) {
1977  OS << " ";
1978  dumpBareDeclRef(TC->getNamedConcept());
1979  if (TC->getNamedConcept() != TC->getFoundDecl()) {
1980  OS << " (";
1981  dumpBareDeclRef(TC->getFoundDecl());
1982  OS << ")";
1983  }
1984  Visit(TC->getImmediatelyDeclaredConstraint());
1985  } else if (D->wasDeclaredWithTypename())
1986  OS << " typename";
1987  else
1988  OS << " class";
1989  OS << " depth " << D->getDepth() << " index " << D->getIndex();
1990  if (D->isParameterPack())
1991  OS << " ...";
1992  dumpName(D);
1993 }
1994 
1996  const NonTypeTemplateParmDecl *D) {
1997  dumpType(D->getType());
1998  OS << " depth " << D->getDepth() << " index " << D->getIndex();
1999  if (D->isParameterPack())
2000  OS << " ...";
2001  dumpName(D);
2002 }
2003 
2005  const TemplateTemplateParmDecl *D) {
2006  OS << " depth " << D->getDepth() << " index " << D->getIndex();
2007  if (D->isParameterPack())
2008  OS << " ...";
2009  dumpName(D);
2010 }
2011 
2013  OS << ' ';
2014  if (D->getQualifier())
2016  OS << D->getNameAsString();
2017 }
2018 
2020  const UnresolvedUsingTypenameDecl *D) {
2021  OS << ' ';
2022  if (D->getQualifier())
2024  OS << D->getNameAsString();
2025 }
2026 
2028  const UnresolvedUsingValueDecl *D) {
2029  OS << ' ';
2030  if (D->getQualifier())
2032  OS << D->getNameAsString();
2033  dumpType(D->getType());
2034 }
2035 
2037  OS << ' ';
2039 }
2040 
2042  const ConstructorUsingShadowDecl *D) {
2043  if (D->constructsVirtualBase())
2044  OS << " virtual";
2045 
2046  AddChild([=] {
2047  OS << "target ";
2049  });
2050 
2051  AddChild([=] {
2052  OS << "nominated ";
2054  OS << ' ';
2056  });
2057 
2058  AddChild([=] {
2059  OS << "constructed ";
2061  OS << ' ';
2063  });
2064 }
2065 
2067  switch (D->getLanguage()) {
2069  OS << " C";
2070  break;
2072  OS << " C++";
2073  break;
2074  }
2075 }
2076 
2078  OS << ' ';
2080 }
2081 
2083  if (TypeSourceInfo *T = D->getFriendType())
2084  dumpType(T->getType());
2085 }
2086 
2088  dumpName(D);
2089  dumpType(D->getType());
2090  if (D->getSynthesize())
2091  OS << " synthesize";
2092 
2093  switch (D->getAccessControl()) {
2094  case ObjCIvarDecl::None:
2095  OS << " none";
2096  break;
2097  case ObjCIvarDecl::Private:
2098  OS << " private";
2099  break;
2101  OS << " protected";
2102  break;
2103  case ObjCIvarDecl::Public:
2104  OS << " public";
2105  break;
2106  case ObjCIvarDecl::Package:
2107  OS << " package";
2108  break;
2109  }
2110 }
2111 
2113  if (D->isInstanceMethod())
2114  OS << " -";
2115  else
2116  OS << " +";
2117  dumpName(D);
2118  dumpType(D->getReturnType());
2119 
2120  if (D->isVariadic())
2121  OS << " variadic";
2122 }
2123 
2125  dumpName(D);
2126  switch (D->getVariance()) {
2128  break;
2129 
2131  OS << " covariant";
2132  break;
2133 
2135  OS << " contravariant";
2136  break;
2137  }
2138 
2139  if (D->hasExplicitBound())
2140  OS << " bounded";
2142 }
2143 
2145  dumpName(D);
2148  for (const auto *P : D->protocols())
2149  dumpDeclRef(P);
2150 }
2151 
2153  dumpName(D);
2156 }
2157 
2159  dumpName(D);
2160 
2161  for (const auto *Child : D->protocols())
2162  dumpDeclRef(Child);
2163 }
2164 
2166  dumpName(D);
2167  dumpDeclRef(D->getSuperClass(), "super");
2168 
2170  for (const auto *Child : D->protocols())
2171  dumpDeclRef(Child);
2172 }
2173 
2175  const ObjCImplementationDecl *D) {
2176  dumpName(D);
2177  dumpDeclRef(D->getSuperClass(), "super");
2179 }
2180 
2182  const ObjCCompatibleAliasDecl *D) {
2183  dumpName(D);
2185 }
2186 
2188  dumpName(D);
2189  dumpType(D->getType());
2190 
2192  OS << " required";
2194  OS << " optional";
2195 
2197  if (Attrs != ObjCPropertyAttribute::kind_noattr) {
2199  OS << " readonly";
2201  OS << " assign";
2203  OS << " readwrite";
2205  OS << " retain";
2207  OS << " copy";
2209  OS << " nonatomic";
2211  OS << " atomic";
2213  OS << " weak";
2215  OS << " strong";
2217  OS << " unsafe_unretained";
2219  OS << " class";
2221  OS << " direct";
2223  dumpDeclRef(D->getGetterMethodDecl(), "getter");
2225  dumpDeclRef(D->getSetterMethodDecl(), "setter");
2226  }
2227 }
2228 
2230  dumpName(D->getPropertyDecl());
2232  OS << " synthesize";
2233  else
2234  OS << " dynamic";
2237 }
2238 
2240  if (D->isVariadic())
2241  OS << " variadic";
2242 
2243  if (D->capturesCXXThis())
2244  OS << " captures_this";
2245 }
2246 
2248  dumpName(D);
2249 }
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:614
unsigned getStructNumFields() const
Definition: APValue.h:499
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:82
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
Definition: DeclCXX.h:2254
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:1097
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node)
bool path_empty() const
Definition: Expr.h:3430
void VisitVarTemplateDecl(const VarTemplateDecl *D)
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
Definition: DeclCXX.h:3253
Represents a function declaration or definition.
Definition: Decl.h:1783
static const TerminalColor StmtColor
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
Definition: Expr.h:1299
void VisitGenericSelectionExpr(const GenericSelectionExpr *E)
bool isVarArgParam() const LLVM_READONLY
Definition: Comment.h:776
The receiver is an object instance.
Definition: ExprObjC.h:1091
void VisitCXXDeleteExpr(const CXXDeleteExpr *Node)
protocol_range protocols() const
Definition: DeclObjC.h:1357
A class which contains all the information about a particular captured value.
Definition: Decl.h:4070
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
Definition: DeclBase.h:773
Represents the dependent type named by a dependently-scoped typename using declaration, e.g.
Definition: Type.h:4342
void VisitIfStmt(const IfStmt *Node)
StringRef getArgText(unsigned Idx) const
Definition: Comment.h:672
A (possibly-)qualified type.
Definition: Type.h:655
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
ArrayRef< Module * > getModulesWithMergedDefinition(const NamedDecl *Def)
Get the additional modules in which the definition Def has been merged.
void VisitExpressionTraitExpr(const ExpressionTraitExpr *Node)
const char * getDeclKindName() const
Definition: DeclBase.cpp:123
base_class_range bases()
Definition: DeclCXX.h:588
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition: Expr.h:3145
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition: ExprObjC.h:886
ObjCInterfaceDecl * getClassInterface()
Definition: DeclObjC.h:2316
Selector getSelector() const
Definition: ExprObjC.cpp:306
Defines enumerations for the type traits support.
void VisitCXXConstructExpr(const CXXConstructExpr *Node)
ObjCIvarDecl * getPropertyIvarDecl() const
Definition: DeclObjC.h:2821
bool isSuperReceiver() const
Definition: ExprObjC.h:772
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2619
bool hasVarStorage() const
True if this IfStmt has storage for a variable declaration.
Definition: Stmt.h:1936
static void dumpPreviousDeclImpl(raw_ostream &OS,...)
bool isListInitialization() const
Determine whether this expression models list-initialization.
Definition: ExprCXX.h:3436
bool isPositionValid() const LLVM_READONLY
Definition: Comment.h:842
ArrayRef< TemplateArgument > getTypeConstraintArguments() const
Definition: Type.h:5011
void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D)
ObjCProtocolDecl * getProtocol() const
Definition: ExprObjC.h:521
Stmt - This represents one statement.
Definition: Stmt.h:68
bool isStandaloneDirective() const
Returns whether or not this is a Standalone directive.
Definition: StmtOpenMP.cpp:25
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: Type.h:3547
IfStmt - This represents an if/then/else.
Definition: Stmt.h:1866
ObjCMethodDecl * setAtIndexMethodDecl() const
Definition: ExprObjC.h:890
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:2961
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:1029
Represents the declaration of a typedef-name via the &#39;typedef&#39; type specifier.
Definition: Decl.h:3193
C Language Family Type Representation.
Defines the SourceManager interface.
void VisitOMPRequiresDecl(const OMPRequiresDecl *D)
bool isDecltypeAuto() const
Definition: Type.h:5023
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:89
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
Definition: DeclCXX.h:981
TagDecl * getDecl() const
Definition: Type.cpp:3416
void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node)
ObjCMethodDecl * getImplicitPropertySetter() const
Definition: ExprObjC.h:713
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
bool isNothrow() const
Definition: Decl.cpp:4783
FunctionDecl * getOperatorNew() const
Definition: ExprCXX.h:2211
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
Definition: DeclCXX.h:199
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:3027
Defines the C++ template declaration subclasses.
Opcode getOpcode() const
Definition: Expr.h:3688
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
Definition: Type.h:4981
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:1472
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
Definition: ExprCXX.h:1537
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:2888
void VisitImportDecl(const ImportDecl *D)
Represent a C++ namespace.
Definition: Decl.h:497
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1426
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:841
RetTy Visit(const Type *T)
Performs the operation associated with this visitor object.
Definition: TypeVisitor.h:68
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent...
Definition: ExprCXX.h:2707
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:115
StringRef getParamName(const FullComment *FC) const
Definition: Comment.cpp:371
A container of type source information.
Definition: Type.h:6373
void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D)
bool hasVarStorage() const
True if this SwitchStmt has storage for a condition variable.
Definition: Stmt.h:2133
IdentKind getIdentKind() const
Definition: Expr.h:2011
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node)
void VisitOMPIteratorExpr(const OMPIteratorExpr *Node)
TemplateTypeParmDecl * getDecl() const
Definition: Type.h:4811
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2413
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
Definition: ExprCXX.h:4406
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
Definition: Decl.h:2096
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class...
Definition: DeclCXX.h:780
void VisitObjCProtocolDecl(const ObjCProtocolDecl *D)
A matrix component is a single element of a matrix.
Definition: Specifiers.h:161
static const TerminalColor ObjectKindColor
This name appears in an unevaluated operand.
Definition: Specifiers.h:169
void dumpSourceRange(SourceRange R)
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
Definition: Decl.h:3344
Represents a #pragma comment line.
Definition: Decl.h:114
void VisitSizeOfPackExpr(const SizeOfPackExpr *Node)
void VisitTypedefDecl(const TypedefDecl *D)
const CXXBaseSpecifier *const * path_const_iterator
Definition: Expr.h:3429
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:158
Represents a variable declaration or definition.
Definition: Decl.h:820
StringRef getArgText(unsigned Idx) const
Definition: Comment.h:360
void VisitTagType(const TagType *T)
CompoundLiteralExpr - [C99 6.5.2.5].
Definition: Expr.h:3303
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
Definition: Specifiers.h:373
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
Definition: Decl.h:3706
APFloat & getComplexFloatReal()
Definition: APValue.h:426
const T * getAs() const
Member-template getAs<specific type>&#39;.
Definition: Type.h:7153
ObjCCategoryImplDecl * getImplementation() const
Definition: DeclObjC.cpp:2044
void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node)
Extra information about a function prototype.
Definition: Type.h:3969
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:139
bool hasInitStorage() const
True if this SwitchStmt has storage for an init statement.
Definition: Stmt.h:2130
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:2943
bool isConst() const
Definition: Type.h:3828
const char * getName() const
Definition: Stmt.cpp:351
bool isInvalidDecl() const
Definition: DeclBase.h:558
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition: ExprCXX.h:3095
Not a TLS variable.
Definition: Decl.h:837
unsigned getIndex(unsigned Depth) const
Definition: Comment.h:851
protocol_range protocols() const
Definition: DeclObjC.h:2120
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
Definition: ExprCXX.h:3296
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:2678
ObjCPropertyDecl * getExplicitProperty() const
Definition: ExprObjC.h:703
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
void VisitTemplateSpecializationType(const TemplateSpecializationType *T)
Information about a single command.
const char * getStmtClassName() const
Definition: Stmt.cpp:76
SourceLocation getAttributeLoc() const
Definition: Type.h:3211
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:1764
Represents a struct/union/class.
Definition: Decl.h:3770
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:2836
void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D)
static bool isSimpleAPValue(const APValue &Value)
True if the APValue Value can be folded onto the current line.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:272
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:3928
QualType::DestructionKind needsDestruction(const ASTContext &Ctx) const
Would the destruction of this variable have any effect, and if so, what kind?
Definition: Decl.cpp:2600
bool isImplicit() const
Returns true if the attribute has been implicitly created instead of explicitly written by the user...
Definition: Attr.h:99
void VisitObjCIvarDecl(const ObjCIvarDecl *D)
A vector component is an element or range of elements on a vector.
Definition: Specifiers.h:149
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:174
bool isInline() const
Returns true if this is an inline namespace declaration.
Definition: Decl.h:558
is ARM Neon vector
Definition: Type.h:3250
RenderKind getRenderKind() const
Definition: Comment.h:352
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:2769
void VisitPackTemplateArgument(const TemplateArgument &TA)
void VisitEnumConstantDecl(const EnumConstantDecl *D)
Represents a member of a struct/union/class.
Definition: Decl.h:2746
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
Definition: Type.h:5167
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
Definition: DeclCXX.h:2315
void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D)
StringRef getText() const LLVM_READONLY
Definition: Comment.h:883
StringRef getValue() const
Definition: Decl.h:172
void VisitTypeAliasDecl(const TypeAliasDecl *D)
InitKind getInitializerKind() const
Get initializer kind.
Definition: DeclOpenMP.h:173
ObjCMethodDecl * getSetterMethodDecl() const
Definition: DeclObjC.h:916
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:32
void VisitFunctionProtoType(const FunctionProtoType *T)
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
Definition: DeclBase.h:418
unsigned getArraySize() const
Definition: APValue.h:490
void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D)
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:5736
Represents an access specifier followed by colon &#39;:&#39;.
Definition: DeclCXX.h:86
void VisitUsingDecl(const UsingDecl *D)
Describes a module or submodule.
Definition: Module.h:87
static const TerminalColor ErrorsColor
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
Definition: Specifiers.h:127
Selector getSelector() const
Definition: ExprObjC.h:468
Represents Objective-C&#39;s @catch statement.
Definition: StmtObjC.h:77
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
StringRef getOpcodeStr() const
Definition: Expr.h:3709
void VisitSwitchStmt(const SwitchStmt *Node)
A command with word-like arguments that is considered inline content.
Definition: Comment.h:297
Describes an C or C++ initializer list.
Definition: Expr.h:4627
Represents a C++ using-declaration.
Definition: DeclCXX.h:3398
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:4353
AssociationTy< true > ConstAssociation
Definition: Expr.h:5612
void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D)
An lvalue ref-qualifier was provided (&).
Definition: Type.h:1428
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:740
FunctionDecl * getOperatorDelete() const
Definition: ExprCXX.h:2391
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:225
bool isElidable() const
Whether this construction is elidable.
Definition: ExprCXX.h:1504
bool isGlobalNew() const
Definition: ExprCXX.h:2252
A verbatim line command.
Definition: Comment.h:943
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node)
const TypeConstraint * getTypeConstraint() const
Returns the type constraint associated with this template parameter (if any).
ArrayRef< NamedDecl * > chain() const
Definition: Decl.h:3022
An x-value expression is a reference to an object with independent storage but which can be "moved"...
Definition: Specifiers.h:136
bool isTypeAlias() const
Determine if this template specialization type is for a type alias template that has been substituted...
Definition: Type.h:5152
path_iterator path_begin()
Definition: Expr.h:3432
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node)
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
Definition: ExprOpenMP.h:272
bool isConstrained() const
Definition: Type.h:5019
const clang::PrintingPolicy & getPrintingPolicy() const
Definition: ASTContext.h:611
bool isByRef() const
Whether this is a "by ref" capture, i.e.
Definition: Decl.h:4095
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
Definition: Type.h:1904
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3644
static bool isPostfix(Opcode Op)
isPostfix - Return true if this is a postfix operation, like x++.
Definition: Expr.h:2207
Any part of the comment.
Definition: Comment.h:52
void VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *Node)
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node)
bool hasElseStorage() const
True if this IfStmt has storage for an else statement.
Definition: Stmt.h:1939
CXXRecordDecl * getDecl() const
Definition: Type.cpp:3506
bool isArrow() const
Definition: Expr.h:3246
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
Definition: Decl.h:1412
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:1532
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
bool isAnyMemberInitializer() const
Definition: DeclCXX.h:2262
void dumpLocation(SourceLocation Loc)
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3373
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2055
unsigned getParamIndex() const LLVM_READONLY
Definition: Comment.h:785
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1378
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC)...
Definition: DeclBase.h:843
FieldDecl * getAnyMember() const
Definition: DeclCXX.h:2327
PropertyControl getPropertyImplementation() const
Definition: DeclObjC.h:924
void * getAsOpaquePtr() const
Definition: Type.h:700
void VisitLabelStmt(const LabelStmt *Node)
An ordinary object is located at an address in memory.
Definition: Specifiers.h:143
bool hasExplicitBound() const
Whether this type parameter has an explicitly-written type bound, e.g., "T : NSView".
Definition: DeclObjC.h:632
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3503
Represents the body of a CapturedStmt, and serves as its DeclContext.
Definition: Decl.h:4253
Represents an ObjC class declaration.
Definition: DeclObjC.h:1163
This is an odr-use.
Definition: Specifiers.h:167
Represents a linkage specification.
Definition: DeclCXX.h:2807
QualType getReturnType() const
Definition: DeclObjC.h:325
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:3253
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:3955
APSInt & getComplexIntReal()
Definition: APValue.h:410
SplitQualType getSplitDesugaredType() const
Definition: Type.h:965
A binding in a decomposition declaration.
Definition: DeclCXX.h:3841
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:3194
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
param_iterator param_begin()
Definition: Decl.h:2414
Represents the this expression in C++.
Definition: ExprCXX.h:1108
Module * getImportedModule() const
Retrieve the module that was imported by the import declaration.
Definition: Decl.h:4417
ObjCIvarDecl * getDecl()
Definition: ExprObjC.h:576
APValue & getVectorElt(unsigned I)
Definition: APValue.h:454
StringRef getArg() const
Definition: Decl.h:139
bool isArrayForm() const
Definition: ExprCXX.h:2378
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:2748
#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:3570
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)
TextNodeDumper(raw_ostream &OS, const ASTContext &Context, bool ShowColors)
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T)
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
StringRef getText() const LLVM_READONLY
Definition: Comment.h:281
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Definition: ExprCXX.h:1528
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Definition: Decl.h:3213
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3886
void VisitImplicitCastExpr(const ImplicitCastExpr *Node)
ValueDecl * getExtendingDecl()
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition: ExprCXX.h:4456
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition: ExprCXX.h:1498
QualType getComputationLHSType() const
Definition: Expr.h:3925
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
Definition: OpenMPClause.h:80
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
Definition: DeclCXX.h:2282
APValue & getArrayFiller()
Definition: APValue.h:478
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
Definition: Expr.h:2517
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node)
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:999
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:265
void outputString(raw_ostream &OS) const
Definition: Expr.cpp:1072
This represents &#39;#pragma omp requires...&#39; directive.
Definition: DeclOpenMP.h:345
unsigned getValue() const
Definition: Expr.h:1585
bool hasArrayFiller() const
Definition: APValue.h:475
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
Definition: Specifiers.h:153
Represents an array type in C++ whose size is a value-dependent expression.
Definition: Type.h:3092
ObjCMethodDecl * getBoxingMethod() const
Definition: ExprObjC.h:147
static const TerminalColor ValueColor
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Definition: Decl.h:2510
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Definition: DeclCXX.h:3292
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4064
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:619
This represents one expression.
Definition: Expr.h:110
StringRef getKindName() const
Definition: Decl.h:3414
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
Definition: ExprCXX.h:3306
void visitInlineCommandComment(const comments::InlineCommandComment *C, const comments::FullComment *)
bool isDefaulted() const
Whether this function is defaulted.
Definition: Decl.h:2130
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:3700
Declaration of a template type parameter.
unsigned getIndex() const
Definition: Type.h:4808
DynTypedNode Node
const T * castAs() const
Member-template castAs<specific type>.
Definition: Type.h:7218
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why? This is only meaningful if the named memb...
Definition: Expr.h:3286
void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node)
unsigned getLine() const
Return the presumed line number of this location.
void VisitOMPExecutableDirective(const OMPExecutableDirective *D)
This name appears as a potential result of an lvalue-to-rvalue conversion that is a constant expressi...
Definition: Specifiers.h:172
#define V(N, I)
Definition: ASTContext.h:2899
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:563
void VisitTypeTraitExpr(const TypeTraitExpr *Node)
const char * getTypeClassName() const
Definition: Type.cpp:2872
QualType getArgumentType() const
Definition: Expr.h:2559
static double GetApproxValue(const llvm::APFloat &F)
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:439
ObjCInterfaceDecl * getSuperClass() const
Definition: DeclObjC.cpp:338
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:454
TLSKind getTLSKind() const
Definition: Decl.cpp:1985
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:4080
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition: Decl.h:2499
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:3359
IdentifierInfo & getAccessor() const
Definition: Expr.h:5757
void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D)
ArrayTypeTrait getTrait() const
Definition: ExprCXX.h:2746
decls_iterator decls_begin() const
Definition: ExprCXX.h:2926
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
Definition: DeclCXX.h:3375
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
Definition: Type.h:594
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:2008
void print(llvm::raw_ostream &OS) const
Prints the full selector name (e.g. "foo:bar:").
QualType getType() const
Definition: Expr.h:142
static const TerminalColor ValueKindColor
StorageClass
Storage classes.
Definition: Specifiers.h:240
A unary type transform, which is a type constructed from another.
Definition: Type.h:4535
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:831
APValue & getStructField(unsigned i)
Definition: APValue.h:507
Qualifiers Quals
The local qualifiers.
Definition: Type.h:599
bool isDirectionExplicit() const LLVM_READONLY
Definition: Comment.h:749
Declaration of an alias template.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
Definition: DeclBase.h:1816
LabelDecl * getLabel() const
Definition: Stmt.h:2535
QualType getEncodedType() const
Definition: ExprObjC.h:428
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:940
void VisitTypedefType(const TypedefType *T)
Represents an unpacked "presumed" location which can be presented to the user.
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition: ExprObjC.h:708
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:2131
bool isInstanceMethod() const
Definition: DeclObjC.h:424
#define SM(sm)
Definition: Cuda.cpp:62
IteratorRange getIteratorRange(unsigned I)
Gets the iterator range for the given iterator.
Definition: Expr.cpp:4896
void dumpBareType(QualType T, bool Desugar=true)
Represents a GCC generic vector type.
Definition: Type.h:3234
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition: ExprObjC.h:1224
An opening HTML tag with attributes.
Definition: Comment.h:413
ArraySizeModifier getSizeModifier() const
Definition: Type.h:2911
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
UTTKind getUTTKind() const
Definition: Type.h:4563
StringRef getName() const
Definition: Decl.h:171
APValue * evaluateValue() const
Attempt to evaluate the value of the initializer attached to this declaration, and produce notes expl...
Definition: Decl.cpp:2343
ValueDecl * getDecl()
Definition: Expr.h:1262
void VisitPragmaCommentDecl(const PragmaCommentDecl *D)
Selector getSelector() const
Definition: DeclObjC.h:323
std::string getAsString() const
APSInt & getComplexIntImag()
Definition: APValue.h:418
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:2122
void VisitExprWithCleanups(const ExprWithCleanups *Node)
bool isNull() const
Return true if this QualType doesn&#39;t point to a type yet.
Definition: Type.h:720
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
Definition: Decl.h:1309
void visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
void VisitFloatingLiteral(const FloatingLiteral *Node)
QualType getType() const
Definition: DeclObjC.h:814
bool getValue() const
Definition: ExprCXX.h:703
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
static const char * getDirectionAsString(PassDirection D)
Definition: Comment.cpp:192
const FieldDecl * getUnionField() const
Definition: APValue.h:518
void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D)
void VisitCapturedDecl(const CapturedDecl *D)
APValue getAPValueResult() const
Definition: Expr.cpp:361
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition: DeclCXX.h:3752
void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D)
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
Definition: Type.h:6410
const char * getFilename() const
Return the presumed filename of this location.
APValue & getStructBase(unsigned i)
Definition: APValue.h:503
unsigned getStructNumBases() const
Definition: APValue.h:495
void VisitIndirectFieldDecl(const IndirectFieldDecl *D)
APValue & getArrayInitializedElt(unsigned I)
Definition: APValue.h:467
is AltiVec &#39;vector Pixel&#39;
Definition: Type.h:3244
static StringRef getIdentKindName(IdentKind IK)
Definition: Expr.cpp:590
This object has an indeterminate value (C++ [basic.indet]).
Definition: APValue.h:123
not a target-specific vector type
Definition: Type.h:3238
ExpressionTrait getTrait() const
Definition: ExprCXX.h:2812
ExceptionSpecificationType Type
The kind of exception specification this is.
Definition: Type.h:3945
bool isImplicitProperty() const
Definition: ExprObjC.h:700
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:4107
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:1982
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
Definition: Type.h:6007
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
bool containsErrors() const
Whether this type is an error type.
Definition: Type.h:2179
bool isPure() const
Whether this virtual function is pure, i.e.
Definition: Decl.h:2105
void VisitDependentSizedArrayType(const DependentSizedArrayType *T)
Decl * getIteratorDecl(unsigned I)
Gets the iterator declaration for the given iterator.
Definition: Expr.cpp:4892
bool hasVarStorage() const
True if this WhileStmt has storage for a condition variable.
Definition: Stmt.h:2309
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:3662
void dumpPointer(const void *Ptr)
Pseudo declaration for capturing expressions.
Definition: DeclOpenMP.h:312
void VisitFixedPointLiteral(const FixedPointLiteral *Node)
Interfaces are the core concept in Objective-C for object oriented design.
Definition: Type.h:5993
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
Definition: Type.h:2203
void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D)
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:33
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:266
APValue & getUnionValue()
Definition: APValue.h:522
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
Definition: ExprCXX.h:2093
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the &#39;typename&#39; keyword.
SourceRange getSourceRange() const LLVM_READONLY
Definition: Comment.h:214
ASTContext & getASTContext() const LLVM_READONLY
Definition: DeclBase.cpp:414
ObjCCategoryDecl * getCategoryDecl() const
Definition: DeclObjC.cpp:2088
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
bool isParamIndexValid() const LLVM_READONLY
Definition: Comment.h:772
Represents the declaration of a label.
Definition: Decl.h:451
Represents a dependent using declaration which was not marked with typename.
Definition: DeclCXX.h:3617
APFloat & getFloat()
Definition: APValue.h:394
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:3830
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:1960
QualType getLocallyUnqualifiedSingleStepDesugaredType() const
Pull a single level of sugar off of this locally-unqualified type.
Definition: Type.cpp:424
std::string getValueAsString(unsigned Radix) const
Definition: Expr.cpp:923
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:2191
No ref-qualifier was provided.
Definition: Type.h:1425
C-style initialization with assignment.
Definition: Decl.h:825
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 hasAPValueResult() const
Definition: Expr.h:1080
bool isParameterPack() const
Definition: Type.h:4809
bool isLiteral(TokenKind K)
Return true if this is a "literal" kind, like a numeric constant, string, etc.
Definition: TokenKinds.h:86
void VisitBlockDecl(const BlockDecl *D)
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2271
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:52
UnaryExprOrTypeTrait getKind() const
Definition: Expr.h:2548
bool isArray() const
Definition: ExprCXX.h:2216
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
Definition: Decl.h:3697
static const TerminalColor NullColor
void VisitVarDecl(const VarDecl *D)
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:504
bool isValueDependent() const
Determines whether the value of this expression depends on.
Definition: Expr.h:169
StringRef getParamNameAsWritten() const
Definition: Comment.h:834
is AltiVec &#39;vector bool ...&#39;
Definition: Type.h:3247
Defines the clang::Module class, which describes a module in the source code.
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:3365
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:742
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3484
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
Definition: DeclBase.h:716
void dumpDeclRef(const Decl *D, StringRef Label={})
void dumpCleanupObject(const ExprWithCleanups::CleanupObject &C)
bool isMessagingGetter() const
True if the property reference will result in a message to the getter.
Definition: ExprObjC.h:733
is AltiVec vector
Definition: Type.h:3241
PassDirection getDirection() const LLVM_READONLY
Definition: Comment.h:745
void VisitCXXNewExpr(const CXXNewExpr *Node)
Qualifiers getIndexTypeQualifiers() const
Definition: Type.h:2915
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:443
bool isOriginalNamespace() const
Return true if this declaration is an original (first) declaration of the namespace.
Definition: DeclCXX.cpp:2838
VarDecl * getVariable() const
The variable being captured.
Definition: Decl.h:4091
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
Definition: TemplateBase.h:302
An expression trait intrinsic.
Definition: ExprCXX.h:2777
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:1431
SourceRange getBracketsRange() const
Definition: Type.h:3120
void VisitPackExpansionType(const PackExpansionType *T)
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:128
bool isArgumentType() const
Definition: Expr.h:2558
ObjCImplementationDecl * getImplementation() const
Definition: DeclObjC.cpp:1573
Optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
Definition: Type.h:5634
unsigned numOfIterators() const
Returns number of iterator definitions.
Definition: ExprOpenMP.h:399
bool isPartOfExplicitCast() const
Definition: Expr.h:3503
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:2193
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:4358
Doxygen \tparam command, describes a template parameter.
Definition: Comment.h:799
protocol_range protocols() const
Definition: DeclObjC.h:2347
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
Definition: Expr.h:1386
The injected class name of a C++ class template or class template partial specialization.
Definition: Type.h:5241
Represents a pack expansion of types.
Definition: Type.h:5610
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:3891
Defines various enumerations that describe declaration and type specifiers.
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:1937
void VisitArrayType(const ArrayType *T)
Represents a C11 generic selection.
Definition: Expr.h:5454
void VisitIntegerLiteral(const IntegerLiteral *Node)
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:4141
void dumpAccessSpecifier(AccessSpecifier AS)
TLS with a dynamic initializer.
Definition: Decl.h:843
Represents a template argument.
Definition: TemplateBase.h:51
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
Definition: DeclBase.h:591
bool isDeduced() const
Definition: Type.h:4969
This name appears as a potential result of a discarded value expression.
Definition: Specifiers.h:175
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2431
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
Definition: DeclCXX.cpp:2793
Dataflow Directional Tag Classes.
bool isResultDependent() const
Whether this generic selection is result-dependent.
Definition: Expr.h:5632
unsigned getManglingNumber() const
Definition: DeclCXX.h:3155
ExtInfo getExtInfo() const
Definition: Type.h:3822
not evaluated yet, for special member function
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:1924
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1303
static const TerminalColor AttrColor
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
Definition: ExprCXX.h:2352
bool isNested() const
Whether this is a nested capture, i.e.
Definition: Decl.h:4107
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Definition: ExprCXX.h:112
bool isVariadic() const
Definition: Decl.h:4139
Kind getPropertyImplementation() const
Definition: DeclObjC.h:2817
bool isImplicit() const
Definition: ExprCXX.h:1125
bool hasInitStorage() const
True if this IfStmt has the storage for an init statement.
Definition: Stmt.h:1933
Represents a field injected from an anonymous union/struct into the parent scope. ...
Definition: Decl.h:3000
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
QualType getUnderlyingType() const
Definition: Decl.h:3146
AccessSpecifier getAccess() const
Definition: DeclBase.h:478
const Expr * getInit() const
Definition: Decl.h:1229
NamespaceDecl * getOriginalNamespace()
Get the original (first) namespace declaration.
Definition: DeclCXX.cpp:2824
unsigned getIndex() const
Retrieve the index of the template parameter.
bool usesADL() const
Definition: Expr.h:2893
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
Definition: ExprCXX.h:3649
Represents a dependent using declaration which was marked with typename.
Definition: DeclCXX.h:3713
bool isImplicit() const
Definition: OpenMPClause.h:82
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:572
VectorKind getVectorKind() const
Definition: Type.h:3275
static std::string getAsString(SplitQualType split, const PrintingPolicy &Policy)
Definition: Type.h:997
Kind getKind() const
Definition: DeclBase.h:433
void VisitUnresolvedUsingType(const UnresolvedUsingType *T)
unsigned getArrayInitializedElts() const
Definition: APValue.h:486
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition: ExprCXX.h:1517
const Type * getBaseClass() const
If this is a base class initializer, returns the type of the base class.
Definition: DeclCXX.cpp:2486
void VisitDeclRefExpr(const DeclRefExpr *Node)
Represents an enum.
Definition: Decl.h:3501
Iterator range representation begin:end[:step].
Definition: ExprOpenMP.h:278
bool isParameterPack() const
Determine whether this variable is actually a function parameter pack or init-capture pack...
Definition: Decl.cpp:2451
void VisitObjCMessageExpr(const ObjCMessageExpr *Node)
SourceLocation getBeginLoc() const
Returns the starting location of the clause.
Definition: OpenMPClause.h:68
void VisitUsingShadowDecl(const UsingShadowDecl *D)
const ObjCInterfaceDecl * getClassInterface() const
Definition: DeclObjC.h:2736
const char * getTraitSpelling(ExpressionTrait T) LLVM_READONLY
Return the spelling of the type trait TT. Never null.
llvm::APInt getValue() const
Definition: Expr.h:1445
LabelDecl * getLabel() const
Definition: Expr.h:4164
void VisitTypeTemplateArgument(const TemplateArgument &TA)
SourceLocation getEndLoc() const
Returns the ending location of the clause.
Definition: OpenMPClause.h:71
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
Definition: ExprObjC.h:1269
path_iterator path_end()
Definition: Expr.h:3433
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:2075
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class...
Definition: DeclCXX.h:870
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:2543
FunctionDecl * SourceTemplate
The function template whose exception specification this is instantiated from, for EST_Uninstantiated...
Definition: Type.h:3959
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:4617
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:2185
unsigned getNumObjects() const
Definition: ExprCXX.h:3329
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:409
bool isFromAST() const
Whether this type comes from an AST file.
Definition: Type.h:1887
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.
const char * getOperatorSpelling(OverloadedOperatorKind Operator)
Retrieve the spelling of the given overloaded operator, without the preceding "operator" keyword...
static const TerminalColor CastColor
const llvm::APInt & getSize() const
Definition: Type.h:2957
static const TerminalColor TypeColor
Opcode getOpcode() const
Definition: Expr.h:2173
Base for LValueReferenceType and RValueReferenceType.
Definition: Type.h:2756
static const TerminalColor DeclKindNameColor
SourceRange getBracketsRange() const
Definition: Type.h:3063
static const char * getCastKindName(CastKind CK)
Definition: Expr.cpp:1788
bool isVolatile() const
Definition: Type.h:3829
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node)
void VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *Node)
bool isArrow() const
Determine whether this member expression used the &#39;->&#39; operator; otherwise, it used the &#39;...
Definition: ExprCXX.h:3610
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat]...
Definition: APValue.h:115
Represents a base class of a C++ class.
Definition: DeclCXX.h:146
__DEVICE__ int max(int __a, int __b)
A bitfield object is a bitfield on a C or C++ record.
Definition: Specifiers.h:146
void VisitCharacterLiteral(const CharacterLiteral *Node)
void VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D)
void VisitConceptDecl(const ConceptDecl *D)
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:548
bool capturesCXXThis() const
Definition: Decl.h:4196
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3382
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2522
void VisitBinaryOperator(const BinaryOperator *Node)
TypedefNameDecl * getDecl() const
Definition: Type.h:4385
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
Definition: SemaDecl.cpp:15148
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
unsigned getDepth() const
Definition: Type.h:4807
bool isFreeIvar() const
Definition: ExprObjC.h:585
Call-style initialization (C++98)
Definition: Decl.h:828
void dumpName(const NamedDecl *ND)
ValueKind getKind() const
Definition: APValue.h:355
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:3062
APFloat & getComplexFloatImag()
Definition: APValue.h:434
bool isMutable() const
Determines whether this field is mutable (C++ only).
Definition: Decl.h:2821
static bool isTrivial(ASTContext &Ctx, const Expr *E)
Checks if the expression is constant or does not have non-trivial function calls. ...
Represents a C++ struct/union/class.
Definition: DeclCXX.h:254
const char * getCommentKindName() const
Definition: Comment.cpp:35
bool isValid() const
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO)...
Definition: Decl.h:1355
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:1692
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1936
There is no such object (it&#39;s outside its lifetime).
Definition: APValue.h:121
WhileStmt - This represents a &#39;while&#39; stmt.
Definition: Stmt.h:2258
void dumpBareDeclRef(const Decl *D)
CleanupObject getObject(unsigned i) const
Definition: ExprCXX.h:3331
bool isInherited() const
Definition: Attr.h:95
ObjCPropertyAttribute::Kind getPropertyAttributes() const
Definition: DeclObjC.h:825
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:429
The receiver is a class.
Definition: ExprObjC.h:1088
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Definition: Stmt.cpp:263
bool isGlobalDelete() const
Definition: ExprCXX.h:2377
void VisitObjCInterfaceType(const ObjCInterfaceType *T)
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1732
void dumpType(QualType T)
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
Definition: DeclCXX.h:3104
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2768
TLS with a known-constant initializer.
Definition: Decl.h:840
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
Definition: Decl.h:3657
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Definition: Decl.h:250
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:3441
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:3384
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:363
unsigned getNumElements() const
Definition: Type.h:3270
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:88
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
Definition: Type.h:2185
QualType getAsType() const
Retrieve the type for a type template argument.
Definition: TemplateBase.h:258
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1190
Represents a type template specialization; the template must be a class template, a type alias templa...
Definition: Type.h:5104
ObjCPropertyDecl * getPropertyDecl() const
Definition: DeclObjC.h:2812
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
Definition: DeclObjC.h:615
Doxygen \param command.
Definition: Comment.h:711
bool isDeleted() const
Whether this function has been deleted.
Definition: Decl.h:2257
void VisitAccessSpecDecl(const AccessSpecDecl *D)
const VarDecl * getCatchParamDecl() const
Definition: StmtObjC.h:97
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:673
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Definition: Expr.h:4734
bool isArraySubscriptRefExpr() const
Definition: ExprObjC.h:894
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
Definition: ExprCXX.h:3417
static StringRef getNameForCallConv(CallingConv CC)
Definition: Type.cpp:3067
QualType getType() const
Definition: Decl.h:630
An l-value expression is a reference to an object with independent storage.
Definition: Specifiers.h:131
void VisitNamespaceDecl(const NamespaceDecl *D)
void VisitAutoType(const AutoType *T)
void VisitConstantExpr(const ConstantExpr *Node)
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:612
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to...
Definition: Expr.cpp:1260
ObjCMethodDecl * getGetterMethodDecl() const
Definition: DeclObjC.h:913
CXXRecordDecl * getNominatedBaseClass() const
Get the base class that was named in the using declaration.
Definition: DeclCXX.cpp:2962
This represents a decl that may have a name.
Definition: Decl.h:223
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:691
StringRef getParamName(const FullComment *FC) const
Definition: Comment.cpp:378
Represents a C array with a specified size that is not an integer-constant-expression.
Definition: Type.h:3038
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D)
Represents a C++ namespace alias.
Definition: DeclCXX.h:2996
void VisitCXXThisExpr(const CXXThisExpr *Node)
bool isInline() const
Whether this variable is (C++1z) inline.
Definition: Decl.h:1394
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
Definition: TemplateBase.h:282
APSInt & getInt()
Definition: APValue.h:380
AccessControl getAccessControl() const
Definition: DeclObjC.h:1975
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node)
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
Represents C++ using-directive.
Definition: DeclCXX.h:2892
Represents a #pragma detect_mismatch line.
Definition: Decl.h:148
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
double getValueAsApproximateDouble() const
getValueAsApproximateDouble - This returns the value as an inaccurate double.
Definition: Expr.cpp:962
ConceptDecl * getTypeConstraintConcept() const
Definition: Type.h:5015
attr::Kind getKind() const
Definition: Attr.h:86
The receiver is a superclass.
Definition: ExprObjC.h:1094
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:289
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
Definition: Decl.cpp:3242
bool hasInit() const
Definition: Decl.cpp:2213
SourceLocation getBegin() const
NamedDecl * getPack() const
Retrieve the parameter pack.
Definition: ExprCXX.h:4151
decls_iterator decls_end() const
Definition: ExprCXX.h:2929
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
Definition: DeclObjC.h:2490
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
Definition: Stmt.h:1601
Represents the canonical version of C arrays with a specified constant size.
Definition: Type.h:2934
The parameter is invariant: must match exactly.
ExceptionSpecInfo ExceptionSpec
Definition: Type.h:3975
void VisitUnaryOperator(const UnaryOperator *Node)
void VisitLabelDecl(const LabelDecl *D)
Declaration of a template function.
Definition: DeclTemplate.h:977
void AddChild(Fn DoAddChild)
Add a child of the current node. Calls DoAddChild without arguments.
APFixedPoint & getFixedPoint()
Definition: APValue.h:402
void VisitFunctionDecl(const FunctionDecl *D)
Attr - This represents one attribute.
Definition: Attr.h:46
bool isDeletedAsWritten() const
Definition: Decl.h:2261
SourceLocation getLocation() const
Definition: DeclBase.h:430
void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D)
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
Definition: DeclCXX.h:3191
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: Type.h:6384
TypeTrait getTrait() const
Determine which type trait this expression uses.
Definition: ExprCXX.h:2658
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:3092
PragmaMSCommentKind getCommentKind() const
Definition: Decl.h:137
ObjCCompatibleAliasDecl - Represents alias of a class.
Definition: DeclObjC.h:2718
bool param_empty() const
Definition: Decl.h:2413
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:245
void VisitRValueReferenceType(const ReferenceType *T)
unsigned getVectorLength() const
Definition: APValue.h:462