clang 22.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"
20#include "clang/AST/Type.h"
22#include "clang/Basic/Module.h"
26#include "llvm/ADT/StringExtras.h"
27#include "llvm/Frontend/HLSL/HLSLRootSignature.h"
28
29#include <algorithm>
30#include <utility>
31
32using namespace clang;
33
34static void dumpPreviousDeclImpl(raw_ostream &OS, ...) {}
35
36template <typename T>
37static void dumpPreviousDeclImpl(raw_ostream &OS, const Mergeable<T> *D) {
38 const T *First = D->getFirstDecl();
39 if (First != D)
40 OS << " first " << First;
41}
42
43template <typename T>
44static void dumpPreviousDeclImpl(raw_ostream &OS, const Redeclarable<T> *D) {
45 const T *Prev = D->getPreviousDecl();
46 if (Prev)
47 OS << " prev " << Prev;
48}
49
50/// Dump the previous declaration in the redeclaration chain for a declaration,
51/// if any.
52static void dumpPreviousDecl(raw_ostream &OS, const Decl *D) {
53 switch (D->getKind()) {
54#define DECL(DERIVED, BASE) \
55 case Decl::DERIVED: \
56 return dumpPreviousDeclImpl(OS, cast<DERIVED##Decl>(D));
57#define ABSTRACT_DECL(DECL)
58#include "clang/AST/DeclNodes.inc"
59 }
60 llvm_unreachable("Decl that isn't part of DeclNodes.inc!");
61}
62
63TextNodeDumper::TextNodeDumper(raw_ostream &OS, const ASTContext &Context,
64 bool ShowColors)
66 Context(&Context), SM(&Context.getSourceManager()),
67 PrintPolicy(Context.getPrintingPolicy()),
68 Traits(&Context.getCommentCommandTraits()) {}
69
72
74 const comments::FullComment *FC) {
75 if (!C) {
76 ColorScope Color(OS, ShowColors, NullColor);
77 OS << "<<<NULL>>>";
78 return;
79 }
80
81 {
82 ColorScope Color(OS, ShowColors, CommentColor);
83 OS << C->getCommentKindName();
84 }
86 dumpSourceRange(C->getSourceRange());
87
88 ConstCommentVisitor<TextNodeDumper, void,
89 const comments::FullComment *>::visit(C, FC);
90}
91
93 {
94 ColorScope Color(OS, ShowColors, AttrColor);
95
96 switch (A->getKind()) {
97#define ATTR(X) \
98 case attr::X: \
99 OS << #X; \
100 break;
101#include "clang/Basic/AttrList.inc"
102 }
103 OS << "Attr";
104 }
105 dumpPointer(A);
107 if (A->isInherited())
108 OS << " Inherited";
109 if (A->isImplicit())
110 OS << " Implicit";
111
113}
114
116 const Decl *From, StringRef Label) {
117 OS << "TemplateArgument";
118 if (R.isValid())
120
121 if (From)
122 dumpDeclRef(From, Label);
123
125}
126
128 if (!Node) {
129 ColorScope Color(OS, ShowColors, NullColor);
130 OS << "<<<NULL>>>";
131 return;
132 }
133 {
134 ColorScope Color(OS, ShowColors, StmtColor);
135 OS << Node->getStmtClassName();
136 }
139
140 if (const auto *E = dyn_cast<Expr>(Node)) {
141 dumpType(E->getType());
142
143 if (E->containsErrors()) {
144 ColorScope Color(OS, ShowColors, ErrorsColor);
145 OS << " contains-errors";
146 }
147
148 {
149 ColorScope Color(OS, ShowColors, ValueKindColor);
150 switch (E->getValueKind()) {
151 case VK_PRValue:
152 break;
153 case VK_LValue:
154 OS << " lvalue";
155 break;
156 case VK_XValue:
157 OS << " xvalue";
158 break;
159 }
160 }
161
162 {
163 ColorScope Color(OS, ShowColors, ObjectKindColor);
164 switch (E->getObjectKind()) {
165 case OK_Ordinary:
166 break;
167 case OK_BitField:
168 OS << " bitfield";
169 break;
170 case OK_ObjCProperty:
171 OS << " objcproperty";
172 break;
173 case OK_ObjCSubscript:
174 OS << " objcsubscript";
175 break;
177 OS << " vectorcomponent";
178 break;
180 OS << " matrixcomponent";
181 break;
182 }
183 }
184 }
185
187}
188
190 if (!T) {
191 ColorScope Color(OS, ShowColors, NullColor);
192 OS << "<<<NULL>>>";
193 return;
194 }
195 if (isa<LocInfoType>(T)) {
196 {
197 ColorScope Color(OS, ShowColors, TypeColor);
198 OS << "LocInfo Type";
199 }
200 dumpPointer(T);
201 return;
202 }
203
204 {
205 ColorScope Color(OS, ShowColors, TypeColor);
206 OS << T->getTypeClassName() << "Type";
207 }
208 dumpPointer(T);
209 OS << " ";
210 dumpBareType(QualType(T, 0), false);
211
212 QualType SingleStepDesugar =
214 if (SingleStepDesugar != QualType(T, 0))
215 OS << " sugar";
216
217 if (T->containsErrors()) {
218 ColorScope Color(OS, ShowColors, ErrorsColor);
219 OS << " contains-errors";
220 }
221
222 if (T->isDependentType())
223 OS << " dependent";
225 OS << " instantiation_dependent";
226
228 OS << " variably_modified";
230 OS << " contains_unexpanded_pack";
231 if (T->isFromAST())
232 OS << " imported";
233
235}
236
238 OS << "QualType";
239 dumpPointer(T.getAsOpaquePtr());
240 OS << " ";
241 dumpBareType(T, false);
242 OS << " " << T.split().Quals.getAsString();
243}
244
246 if (!TL) {
247 ColorScope Color(OS, ShowColors, NullColor);
248 OS << "<<<NULL>>>";
249 return;
250 }
251
252 {
253 ColorScope Color(OS, ShowColors, TypeColor);
255 ? "Qualified"
256 : TL.getType()->getTypeClassName())
257 << "TypeLoc";
258 }
260 OS << ' ';
261 dumpBareType(TL.getType(), /*Desugar=*/false);
262
264}
265
267 if (!D) {
268 ColorScope Color(OS, ShowColors, NullColor);
269 OS << "<<<NULL>>>";
270 return;
271 }
272
273 {
274 ColorScope Color(OS, ShowColors, DeclKindNameColor);
275 OS << D->getDeclKindName() << "Decl";
276 }
277 dumpPointer(D);
279 OS << " parent " << cast<Decl>(D->getDeclContext());
280 dumpPreviousDecl(OS, D);
282 OS << ' ';
284 if (D->isFromASTFile())
285 OS << " imported";
286 if (Module *M = D->getOwningModule())
287 OS << " in " << M->getFullModuleName();
288 if (auto *ND = dyn_cast<NamedDecl>(D))
290 const_cast<NamedDecl *>(ND)))
291 AddChild([=] { OS << "also in " << M->getFullModuleName(); });
292 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D))
293 if (!ND->isUnconditionallyVisible())
294 OS << " hidden";
295 if (D->isImplicit())
296 OS << " implicit";
297
298 if (D->isUsed())
299 OS << " used";
300 else if (D->isThisDeclarationReferenced())
301 OS << " referenced";
302
303 if (D->isInvalidDecl())
304 OS << " invalid";
305 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
306 if (FD->isConstexprSpecified())
307 OS << " constexpr";
308 if (FD->isConsteval())
309 OS << " consteval";
310 else if (FD->isImmediateFunction())
311 OS << " immediate";
312 if (FD->isMultiVersion())
313 OS << " multiversion";
314 }
315
316 if (!isa<FunctionDecl>(*D)) {
317 const auto *MD = dyn_cast<ObjCMethodDecl>(D);
318 if (!MD || !MD->isThisDeclarationADefinition()) {
319 const auto *DC = dyn_cast<DeclContext>(D);
320 if (DC && DC->hasExternalLexicalStorage()) {
321 ColorScope Color(OS, ShowColors, UndeserializedColor);
322 OS << " <undeserialized declarations>";
323 }
324 }
325 }
326
327 switch (D->getFriendObjectKind()) {
328 case Decl::FOK_None:
329 break;
331 OS << " friend";
332 break;
334 OS << " friend_undeclared";
335 break;
336 }
337
339}
340
342 OS << "CXXCtorInitializer";
343 if (Init->isAnyMemberInitializer()) {
344 OS << ' ';
345 dumpBareDeclRef(Init->getAnyMember());
346 } else if (Init->isBaseInitializer()) {
347 dumpType(QualType(Init->getBaseClass(), 0));
348 } else if (Init->isDelegatingInitializer()) {
349 dumpType(Init->getTypeSourceInfo()->getType());
350 } else {
351 llvm_unreachable("Unknown initializer type");
352 }
353}
354
356 OS << "capture";
357 if (C.isByRef())
358 OS << " byref";
359 if (C.isNested())
360 OS << " nested";
361 if (C.getVariable()) {
362 OS << ' ';
363 dumpBareDeclRef(C.getVariable());
364 }
365}
366
368 if (!C) {
369 ColorScope Color(OS, ShowColors, NullColor);
370 OS << "<<<NULL>>> OMPClause";
371 return;
372 }
373 {
374 ColorScope Color(OS, ShowColors, AttrColor);
375 StringRef ClauseName(llvm::omp::getOpenMPClauseName(C->getClauseKind()));
376 OS << "OMP" << ClauseName.substr(/*Start=*/0, /*N=*/1).upper()
377 << ClauseName.drop_front() << "Clause";
378 }
379 dumpPointer(C);
380 dumpSourceRange(SourceRange(C->getBeginLoc(), C->getEndLoc()));
381 if (C->isImplicit())
382 OS << " <implicit>";
383}
384
386 const OpenACCAsteriskSizeExpr *E) {
387 // Nothing to do here, only location exists, and that is printed elsewhere.
388}
389
391 if (!C) {
392 ColorScope Color(OS, ShowColors, NullColor);
393 OS << "<<<NULL>>> OpenACCClause";
394 return;
395 }
396 {
397 ColorScope Color(OS, ShowColors, AttrColor);
398 OS << C->getClauseKind();
399
400 // Handle clauses with parens for types that have no children, likely
401 // because there is no sub expression.
402 switch (C->getClauseKind()) {
404 OS << '(' << cast<OpenACCDefaultClause>(C)->getDefaultClauseKind() << ')';
405 break;
438 // The condition expression will be printed as a part of the 'children',
439 // but print 'clause' here so it is clear what is happening from the dump.
440 OS << " clause";
441 break;
443 OS << " clause";
444 // print the list of all GangKinds, so that there is some sort of
445 // relationship to the expressions listed afterwards.
446 auto *GC = cast<OpenACCGangClause>(C);
447
448 for (unsigned I = 0; I < GC->getNumExprs(); ++I) {
449 OS << " " << GC->getExpr(I).first;
450 }
451 break;
452 }
454 OS << " clause";
455 if (cast<OpenACCCollapseClause>(C)->hasForce())
456 OS << ": force";
457 break;
458
462 OS << " clause";
463 if (cast<OpenACCCopyClause>(C)->getModifierList() !=
465 OS << " modifiers: " << cast<OpenACCCopyClause>(C)->getModifierList();
466 break;
470 OS << " clause";
471 if (cast<OpenACCCopyInClause>(C)->getModifierList() !=
473 OS << " modifiers: " << cast<OpenACCCopyInClause>(C)->getModifierList();
474 break;
478 OS << " clause";
479 if (cast<OpenACCCopyOutClause>(C)->getModifierList() !=
481 OS << " modifiers: "
482 << cast<OpenACCCopyOutClause>(C)->getModifierList();
483 break;
487 OS << " clause";
488 if (cast<OpenACCCreateClause>(C)->getModifierList() !=
490 OS << " modifiers: " << cast<OpenACCCreateClause>(C)->getModifierList();
491 break;
493 OS << " clause";
494 if (cast<OpenACCWaitClause>(C)->hasDevNumExpr())
495 OS << " has devnum";
496 if (cast<OpenACCWaitClause>(C)->hasQueuesTag())
497 OS << " has queues tag";
498 break;
501 OS << "(";
502 llvm::interleaveComma(
503 cast<OpenACCDeviceTypeClause>(C)->getArchitectures(), OS,
504 [&](const DeviceTypeArgument &Arch) {
505 if (Arch.getIdentifierInfo() == nullptr)
506 OS << "*";
507 else
508 OS << Arch.getIdentifierInfo()->getName();
509 });
510 OS << ")";
511 break;
513 OS << " clause Operator: "
514 << cast<OpenACCReductionClause>(C)->getReductionOp();
515 break;
517 OS << " clause";
518 if (cast<OpenACCBindClause>(C)->isIdentifierArgument())
519 OS << " identifier '"
520 << cast<OpenACCBindClause>(C)->getIdentifierArgument()->getName()
521 << "'";
522 else
523 AddChild(
524 [=] { Visit(cast<OpenACCBindClause>(C)->getStringArgument()); });
525 }
526 }
527 dumpPointer(C);
528 dumpSourceRange(SourceRange(C->getBeginLoc(), C->getEndLoc()));
529}
530
532 const TypeSourceInfo *TSI = A.getTypeSourceInfo();
533 if (TSI) {
534 OS << "case ";
535 dumpType(TSI->getType());
536 } else {
537 OS << "default";
538 }
539
540 if (A.isSelected())
541 OS << " selected";
542}
543
545 if (!R) {
546 ColorScope Color(OS, ShowColors, NullColor);
547 OS << "<<<NULL>>> ConceptReference";
548 return;
549 }
550
551 OS << "ConceptReference";
552 dumpPointer(R);
554 OS << ' ';
556}
557
559 if (!R) {
560 ColorScope Color(OS, ShowColors, NullColor);
561 OS << "<<<NULL>>> Requirement";
562 return;
563 }
564
565 {
566 ColorScope Color(OS, ShowColors, StmtColor);
567 switch (R->getKind()) {
569 OS << "TypeRequirement";
570 break;
572 OS << "SimpleRequirement";
573 break;
575 OS << "CompoundRequirement";
576 break;
578 OS << "NestedRequirement";
579 break;
580 }
581 }
582
583 dumpPointer(R);
584
585 if (auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
586 if (ER->hasNoexceptRequirement())
587 OS << " noexcept";
588 }
589
590 if (R->isDependent())
591 OS << " dependent";
592 else
593 OS << (R->isSatisfied() ? " satisfied" : " unsatisfied");
595 OS << " contains_unexpanded_pack";
596}
597
598static double GetApproxValue(const llvm::APFloat &F) {
599 llvm::APFloat V = F;
600 bool ignored;
601 V.convert(llvm::APFloat::IEEEdouble(), llvm::APFloat::rmNearestTiesToEven,
602 &ignored);
603 return V.convertToDouble();
604}
605
606/// True if the \p APValue \p Value can be folded onto the current line.
607static bool isSimpleAPValue(const APValue &Value) {
608 switch (Value.getKind()) {
609 case APValue::None:
611 case APValue::Int:
612 case APValue::Float:
616 case APValue::LValue:
619 return true;
620 case APValue::Vector:
621 case APValue::Array:
622 case APValue::Struct:
623 return false;
624 case APValue::Union:
625 return isSimpleAPValue(Value.getUnionValue());
626 }
627 llvm_unreachable("unexpected APValue kind!");
628}
629
630/// Dump the children of the \p APValue \p Value.
631///
632/// \param[in] Value The \p APValue to visit
633/// \param[in] Ty The \p QualType passed to \p Visit
634///
635/// \param[in] IdxToChildFun A function mapping an \p APValue and an index
636/// to one of the child of the \p APValue
637///
638/// \param[in] NumChildren \p IdxToChildFun will be called on \p Value with
639/// the indices in the range \p [0,NumChildren(
640///
641/// \param[in] LabelSingular The label to use on a line with a single child
642/// \param[in] LabelPlurial The label to use on a line with multiple children
643void TextNodeDumper::dumpAPValueChildren(
644 const APValue &Value, QualType Ty,
645 const APValue &(*IdxToChildFun)(const APValue &, unsigned),
646 unsigned NumChildren, StringRef LabelSingular, StringRef LabelPlurial) {
647 // To save some vertical space we print up to MaxChildrenPerLine APValues
648 // considered to be simple (by isSimpleAPValue) on a single line.
649 constexpr unsigned MaxChildrenPerLine = 4;
650 unsigned I = 0;
651 while (I < NumChildren) {
652 unsigned J = I;
653 while (J < NumChildren) {
654 if (isSimpleAPValue(IdxToChildFun(Value, J)) &&
655 (J - I < MaxChildrenPerLine)) {
656 ++J;
657 continue;
658 }
659 break;
660 }
661
662 J = std::max(I + 1, J);
663
664 // Print [I,J) on a single line.
665 AddChild(J - I > 1 ? LabelPlurial : LabelSingular, [=]() {
666 for (unsigned X = I; X < J; ++X) {
667 Visit(IdxToChildFun(Value, X), Ty);
668 if (X + 1 != J)
669 OS << ", ";
670 }
671 });
672 I = J;
673 }
674}
675
677 ColorScope Color(OS, ShowColors, ValueKindColor);
678 switch (Value.getKind()) {
679 case APValue::None:
680 OS << "None";
681 return;
683 OS << "Indeterminate";
684 return;
685 case APValue::Int:
686 OS << "Int ";
687 {
688 ColorScope Color(OS, ShowColors, ValueColor);
689 OS << Value.getInt();
690 }
691 return;
692 case APValue::Float:
693 OS << "Float ";
694 {
695 ColorScope Color(OS, ShowColors, ValueColor);
696 OS << GetApproxValue(Value.getFloat());
697 }
698 return;
700 OS << "FixedPoint ";
701 {
702 ColorScope Color(OS, ShowColors, ValueColor);
703 OS << Value.getFixedPoint();
704 }
705 return;
706 case APValue::Vector: {
707 unsigned VectorLength = Value.getVectorLength();
708 OS << "Vector length=" << VectorLength;
709
710 dumpAPValueChildren(
711 Value, Ty,
712 [](const APValue &Value, unsigned Index) -> const APValue & {
713 return Value.getVectorElt(Index);
714 },
715 VectorLength, "element", "elements");
716 return;
717 }
719 OS << "ComplexInt ";
720 {
721 ColorScope Color(OS, ShowColors, ValueColor);
722 OS << Value.getComplexIntReal() << " + " << Value.getComplexIntImag()
723 << 'i';
724 }
725 return;
727 OS << "ComplexFloat ";
728 {
729 ColorScope Color(OS, ShowColors, ValueColor);
730 OS << GetApproxValue(Value.getComplexFloatReal()) << " + "
731 << GetApproxValue(Value.getComplexFloatImag()) << 'i';
732 }
733 return;
734 case APValue::LValue: {
735 (void)Context;
736 OS << "LValue Base=";
737 APValue::LValueBase B = Value.getLValueBase();
738 if (B.isNull())
739 OS << "null";
740 else if (const auto *BE = B.dyn_cast<const Expr *>()) {
741 OS << BE->getStmtClassName() << ' ';
742 dumpPointer(BE);
743 } else if (const auto BTI = B.dyn_cast<TypeInfoLValue>()) {
744 OS << "TypeInfoLValue ";
745 ColorScope Color(OS, ShowColors, TypeColor);
746 BTI.print(OS, PrintPolicy);
747 } else if (B.is<DynamicAllocLValue>()) {
748 OS << "DynamicAllocLValue";
749 auto BDA = B.getDynamicAllocType();
750 dumpType(BDA);
751 } else {
752 const auto *VDB = B.get<const ValueDecl *>();
753 OS << VDB->getDeclKindName() << "Decl";
754 dumpPointer(VDB);
755 }
756 OS << ", Null=" << Value.isNullPointer()
757 << ", Offset=" << Value.getLValueOffset().getQuantity()
758 << ", HasPath=" << Value.hasLValuePath();
759 if (Value.hasLValuePath()) {
760 OS << ", PathLength=" << Value.getLValuePath().size();
761 OS << ", Path=(";
762 llvm::ListSeparator Sep;
763 for (const auto &PathEntry : Value.getLValuePath()) {
764 // We're printing all entries as array indices because don't have the
765 // type information here to do anything else.
766 OS << Sep << PathEntry.getAsArrayIndex();
767 }
768 OS << ")";
769 }
770 return;
771 }
772 case APValue::Array: {
773 unsigned ArraySize = Value.getArraySize();
774 unsigned NumInitializedElements = Value.getArrayInitializedElts();
775 OS << "Array size=" << ArraySize;
776
777 dumpAPValueChildren(
778 Value, Ty,
779 [](const APValue &Value, unsigned Index) -> const APValue & {
780 return Value.getArrayInitializedElt(Index);
781 },
782 NumInitializedElements, "element", "elements");
783
784 if (Value.hasArrayFiller()) {
785 AddChild("filler", [=] {
786 {
787 ColorScope Color(OS, ShowColors, ValueColor);
788 OS << ArraySize - NumInitializedElements << " x ";
789 }
790 Visit(Value.getArrayFiller(), Ty);
791 });
792 }
793
794 return;
795 }
796 case APValue::Struct: {
797 OS << "Struct";
798
799 dumpAPValueChildren(
800 Value, Ty,
801 [](const APValue &Value, unsigned Index) -> const APValue & {
802 return Value.getStructBase(Index);
803 },
804 Value.getStructNumBases(), "base", "bases");
805
806 dumpAPValueChildren(
807 Value, Ty,
808 [](const APValue &Value, unsigned Index) -> const APValue & {
809 return Value.getStructField(Index);
810 },
811 Value.getStructNumFields(), "field", "fields");
812
813 return;
814 }
815 case APValue::Union: {
816 OS << "Union";
817 {
818 ColorScope Color(OS, ShowColors, ValueColor);
819 if (const FieldDecl *FD = Value.getUnionField())
820 OS << " ." << *cast<NamedDecl>(FD);
821 }
822 // If the union value is considered to be simple, fold it into the
823 // current line to save some vertical space.
824 const APValue &UnionValue = Value.getUnionValue();
825 if (isSimpleAPValue(UnionValue)) {
826 OS << ' ';
827 Visit(UnionValue, Ty);
828 } else {
829 AddChild([=] { Visit(UnionValue, Ty); });
830 }
831
832 return;
833 }
835 OS << "MemberPointer ";
836 auto Path = Value.getMemberPointerPath();
837 for (const CXXRecordDecl *D : Path) {
838 {
839 ColorScope Color(OS, ShowColors, DeclNameColor);
840 OS << D->getDeclName();
841 }
842 OS << "::";
843 }
844
845 ColorScope Color(OS, ShowColors, DeclNameColor);
846 if (const ValueDecl *MemDecl = Value.getMemberPointerDecl())
847 OS << MemDecl->getDeclName();
848 else
849 OS << "null";
850 return;
851 }
853 OS << "AddrLabelDiff <todo>";
854 return;
855 }
856 llvm_unreachable("Unknown APValue kind!");
857}
858
859void TextNodeDumper::dumpPointer(const void *Ptr) {
860 ColorScope Color(OS, ShowColors, AddressColor);
861 OS << ' ' << Ptr;
862}
863
865 if (!SM)
866 return;
867
868 ColorScope Color(OS, ShowColors, LocationColor);
869 SourceLocation SpellingLoc = SM->getSpellingLoc(Loc);
870
871 // The general format we print out is filename:line:col, but we drop pieces
872 // that haven't changed since the last loc printed.
873 PresumedLoc PLoc = SM->getPresumedLoc(SpellingLoc);
874
875 if (PLoc.isInvalid()) {
876 OS << "<invalid sloc>";
877 return;
878 }
879
880 if (strcmp(PLoc.getFilename(), LastLocFilename) != 0) {
881 OS << PLoc.getFilename() << ':' << PLoc.getLine() << ':'
882 << PLoc.getColumn();
883 LastLocFilename = PLoc.getFilename();
884 LastLocLine = PLoc.getLine();
885 } else if (PLoc.getLine() != LastLocLine) {
886 OS << "line" << ':' << PLoc.getLine() << ':' << PLoc.getColumn();
887 LastLocLine = PLoc.getLine();
888 } else {
889 OS << "col" << ':' << PLoc.getColumn();
890 }
891}
892
894 // Can't translate locations if a SourceManager isn't available.
895 if (!SM)
896 return;
897
898 OS << " <";
900 if (R.getBegin() != R.getEnd()) {
901 OS << ", ";
902 dumpLocation(R.getEnd());
903 }
904 OS << ">";
905
906 // <t2.c:123:421[blah], t2.c:412:321>
907}
908
910 ColorScope Color(OS, ShowColors, TypeColor);
911
912 SplitQualType T_split = T.split();
913 std::string T_str = QualType::getAsString(T_split, PrintPolicy);
914 OS << "'" << T_str << "'";
915
916 if (Desugar && !T.isNull()) {
917 // If the type is sugared, also dump a (shallow) desugared type when
918 // it is visibly different.
919 SplitQualType D_split = T.getSplitDesugaredType();
920 if (T_split != D_split) {
921 std::string D_str = QualType::getAsString(D_split, PrintPolicy);
922 if (T_str != D_str)
923 OS << ":'" << QualType::getAsString(D_split, PrintPolicy) << "'";
924 }
925 }
926}
927
929 OS << ' ';
931}
932
934 if (!D) {
935 ColorScope Color(OS, ShowColors, NullColor);
936 OS << "<<<NULL>>>";
937 return;
938 }
939
940 {
941 ColorScope Color(OS, ShowColors, DeclKindNameColor);
942 OS << D->getDeclKindName();
943 }
944 dumpPointer(D);
945
946 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
947 ColorScope Color(OS, ShowColors, DeclNameColor);
948 if (DeclarationName Name = ND->getDeclName())
949 OS << " '" << Name << '\'';
950 else
951 switch (ND->getKind()) {
952 case Decl::Decomposition: {
953 auto *DD = cast<DecompositionDecl>(ND);
954 OS << " first_binding '" << DD->bindings()[0]->getDeclName() << '\'';
955 break;
956 }
957 case Decl::Field: {
958 auto *FD = cast<FieldDecl>(ND);
959 OS << " field_index " << FD->getFieldIndex();
960 break;
961 }
962 case Decl::ParmVar: {
963 auto *PD = cast<ParmVarDecl>(ND);
964 OS << " depth " << PD->getFunctionScopeDepth() << " index "
965 << PD->getFunctionScopeIndex();
966 break;
967 }
968 case Decl::TemplateTypeParm: {
969 auto *TD = cast<TemplateTypeParmDecl>(ND);
970 OS << " depth " << TD->getDepth() << " index " << TD->getIndex();
971 break;
972 }
973 case Decl::NonTypeTemplateParm: {
974 auto *TD = cast<NonTypeTemplateParmDecl>(ND);
975 OS << " depth " << TD->getDepth() << " index " << TD->getIndex();
976 break;
977 }
978 default:
979 // Var, Namespace, (CXX)Record: Nothing else besides source location.
980 dumpSourceRange(ND->getSourceRange());
981 break;
982 }
983 }
984
985 if (const ValueDecl *VD = dyn_cast<ValueDecl>(D))
986 dumpType(VD->getType());
987}
988
990 if (ND->getDeclName()) {
991 ColorScope Color(OS, ShowColors, DeclNameColor);
992 OS << ' ' << ND->getDeclName();
993 }
994}
995
997 const auto AccessSpelling = getAccessSpelling(AS);
998 if (AccessSpelling.empty())
999 return;
1000 OS << AccessSpelling;
1001}
1002
1005 if (auto *BD = dyn_cast<BlockDecl *>(C))
1006 dumpDeclRef(BD, "cleanup");
1007 else if (auto *CLE = dyn_cast<CompoundLiteralExpr *>(C))
1008 AddChild([=] {
1009 OS << "cleanup ";
1010 {
1011 ColorScope Color(OS, ShowColors, StmtColor);
1012 OS << CLE->getStmtClassName();
1013 }
1014 dumpPointer(CLE);
1015 });
1016 else
1017 llvm_unreachable("unexpected cleanup type");
1018}
1019
1022 switch (TSK) {
1023 case TSK_Undeclared:
1024 break;
1026 OS << " implicit_instantiation";
1027 break;
1029 OS << " explicit_specialization";
1030 break;
1032 OS << " explicit_instantiation_declaration";
1033 break;
1035 OS << " explicit_instantiation_definition";
1036 break;
1037 }
1038}
1039
1041 if (!NNS)
1042 return;
1043
1044 AddChild([=] {
1045 OS << "NestedNameSpecifier";
1046
1047 switch (NNS.getKind()) {
1048 case NestedNameSpecifier::Kind::Namespace: {
1049 auto [Namespace, Prefix] = NNS.getAsNamespaceAndPrefix();
1050 OS << " "; // "Namespace" is printed as the decl kind.
1051 dumpBareDeclRef(Namespace);
1052 dumpNestedNameSpecifier(Prefix);
1053 break;
1054 }
1056 OS << " TypeSpec";
1057 dumpType(QualType(NNS.getAsType(), 0));
1058 break;
1060 OS << " Global";
1061 break;
1063 OS << " Super";
1064 break;
1066 llvm_unreachable("unexpected null nested name specifier");
1067 }
1068 });
1069}
1070
1071void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef Label) {
1072 if (!D)
1073 return;
1074
1075 AddChild([=] {
1076 if (!Label.empty())
1077 OS << Label << ' ';
1079 });
1080}
1081
1084 {
1085 llvm::raw_svector_ostream SS(Str);
1086 TA.print(PrintPolicy, SS, /*IncludeType=*/true);
1087 }
1088 OS << " '" << Str << "'";
1089
1090 if (!Context)
1091 return;
1092
1093 if (TemplateArgument CanonTA = Context->getCanonicalTemplateArgument(TA);
1094 !CanonTA.structurallyEquals(TA)) {
1095 llvm::SmallString<128> CanonStr;
1096 {
1097 llvm::raw_svector_ostream SS(CanonStr);
1098 CanonTA.print(PrintPolicy, SS, /*IncludeType=*/true);
1099 }
1100 if (CanonStr != Str)
1101 OS << ":'" << CanonStr << "'";
1102 }
1103}
1104
1105const char *TextNodeDumper::getCommandName(unsigned CommandID) {
1106 if (Traits)
1107 return Traits->getCommandInfo(CommandID)->Name;
1108 const comments::CommandInfo *Info =
1110 if (Info)
1111 return Info->Name;
1112 return "<not a builtin command>";
1113}
1114
1115void TextNodeDumper::printFPOptions(FPOptionsOverride FPO) {
1116#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
1117 if (FPO.has##NAME##Override()) \
1118 OS << " " #NAME "=" << FPO.get##NAME##Override();
1119#include "clang/Basic/FPOptions.def"
1120}
1121
1123 const comments::FullComment *) {
1124 OS << " Text=\"" << C->getText() << "\"";
1125}
1126
1129 OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
1130 switch (C->getRenderKind()) {
1132 OS << " RenderNormal";
1133 break;
1135 OS << " RenderBold";
1136 break;
1138 OS << " RenderMonospaced";
1139 break;
1141 OS << " RenderEmphasized";
1142 break;
1144 OS << " RenderAnchor";
1145 break;
1146 }
1147
1148 for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
1149 OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
1150}
1151
1154 OS << " Name=\"" << C->getTagName() << "\"";
1155 if (C->getNumAttrs() != 0) {
1156 OS << " Attrs: ";
1157 for (unsigned i = 0, e = C->getNumAttrs(); i != e; ++i) {
1158 const comments::HTMLStartTagComment::Attribute &Attr = C->getAttr(i);
1159 OS << " \"" << Attr.Name << "=\"" << Attr.Value << "\"";
1160 }
1161 }
1162 if (C->isSelfClosing())
1163 OS << " SelfClosing";
1164}
1165
1168 OS << " Name=\"" << C->getTagName() << "\"";
1169}
1170
1173 OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
1174 for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
1175 OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
1176}
1177
1180 OS << " "
1182
1183 if (C->isDirectionExplicit())
1184 OS << " explicitly";
1185 else
1186 OS << " implicitly";
1187
1188 if (C->hasParamName()) {
1189 if (C->isParamIndexValid())
1190 OS << " Param=\"" << C->getParamName(FC) << "\"";
1191 else
1192 OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
1193 }
1194
1195 if (C->isParamIndexValid() && !C->isVarArgParam())
1196 OS << " ParamIndex=" << C->getParamIndex();
1197}
1198
1201 if (C->hasParamName()) {
1202 if (C->isPositionValid())
1203 OS << " Param=\"" << C->getParamName(FC) << "\"";
1204 else
1205 OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
1206 }
1207
1208 if (C->isPositionValid()) {
1209 OS << " Position=<";
1210 for (unsigned i = 0, e = C->getDepth(); i != e; ++i) {
1211 OS << C->getIndex(i);
1212 if (i != e - 1)
1213 OS << ", ";
1214 }
1215 OS << ">";
1216 }
1217}
1218
1221 OS << " Name=\"" << getCommandName(C->getCommandID())
1222 << "\""
1223 " CloseName=\""
1224 << C->getCloseName() << "\"";
1225}
1226
1229 const comments::FullComment *) {
1230 OS << " Text=\"" << C->getText() << "\"";
1231}
1232
1235 OS << " Text=\"" << C->getText() << "\"";
1236}
1237
1239 OS << " null";
1240}
1241
1243 OS << " type";
1245}
1246
1248 const TemplateArgument &TA) {
1249 OS << " decl";
1251 dumpDeclRef(TA.getAsDecl());
1252}
1253
1255 OS << " nullptr";
1257}
1258
1260 OS << " integral";
1262}
1263
1265 const TemplateArgument &TA) {
1266 OS << " structural value";
1268}
1269
1271 AddChild(Label, [=] {
1272 {
1274 {
1275 llvm::raw_svector_ostream SS(Str);
1276 TN.print(SS, PrintPolicy);
1277 }
1278 OS << "'" << Str << "'";
1279
1280 if (Context) {
1281 if (TemplateName CanonTN = Context->getCanonicalTemplateName(TN);
1282 CanonTN != TN) {
1283 llvm::SmallString<128> CanonStr;
1284 {
1285 llvm::raw_svector_ostream SS(CanonStr);
1286 CanonTN.print(SS, PrintPolicy);
1287 }
1288 if (CanonStr != Str)
1289 OS << ":'" << CanonStr << "'";
1290 }
1291 }
1292 }
1294 });
1295}
1296
1298 switch (TN.getKind()) {
1300 AddChild([=] { Visit(TN.getAsTemplateDecl()); });
1301 return;
1303 const UsingShadowDecl *USD = TN.getAsUsingShadowDecl();
1304 AddChild([=] { Visit(USD); });
1305 AddChild("target", [=] { Visit(USD->getTargetDecl()); });
1306 return;
1307 }
1309 OS << " qualified";
1311 if (QTN->hasTemplateKeyword())
1312 OS << " keyword";
1315 return;
1316 }
1318 OS << " dependent";
1321 return;
1322 }
1324 OS << " subst";
1327 OS << " index " << STS->getIndex();
1328 if (UnsignedOrNone PackIndex = STS->getPackIndex())
1329 OS << " pack_index " << *PackIndex;
1330 if (STS->getFinal())
1331 OS << " final";
1332 if (const TemplateTemplateParmDecl *P = STS->getParameter())
1333 AddChild("parameter", [=] { Visit(P); });
1334 dumpDeclRef(STS->getAssociatedDecl(), "associated");
1335 dumpTemplateName(STS->getReplacement(), "replacement");
1336 return;
1337 }
1339 OS << " deduced";
1341 dumpTemplateName(DTS->getUnderlying(), "underlying");
1342 AddChild("defaults", [=] {
1343 auto [StartPos, Args] = DTS->getDefaultArguments();
1344 OS << " start " << StartPos;
1345 for (const TemplateArgument &Arg : Args)
1346 AddChild([=] { Visit(Arg, SourceRange()); });
1347 });
1348 return;
1349 }
1350 // FIXME: Implement these.
1352 OS << " overloaded";
1353 return;
1355 OS << " assumed";
1356 return;
1358 OS << " subst_pack";
1359 return;
1360 }
1361 llvm_unreachable("Unexpected TemplateName Kind");
1362}
1363
1365 OS << " template";
1368}
1369
1371 const TemplateArgument &TA) {
1372 OS << " template expansion";
1375}
1376
1378 const TemplateArgument &TA) {
1379 OS << " expr";
1380 if (TA.isCanonicalExpr())
1381 OS << " canonical";
1383}
1384
1386 OS << " pack";
1388}
1389
1390static void dumpBasePath(raw_ostream &OS, const CastExpr *Node) {
1391 if (Node->path_empty())
1392 return;
1393
1394 OS << " (";
1395 bool First = true;
1396 for (CastExpr::path_const_iterator I = Node->path_begin(),
1397 E = Node->path_end();
1398 I != E; ++I) {
1399 const CXXBaseSpecifier *Base = *I;
1400 if (!First)
1401 OS << " -> ";
1402
1403 const auto *RD = cast<CXXRecordDecl>(
1404 Base->getType()->castAsCanonical<RecordType>()->getOriginalDecl());
1405
1406 if (Base->isVirtual())
1407 OS << "virtual ";
1408 OS << RD->getName();
1409 First = false;
1410 }
1411
1412 OS << ')';
1413}
1414
1416 if (!Node->hasLabelTarget())
1417 return;
1418
1419 OS << " '" << Node->getLabelDecl()->getIdentifier()->getName() << "' (";
1420
1421 auto *Target = Node->getNamedLoopOrSwitch();
1422 if (!Target) {
1423 ColorScope Color(OS, ShowColors, NullColor);
1424 OS << "<<<NULL>>>";
1425 } else {
1426 {
1427 ColorScope Color(OS, ShowColors, StmtColor);
1428 OS << Target->getStmtClassName();
1429 }
1431 }
1432 OS << ")";
1433}
1434
1436 if (Node->hasInitStorage())
1437 OS << " has_init";
1438 if (Node->hasVarStorage())
1439 OS << " has_var";
1440 if (Node->hasElseStorage())
1441 OS << " has_else";
1442 if (Node->isConstexpr())
1443 OS << " constexpr";
1444 if (Node->isConsteval()) {
1445 OS << " ";
1446 if (Node->isNegatedConsteval())
1447 OS << "!";
1448 OS << "consteval";
1449 }
1450}
1451
1453 if (Node->hasInitStorage())
1454 OS << " has_init";
1455 if (Node->hasVarStorage())
1456 OS << " has_var";
1457}
1458
1460 if (Node->hasVarStorage())
1461 OS << " has_var";
1462}
1463
1465 OS << " '" << Node->getName() << "'";
1466 if (Node->isSideEntry())
1467 OS << " side_entry";
1468}
1469
1471 OS << " '" << Node->getLabel()->getName() << "'";
1472 dumpPointer(Node->getLabel());
1473}
1474
1476 if (Node->caseStmtIsGNURange())
1477 OS << " gnu_range";
1478}
1479
1481 if (const VarDecl *Cand = Node->getNRVOCandidate()) {
1482 OS << " nrvo_candidate(";
1483 dumpBareDeclRef(Cand);
1484 OS << ")";
1485 }
1486}
1487
1489 if (Node->isImplicit())
1490 OS << " implicit";
1491}
1492
1494 if (Node->isImplicit())
1495 OS << " implicit";
1496}
1497
1499 if (Node->hasAPValueResult())
1500 AddChild("value",
1501 [=] { Visit(Node->getAPValueResult(), Node->getType()); });
1502}
1503
1505 if (Node->usesADL())
1506 OS << " adl";
1507 if (Node->hasStoredFPFeatures())
1508 printFPOptions(Node->getFPFeatures());
1509}
1510
1512 const char *OperatorSpelling = clang::getOperatorSpelling(Node->getOperator());
1513 if (OperatorSpelling)
1514 OS << " '" << OperatorSpelling << "'";
1515
1517}
1518
1520 OS << " <";
1521 {
1522 ColorScope Color(OS, ShowColors, CastColor);
1523 OS << Node->getCastKindName();
1524 }
1525 dumpBasePath(OS, Node);
1526 OS << ">";
1527 if (Node->hasStoredFPFeatures())
1528 printFPOptions(Node->getFPFeatures());
1529}
1530
1533 if (Node->isPartOfExplicitCast())
1534 OS << " part_of_explicit_cast";
1535}
1536
1538 OS << " ";
1539 dumpBareDeclRef(Node->getDecl());
1540 dumpNestedNameSpecifier(Node->getQualifier());
1541 if (Node->getDecl() != Node->getFoundDecl()) {
1542 OS << " (";
1543 dumpBareDeclRef(Node->getFoundDecl());
1544 OS << ")";
1545 }
1546 switch (Node->isNonOdrUse()) {
1547 case NOUR_None: break;
1548 case NOUR_Unevaluated: OS << " non_odr_use_unevaluated"; break;
1549 case NOUR_Constant: OS << " non_odr_use_constant"; break;
1550 case NOUR_Discarded: OS << " non_odr_use_discarded"; break;
1551 }
1552 if (Node->isCapturedByCopyInLambdaWithExplicitObjectParameter())
1553 OS << " dependent_capture";
1554 else if (Node->refersToEnclosingVariableOrCapture())
1555 OS << " refers_to_enclosing_variable_or_capture";
1556
1557 if (Node->isImmediateEscalating())
1558 OS << " immediate-escalating";
1559}
1560
1563
1564 dumpNestedNameSpecifier(Node->getQualifier());
1565}
1566
1568 const UnresolvedLookupExpr *Node) {
1569 OS << " (";
1570 if (!Node->requiresADL())
1571 OS << "no ";
1572 OS << "ADL) = '" << Node->getName() << '\'';
1573
1574 UnresolvedLookupExpr::decls_iterator I = Node->decls_begin(),
1575 E = Node->decls_end();
1576 if (I == E)
1577 OS << " empty";
1578 for (; I != E; ++I)
1579 dumpPointer(*I);
1580}
1581
1583 {
1584 ColorScope Color(OS, ShowColors, DeclKindNameColor);
1585 OS << " " << Node->getDecl()->getDeclKindName() << "Decl";
1586 }
1587 OS << "='" << *Node->getDecl() << "'";
1588 dumpPointer(Node->getDecl());
1589 if (Node->isFreeIvar())
1590 OS << " isFreeIvar";
1591}
1592
1595 dumpType(Node->getTypeSourceInfo()->getType());
1596}
1597
1599 OS << " " << PredefinedExpr::getIdentKindName(Node->getIdentKind());
1600}
1601
1603 ColorScope Color(OS, ShowColors, ValueColor);
1604 OS << " " << Node->getValue();
1605}
1606
1608 bool isSigned = Node->getType()->isSignedIntegerType();
1609 ColorScope Color(OS, ShowColors, ValueColor);
1610 OS << " " << toString(Node->getValue(), 10, isSigned);
1611}
1612
1614 ColorScope Color(OS, ShowColors, ValueColor);
1615 OS << " " << Node->getValueAsString(/*Radix=*/10);
1616}
1617
1619 ColorScope Color(OS, ShowColors, ValueColor);
1620 OS << " " << Node->getValueAsApproximateDouble();
1621}
1622
1624 ColorScope Color(OS, ShowColors, ValueColor);
1625 OS << " ";
1626 Str->outputString(OS);
1627}
1628
1630 if (auto *Field = ILE->getInitializedFieldInUnion()) {
1631 OS << " field ";
1632 dumpBareDeclRef(Field);
1633 }
1634}
1635
1637 if (E->isResultDependent())
1638 OS << " result_dependent";
1639}
1640
1642 OS << " " << (Node->isPostfix() ? "postfix" : "prefix") << " '"
1643 << UnaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
1644 if (!Node->canOverflow())
1645 OS << " cannot overflow";
1646 if (Node->hasStoredFPFeatures())
1647 printFPOptions(Node->getStoredFPFeatures());
1648}
1649
1652 OS << " " << getTraitSpelling(Node->getKind());
1653
1654 if (Node->isArgumentType())
1655 dumpType(Node->getArgumentType());
1656}
1657
1659 OS << " " << (Node->isArrow() ? "->" : ".") << *Node->getMemberDecl();
1660 dumpPointer(Node->getMemberDecl());
1661 dumpNestedNameSpecifier(Node->getQualifier());
1662 switch (Node->isNonOdrUse()) {
1663 case NOUR_None: break;
1664 case NOUR_Unevaluated: OS << " non_odr_use_unevaluated"; break;
1665 case NOUR_Constant: OS << " non_odr_use_constant"; break;
1666 case NOUR_Discarded: OS << " non_odr_use_discarded"; break;
1667 }
1668}
1669
1671 const ExtVectorElementExpr *Node) {
1672 OS << " " << Node->getAccessor().getNameStart();
1673}
1674
1676 OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
1677 if (Node->hasStoredFPFeatures())
1678 printFPOptions(Node->getStoredFPFeatures());
1679}
1680
1683 OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode())
1684 << "' ComputeLHSTy=";
1685 dumpBareType(Node->getComputationLHSType());
1686 OS << " ComputeResultTy=";
1687 dumpBareType(Node->getComputationResultType());
1688 if (Node->hasStoredFPFeatures())
1689 printFPOptions(Node->getStoredFPFeatures());
1690}
1691
1693 OS << " " << Node->getLabel()->getName();
1694 dumpPointer(Node->getLabel());
1695}
1696
1698 OS << " " << Node->getCastName() << "<"
1699 << Node->getTypeAsWritten().getAsString() << ">"
1700 << " <" << Node->getCastKindName();
1701 dumpBasePath(OS, Node);
1702 OS << ">";
1703}
1704
1706 OS << " " << (Node->getValue() ? "true" : "false");
1707}
1708
1710 if (Node->isImplicit())
1711 OS << " implicit";
1712 if (Node->isCapturedByCopyInLambdaWithExplicitObjectParameter())
1713 OS << " dependent_capture";
1714 OS << " this";
1715}
1716
1718 const CXXFunctionalCastExpr *Node) {
1719 OS << " functional cast to " << Node->getTypeAsWritten().getAsString() << " <"
1720 << Node->getCastKindName() << ">";
1721 if (Node->hasStoredFPFeatures())
1722 printFPOptions(Node->getFPFeatures());
1723}
1724
1727 if (Node->hasStoredFPFeatures())
1728 printFPOptions(Node->getFPFeatures());
1729}
1730
1733 dumpType(Node->getTypeAsWritten());
1734 if (Node->isListInitialization())
1735 OS << " list";
1736}
1737
1739 CXXConstructorDecl *Ctor = Node->getConstructor();
1740 dumpType(Ctor->getType());
1741 if (Node->isElidable())
1742 OS << " elidable";
1743 if (Node->isListInitialization())
1744 OS << " list";
1745 if (Node->isStdInitListInitialization())
1746 OS << " std::initializer_list";
1747 if (Node->requiresZeroInitialization())
1748 OS << " zeroing";
1749 if (Node->isImmediateEscalating())
1750 OS << " immediate-escalating";
1751}
1752
1754 const CXXBindTemporaryExpr *Node) {
1755 OS << " (CXXTemporary";
1757 OS << ")";
1758}
1759
1761 if (Node->isGlobalNew())
1762 OS << " global";
1763 if (Node->isArray())
1764 OS << " array";
1765 if (Node->getOperatorNew()) {
1766 OS << ' ';
1767 dumpBareDeclRef(Node->getOperatorNew());
1768 }
1769 // We could dump the deallocation function used in case of error, but it's
1770 // usually not that interesting.
1771}
1772
1774 if (Node->isGlobalDelete())
1775 OS << " global";
1776 if (Node->isArrayForm())
1777 OS << " array";
1778 if (Node->getOperatorDelete()) {
1779 OS << ' ';
1780 dumpBareDeclRef(Node->getOperatorDelete());
1781 }
1782}
1783
1785 OS << " " << getTraitSpelling(Node->getTrait());
1786}
1787
1789 OS << " " << getTraitSpelling(Node->getTrait());
1790}
1791
1793 OS << " " << getTraitSpelling(Node->getTrait());
1794}
1795
1797 if (Node->hasRewrittenInit())
1798 OS << " has rewritten init";
1799}
1800
1802 if (Node->hasRewrittenInit())
1803 OS << " has rewritten init";
1804}
1805
1808 if (const ValueDecl *VD = Node->getExtendingDecl()) {
1809 OS << " extended by ";
1810 dumpBareDeclRef(VD);
1811 }
1812}
1813
1815 for (unsigned i = 0, e = Node->getNumObjects(); i != e; ++i)
1816 dumpCleanupObject(Node->getObject(i));
1817}
1818
1820 dumpPointer(Node->getPack());
1821 dumpName(Node->getPack());
1822}
1823
1826 OS << " " << (Node->isArrow() ? "->" : ".") << Node->getMember();
1827}
1828
1830 OS << " selector=";
1831 Node->getSelector().print(OS);
1832 switch (Node->getReceiverKind()) {
1834 break;
1835
1837 OS << " class=";
1838 dumpBareType(Node->getClassReceiver());
1839 break;
1840
1842 OS << " super (instance)";
1843 break;
1844
1846 OS << " super (class)";
1847 break;
1848 }
1849}
1850
1852 if (auto *BoxingMethod = Node->getBoxingMethod()) {
1853 OS << " selector=";
1854 BoxingMethod->getSelector().print(OS);
1855 }
1856}
1857
1859 if (!Node->getCatchParamDecl())
1860 OS << " catch all";
1861}
1862
1864 dumpType(Node->getEncodedType());
1865}
1866
1868 OS << " ";
1869 Node->getSelector().print(OS);
1870}
1871
1873 OS << ' ' << *Node->getProtocol();
1874}
1875
1877 if (Node->isImplicitProperty()) {
1878 OS << " Kind=MethodRef Getter=\"";
1879 if (Node->getImplicitPropertyGetter())
1880 Node->getImplicitPropertyGetter()->getSelector().print(OS);
1881 else
1882 OS << "(null)";
1883
1884 OS << "\" Setter=\"";
1885 if (ObjCMethodDecl *Setter = Node->getImplicitPropertySetter())
1886 Setter->getSelector().print(OS);
1887 else
1888 OS << "(null)";
1889 OS << "\"";
1890 } else {
1891 OS << " Kind=PropertyRef Property=\"" << *Node->getExplicitProperty()
1892 << '"';
1893 }
1894
1895 if (Node->isSuperReceiver())
1896 OS << " super";
1897
1898 OS << " Messaging=";
1899 if (Node->isMessagingGetter() && Node->isMessagingSetter())
1900 OS << "Getter&Setter";
1901 else if (Node->isMessagingGetter())
1902 OS << "Getter";
1903 else if (Node->isMessagingSetter())
1904 OS << "Setter";
1905}
1906
1908 const ObjCSubscriptRefExpr *Node) {
1909 if (Node->isArraySubscriptRefExpr())
1910 OS << " Kind=ArraySubscript GetterForArray=\"";
1911 else
1912 OS << " Kind=DictionarySubscript GetterForDictionary=\"";
1913 if (Node->getAtIndexMethodDecl())
1914 Node->getAtIndexMethodDecl()->getSelector().print(OS);
1915 else
1916 OS << "(null)";
1917
1918 if (Node->isArraySubscriptRefExpr())
1919 OS << "\" SetterForArray=\"";
1920 else
1921 OS << "\" SetterForDictionary=\"";
1922 if (Node->setAtIndexMethodDecl())
1923 Node->setAtIndexMethodDecl()->getSelector().print(OS);
1924 else
1925 OS << "(null)";
1926}
1927
1929 OS << " " << (Node->getValue() ? "__objc_yes" : "__objc_no");
1930}
1931
1933 OS << " ";
1934 for (unsigned I = 0, E = Node->numOfIterators(); I < E; ++I) {
1935 Visit(Node->getIteratorDecl(I));
1936 OS << " = ";
1937 const OMPIteratorExpr::IteratorRange Range = Node->getIteratorRange(I);
1938 OS << " begin ";
1939 Visit(Range.Begin);
1940 OS << " end ";
1941 Visit(Range.End);
1942 if (Range.Step) {
1943 OS << " step ";
1944 Visit(Range.Step);
1945 }
1946 }
1947}
1948
1951 OS << " ";
1952 dumpBareDeclRef(Node->getFoundDecl());
1953}
1954
1956 const RequiresExpr *Node) {
1957 if (!Node->isValueDependent())
1958 OS << (Node->isSatisfied() ? " satisfied" : " unsatisfied");
1959}
1960
1962 if (T->isSpelledAsLValue())
1963 OS << " written as lvalue reference";
1964}
1965
1967 switch (T->getSizeModifier()) {
1969 break;
1971 OS << " static";
1972 break;
1974 OS << " *";
1975 break;
1976 }
1977 OS << " " << T->getIndexTypeQualifiers().getAsString();
1978}
1979
1981 OS << " " << T->getSize();
1983}
1984
1987}
1988
1990 const DependentSizedArrayType *T) {
1992}
1993
1996 OS << " ";
1997 dumpLocation(T->getAttributeLoc());
1998}
1999
2001 switch (T->getVectorKind()) {
2003 break;
2005 OS << " altivec";
2006 break;
2008 OS << " altivec pixel";
2009 break;
2011 OS << " altivec bool";
2012 break;
2013 case VectorKind::Neon:
2014 OS << " neon";
2015 break;
2017 OS << " neon poly";
2018 break;
2020 OS << " fixed-length sve data vector";
2021 break;
2023 OS << " fixed-length sve predicate vector";
2024 break;
2026 OS << " fixed-length rvv data vector";
2027 break;
2032 OS << " fixed-length rvv mask vector";
2033 break;
2034 }
2035 OS << " " << T->getNumElements();
2036}
2037
2039 auto EI = T->getExtInfo();
2040 if (EI.getNoReturn())
2041 OS << " noreturn";
2042 if (EI.getProducesResult())
2043 OS << " produces_result";
2044 if (EI.getHasRegParm())
2045 OS << " regparm " << EI.getRegParm();
2046 OS << " " << FunctionType::getNameForCallConv(EI.getCC());
2047}
2048
2050 auto EPI = T->getExtProtoInfo();
2051 if (EPI.HasTrailingReturn)
2052 OS << " trailing_return";
2053 if (T->isConst())
2054 OS << " const";
2055 if (T->isVolatile())
2056 OS << " volatile";
2057 if (T->isRestrict())
2058 OS << " restrict";
2059 if (T->getExtProtoInfo().Variadic)
2060 OS << " variadic";
2061 switch (EPI.RefQualifier) {
2062 case RQ_None:
2063 break;
2064 case RQ_LValue:
2065 OS << " &";
2066 break;
2067 case RQ_RValue:
2068 OS << " &&";
2069 break;
2070 }
2071
2072 switch (EPI.ExceptionSpec.Type) {
2073 case EST_None:
2074 break;
2075 case EST_DynamicNone:
2076 OS << " exceptionspec_dynamic_none";
2077 break;
2078 case EST_Dynamic:
2079 OS << " exceptionspec_dynamic";
2080 break;
2081 case EST_MSAny:
2082 OS << " exceptionspec_ms_any";
2083 break;
2084 case EST_NoThrow:
2085 OS << " exceptionspec_nothrow";
2086 break;
2087 case EST_BasicNoexcept:
2088 OS << " exceptionspec_basic_noexcept";
2089 break;
2091 OS << " exceptionspec_dependent_noexcept";
2092 break;
2093 case EST_NoexceptFalse:
2094 OS << " exceptionspec_noexcept_false";
2095 break;
2096 case EST_NoexceptTrue:
2097 OS << " exceptionspec_noexcept_true";
2098 break;
2099 case EST_Unevaluated:
2100 OS << " exceptionspec_unevaluated";
2101 break;
2102 case EST_Uninstantiated:
2103 OS << " exceptionspec_uninstantiated";
2104 break;
2105 case EST_Unparsed:
2106 OS << " exceptionspec_unparsed";
2107 break;
2108 }
2109 if (!EPI.ExceptionSpec.Exceptions.empty()) {
2110 AddChild([=] {
2111 OS << "Exceptions:";
2112 for (unsigned I = 0, N = EPI.ExceptionSpec.Exceptions.size(); I != N;
2113 ++I) {
2114 if (I)
2115 OS << ",";
2116 dumpType(EPI.ExceptionSpec.Exceptions[I]);
2117 }
2118 });
2119 }
2120 if (EPI.ExceptionSpec.NoexceptExpr) {
2121 AddChild([=] {
2122 OS << "NoexceptExpr: ";
2123 Visit(EPI.ExceptionSpec.NoexceptExpr);
2124 });
2125 }
2126 dumpDeclRef(EPI.ExceptionSpec.SourceDecl, "ExceptionSourceDecl");
2127 dumpDeclRef(EPI.ExceptionSpec.SourceTemplate, "ExceptionSourceTemplate");
2128
2129 // FIXME: Consumed parameters.
2131}
2132
2134 if (ElaboratedTypeKeyword K = T->getKeyword();
2136 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2137 dumpNestedNameSpecifier(T->getQualifier());
2138 dumpDeclRef(T->getDecl());
2139}
2140
2142 if (ElaboratedTypeKeyword K = T->getKeyword();
2144 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2145 dumpNestedNameSpecifier(T->getQualifier());
2146 dumpDeclRef(T->getDecl());
2147 dumpType(T->desugar());
2148}
2149
2151 if (ElaboratedTypeKeyword K = T->getKeyword();
2153 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2154 dumpNestedNameSpecifier(T->getQualifier());
2155 dumpDeclRef(T->getDecl());
2156 if (!T->typeMatchesDecl()) {
2157 OS << " divergent";
2158 dumpType(T->desugar());
2159 }
2160}
2161
2163 switch (T->getUTTKind()) {
2164#define TRANSFORM_TYPE_TRAIT_DEF(Enum, Trait) \
2165 case UnaryTransformType::Enum: \
2166 OS << " " #Trait; \
2167 break;
2168#include "clang/Basic/TransformTypeTraits.def"
2169 }
2170}
2171
2174 OS << " canonical";
2175 if (T->isTagOwned())
2176 OS << " owns_tag";
2177 if (T->isInjected())
2178 OS << " injected";
2179 if (ElaboratedTypeKeyword K = T->getKeyword();
2181 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2182 dumpNestedNameSpecifier(T->getQualifier());
2183 dumpDeclRef(T->getOriginalDecl());
2184}
2185
2187 OS << " depth " << T->getDepth() << " index " << T->getIndex();
2188 if (T->isParameterPack())
2189 OS << " pack";
2190 dumpDeclRef(T->getDecl());
2191}
2192
2195 dumpDeclRef(T->getAssociatedDecl());
2196 VisitTemplateTypeParmDecl(T->getReplacedParameter());
2197 if (auto PackIndex = T->getPackIndex())
2198 OS << " pack_index " << *PackIndex;
2199 if (T->getFinal())
2200 OS << " final";
2201}
2202
2205 dumpDeclRef(T->getAssociatedDecl());
2206 VisitTemplateTypeParmDecl(T->getReplacedParameter());
2207}
2208
2210 if (T->isDecltypeAuto())
2211 OS << " decltype(auto)";
2212 if (!T->isDeduced())
2213 OS << " undeduced";
2214 if (T->isConstrained())
2215 dumpDeclRef(T->getTypeConstraintConcept());
2216}
2217
2220 dumpTemplateName(T->getTemplateName(), "name");
2221}
2222
2225 if (T->isTypeAlias())
2226 OS << " alias";
2227 if (ElaboratedTypeKeyword K = T->getKeyword();
2229 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2230 dumpTemplateName(T->getTemplateName(), "name");
2231}
2232
2234 const InjectedClassNameType *T) {
2235 dumpDeclRef(T->getOriginalDecl());
2236}
2237
2239 dumpDeclRef(T->getDecl());
2240}
2241
2243 if (auto N = T->getNumExpansions())
2244 OS << " expansions " << *N;
2245}
2246
2248 // By default, add extra Type details with no extra loc info.
2250}
2251// FIXME: override behavior for TypeLocs that have interesting location
2252// information, such as the qualifier in ElaboratedTypeLoc.
2253
2255
2257 dumpName(D);
2258 dumpType(D->getUnderlyingType());
2259 if (D->isModulePrivate())
2260 OS << " __module_private__";
2261}
2262
2264 if (D->isScoped()) {
2265 if (D->isScopedUsingClassTag())
2266 OS << " class";
2267 else
2268 OS << " struct";
2269 }
2270 dumpName(D);
2271 if (D->isModulePrivate())
2272 OS << " __module_private__";
2273 if (D->isFixed())
2274 dumpType(D->getIntegerType());
2275
2276 if (const auto *Instance = D->getInstantiatedFromMemberEnum()) {
2277 OS << " instantiated_from";
2278 dumpPointer(Instance);
2279 }
2280}
2281
2283 OS << ' ' << D->getKindName();
2284 dumpName(D);
2285 if (D->isModulePrivate())
2286 OS << " __module_private__";
2287 if (D->isCompleteDefinition())
2288 OS << " definition";
2289}
2290
2292 dumpName(D);
2293 dumpType(D->getType());
2294}
2295
2297 dumpName(D);
2298 dumpType(D->getType());
2299
2300 for (const auto *Child : D->chain())
2301 dumpDeclRef(Child);
2302}
2303
2305 dumpName(D);
2306 dumpType(D->getType());
2307 dumpTemplateSpecializationKind(D->getTemplateSpecializationKind());
2308
2309 StorageClass SC = D->getStorageClass();
2310 if (SC != SC_None)
2312 if (D->isInlineSpecified())
2313 OS << " inline";
2314 if (D->isVirtualAsWritten())
2315 OS << " virtual";
2316 if (D->isModulePrivate())
2317 OS << " __module_private__";
2318
2319 if (D->isPureVirtual())
2320 OS << " pure";
2321 if (D->isDefaulted()) {
2322 OS << " default";
2323 if (D->isDeleted())
2324 OS << "_delete";
2325 }
2326 if (D->isDeletedAsWritten())
2327 OS << " delete";
2328 if (D->isTrivial())
2329 OS << " trivial";
2330
2331 if (const StringLiteral *M = D->getDeletedMessage())
2332 AddChild("delete message", [=] { Visit(M); });
2333
2334 if (D->isIneligibleOrNotSelected())
2335 OS << (isa<CXXDestructorDecl>(D) ? " not_selected" : " ineligible");
2336
2337 if (const auto *FPT = D->getType()->getAs<FunctionProtoType>()) {
2338 FunctionProtoType::ExtProtoInfo EPI = FPT->getExtProtoInfo();
2339 switch (EPI.ExceptionSpec.Type) {
2340 default:
2341 break;
2342 case EST_Unevaluated:
2343 OS << " noexcept-unevaluated " << EPI.ExceptionSpec.SourceDecl;
2344 break;
2345 case EST_Uninstantiated:
2346 OS << " noexcept-uninstantiated " << EPI.ExceptionSpec.SourceTemplate;
2347 break;
2348 }
2349 }
2350
2351 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
2352 if (MD->size_overridden_methods() != 0) {
2353 auto dumpOverride = [=](const CXXMethodDecl *D) {
2354 SplitQualType T_split = D->getType().split();
2355 OS << D << " " << D->getParent()->getName() << "::" << D->getDeclName()
2356 << " '" << QualType::getAsString(T_split, PrintPolicy) << "'";
2357 };
2358
2359 AddChild([=] {
2360 auto Overrides = MD->overridden_methods();
2361 OS << "Overrides: [ ";
2362 dumpOverride(*Overrides.begin());
2363 for (const auto *Override : llvm::drop_begin(Overrides)) {
2364 OS << ", ";
2365 dumpOverride(Override);
2366 }
2367 OS << " ]";
2368 });
2369 }
2370 }
2371
2372 if (!D->isInlineSpecified() && D->isInlined()) {
2373 OS << " implicit-inline";
2374 }
2375 // Since NumParams comes from the FunctionProtoType of the FunctionDecl and
2376 // the Params are set later, it is possible for a dump during debugging to
2377 // encounter a FunctionDecl that has been created but hasn't been assigned
2378 // ParmVarDecls yet.
2379 if (!D->param_empty() && !D->param_begin())
2380 OS << " <<<NULL params x " << D->getNumParams() << ">>>";
2381
2382 if (const auto *Instance = D->getInstantiatedFromMemberFunction()) {
2383 OS << " instantiated_from";
2384 dumpPointer(Instance);
2385 }
2386}
2387
2389 const CXXDeductionGuideDecl *D) {
2391 switch (D->getDeductionCandidateKind()) {
2394 return;
2396 OS << " aggregate ";
2397 break;
2398 }
2399}
2400
2403 OS << " extended by ";
2404 dumpBareDeclRef(D->getExtendingDecl());
2405 OS << " mangling ";
2406 {
2407 ColorScope Color(OS, ShowColors, ValueColor);
2408 OS << D->getManglingNumber();
2409 }
2410}
2411
2413 dumpName(D);
2414 dumpType(D->getType());
2415 if (D->isMutable())
2416 OS << " mutable";
2417 if (D->isModulePrivate())
2418 OS << " __module_private__";
2419}
2420
2422 dumpNestedNameSpecifier(D->getQualifier());
2423 dumpName(D);
2424 if (const auto *P = dyn_cast<ParmVarDecl>(D);
2425 P && P->isExplicitObjectParameter())
2426 OS << " this";
2427
2428 dumpType(D->getType());
2429 dumpTemplateSpecializationKind(D->getTemplateSpecializationKind());
2430 StorageClass SC = D->getStorageClass();
2431 if (SC != SC_None)
2433 switch (D->getTLSKind()) {
2434 case VarDecl::TLS_None:
2435 break;
2437 OS << " tls";
2438 break;
2440 OS << " tls_dynamic";
2441 break;
2442 }
2443 if (D->isModulePrivate())
2444 OS << " __module_private__";
2445 if (D->isNRVOVariable())
2446 OS << " nrvo";
2447 if (D->isInline())
2448 OS << " inline";
2449 if (D->isConstexpr())
2450 OS << " constexpr";
2451 if (D->hasInit()) {
2452 switch (D->getInitStyle()) {
2453 case VarDecl::CInit:
2454 OS << " cinit";
2455 break;
2456 case VarDecl::CallInit:
2457 OS << " callinit";
2458 break;
2459 case VarDecl::ListInit:
2460 OS << " listinit";
2461 break;
2463 OS << " parenlistinit";
2464 }
2465 }
2466 if (D->needsDestruction(D->getASTContext()))
2467 OS << " destroyed";
2468 if (D->isParameterPack())
2469 OS << " pack";
2470
2471 if (D->hasInit()) {
2472 const Expr *E = D->getInit();
2473 // Only dump the value of constexpr VarDecls for now.
2474 if (E && !E->isValueDependent() && D->isConstexpr() &&
2475 !D->getType()->isDependentType()) {
2476 const APValue *Value = D->evaluateValue();
2477 if (Value)
2478 AddChild("value", [=] { Visit(*Value, E->getType()); });
2479 }
2480 }
2481}
2482
2484 dumpName(D);
2485 dumpType(D->getType());
2486}
2487
2489 if (D->isNothrow())
2490 OS << " nothrow";
2491}
2492
2494 OS << ' ' << D->getImportedModule()->getFullModuleName();
2495
2496 for (Decl *InitD :
2497 D->getASTContext().getModuleInitializers(D->getImportedModule()))
2498 dumpDeclRef(InitD, "initializer");
2499}
2500
2502 OS << ' ';
2503 switch (D->getCommentKind()) {
2504 case PCK_Unknown:
2505 llvm_unreachable("unexpected pragma comment kind");
2506 case PCK_Compiler:
2507 OS << "compiler";
2508 break;
2509 case PCK_ExeStr:
2510 OS << "exestr";
2511 break;
2512 case PCK_Lib:
2513 OS << "lib";
2514 break;
2515 case PCK_Linker:
2516 OS << "linker";
2517 break;
2518 case PCK_User:
2519 OS << "user";
2520 break;
2521 }
2522 StringRef Arg = D->getArg();
2523 if (!Arg.empty())
2524 OS << " \"" << Arg << "\"";
2525}
2526
2528 const PragmaDetectMismatchDecl *D) {
2529 OS << " \"" << D->getName() << "\" \"" << D->getValue() << "\"";
2530}
2531
2533 const OMPExecutableDirective *D) {
2534 if (D->isStandaloneDirective())
2535 OS << " openmp_standalone_directive";
2536}
2537
2539 const OMPDeclareReductionDecl *D) {
2540 dumpName(D);
2541 dumpType(D->getType());
2542 OS << " combiner";
2543 dumpPointer(D->getCombiner());
2544 if (const auto *Initializer = D->getInitializer()) {
2545 OS << " initializer";
2547 switch (D->getInitializerKind()) {
2549 OS << " omp_priv = ";
2550 break;
2552 OS << " omp_priv ()";
2553 break;
2555 break;
2556 }
2557 }
2558}
2559
2561 for (const auto *C : D->clauselists()) {
2562 AddChild([=] {
2563 if (!C) {
2564 ColorScope Color(OS, ShowColors, NullColor);
2565 OS << "<<<NULL>>> OMPClause";
2566 return;
2567 }
2568 {
2569 ColorScope Color(OS, ShowColors, AttrColor);
2570 StringRef ClauseName(
2571 llvm::omp::getOpenMPClauseName(C->getClauseKind()));
2572 OS << "OMP" << ClauseName.substr(/*Start=*/0, /*N=*/1).upper()
2573 << ClauseName.drop_front() << "Clause";
2574 }
2575 dumpPointer(C);
2576 dumpSourceRange(SourceRange(C->getBeginLoc(), C->getEndLoc()));
2577 });
2578 }
2579}
2580
2582 dumpName(D);
2583 dumpType(D->getType());
2584}
2585
2587 dumpName(D);
2588 if (D->isInline())
2589 OS << " inline";
2590 if (D->isNested())
2591 OS << " nested";
2592 if (!D->isFirstDecl())
2593 dumpDeclRef(D->getFirstDecl(), "original");
2594}
2595
2597 OS << ' ';
2598 dumpBareDeclRef(D->getNominatedNamespace());
2599}
2600
2602 dumpName(D);
2603 dumpDeclRef(D->getAliasedNamespace());
2604}
2605
2607 dumpName(D);
2608 dumpType(D->getUnderlyingType());
2609}
2610
2612 const TypeAliasTemplateDecl *D) {
2613 dumpName(D);
2614}
2615
2618 if (const auto *Instance = D->getInstantiatedFromMemberClass()) {
2619 OS << " instantiated_from";
2620 dumpPointer(Instance);
2621 }
2622 if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
2623 dumpTemplateSpecializationKind(CTSD->getSpecializationKind());
2624 if (CTSD->hasStrictPackMatch())
2625 OS << " strict-pack-match";
2626 }
2627
2628 dumpNestedNameSpecifier(D->getQualifier());
2629
2630 if (!D->isCompleteDefinition())
2631 return;
2632
2633 AddChild([=] {
2634 {
2635 ColorScope Color(OS, ShowColors, DeclKindNameColor);
2636 OS << "DefinitionData";
2637 }
2638#define FLAG(fn, name) \
2639 if (D->fn()) \
2640 OS << " " #name;
2641 FLAG(isParsingBaseSpecifiers, parsing_base_specifiers);
2642
2643 FLAG(isGenericLambda, generic);
2644 FLAG(isLambda, lambda);
2645
2646 FLAG(isAnonymousStructOrUnion, is_anonymous);
2647 FLAG(canPassInRegisters, pass_in_registers);
2648 FLAG(isEmpty, empty);
2649 FLAG(isAggregate, aggregate);
2650 FLAG(isStandardLayout, standard_layout);
2651 FLAG(isTriviallyCopyable, trivially_copyable);
2652 FLAG(isPOD, pod);
2653 FLAG(isTrivial, trivial);
2654 FLAG(isPolymorphic, polymorphic);
2655 FLAG(isAbstract, abstract);
2656 FLAG(isLiteral, literal);
2657
2658 FLAG(hasUserDeclaredConstructor, has_user_declared_ctor);
2659 FLAG(hasConstexprNonCopyMoveConstructor, has_constexpr_non_copy_move_ctor);
2660 FLAG(hasMutableFields, has_mutable_fields);
2661 FLAG(hasVariantMembers, has_variant_members);
2662 FLAG(allowConstDefaultInit, can_const_default_init);
2663
2664 AddChild([=] {
2665 {
2666 ColorScope Color(OS, ShowColors, DeclKindNameColor);
2667 OS << "DefaultConstructor";
2668 }
2669 FLAG(hasDefaultConstructor, exists);
2670 FLAG(hasTrivialDefaultConstructor, trivial);
2671 FLAG(hasNonTrivialDefaultConstructor, non_trivial);
2672 FLAG(hasUserProvidedDefaultConstructor, user_provided);
2673 FLAG(hasConstexprDefaultConstructor, constexpr);
2674 FLAG(needsImplicitDefaultConstructor, needs_implicit);
2675 FLAG(defaultedDefaultConstructorIsConstexpr, defaulted_is_constexpr);
2676 });
2677
2678 AddChild([=] {
2679 {
2680 ColorScope Color(OS, ShowColors, DeclKindNameColor);
2681 OS << "CopyConstructor";
2682 }
2683 FLAG(hasSimpleCopyConstructor, simple);
2684 FLAG(hasTrivialCopyConstructor, trivial);
2685 FLAG(hasNonTrivialCopyConstructor, non_trivial);
2686 FLAG(hasUserDeclaredCopyConstructor, user_declared);
2687 FLAG(hasCopyConstructorWithConstParam, has_const_param);
2688 FLAG(needsImplicitCopyConstructor, needs_implicit);
2689 FLAG(needsOverloadResolutionForCopyConstructor,
2690 needs_overload_resolution);
2691 if (!D->needsOverloadResolutionForCopyConstructor())
2692 FLAG(defaultedCopyConstructorIsDeleted, defaulted_is_deleted);
2693 FLAG(implicitCopyConstructorHasConstParam, implicit_has_const_param);
2694 });
2695
2696 AddChild([=] {
2697 {
2698 ColorScope Color(OS, ShowColors, DeclKindNameColor);
2699 OS << "MoveConstructor";
2700 }
2701 FLAG(hasMoveConstructor, exists);
2702 FLAG(hasSimpleMoveConstructor, simple);
2703 FLAG(hasTrivialMoveConstructor, trivial);
2704 FLAG(hasNonTrivialMoveConstructor, non_trivial);
2705 FLAG(hasUserDeclaredMoveConstructor, user_declared);
2706 FLAG(needsImplicitMoveConstructor, needs_implicit);
2707 FLAG(needsOverloadResolutionForMoveConstructor,
2708 needs_overload_resolution);
2709 if (!D->needsOverloadResolutionForMoveConstructor())
2710 FLAG(defaultedMoveConstructorIsDeleted, defaulted_is_deleted);
2711 });
2712
2713 AddChild([=] {
2714 {
2715 ColorScope Color(OS, ShowColors, DeclKindNameColor);
2716 OS << "CopyAssignment";
2717 }
2718 FLAG(hasSimpleCopyAssignment, simple);
2719 FLAG(hasTrivialCopyAssignment, trivial);
2720 FLAG(hasNonTrivialCopyAssignment, non_trivial);
2721 FLAG(hasCopyAssignmentWithConstParam, has_const_param);
2722 FLAG(hasUserDeclaredCopyAssignment, user_declared);
2723 FLAG(needsImplicitCopyAssignment, needs_implicit);
2724 FLAG(needsOverloadResolutionForCopyAssignment, needs_overload_resolution);
2725 FLAG(implicitCopyAssignmentHasConstParam, implicit_has_const_param);
2726 });
2727
2728 AddChild([=] {
2729 {
2730 ColorScope Color(OS, ShowColors, DeclKindNameColor);
2731 OS << "MoveAssignment";
2732 }
2733 FLAG(hasMoveAssignment, exists);
2734 FLAG(hasSimpleMoveAssignment, simple);
2735 FLAG(hasTrivialMoveAssignment, trivial);
2736 FLAG(hasNonTrivialMoveAssignment, non_trivial);
2737 FLAG(hasUserDeclaredMoveAssignment, user_declared);
2738 FLAG(needsImplicitMoveAssignment, needs_implicit);
2739 FLAG(needsOverloadResolutionForMoveAssignment, needs_overload_resolution);
2740 });
2741
2742 AddChild([=] {
2743 {
2744 ColorScope Color(OS, ShowColors, DeclKindNameColor);
2745 OS << "Destructor";
2746 }
2747 FLAG(hasSimpleDestructor, simple);
2748 FLAG(hasIrrelevantDestructor, irrelevant);
2749 FLAG(hasTrivialDestructor, trivial);
2750 FLAG(hasNonTrivialDestructor, non_trivial);
2751 FLAG(hasUserDeclaredDestructor, user_declared);
2752 FLAG(hasConstexprDestructor, constexpr);
2753 FLAG(needsImplicitDestructor, needs_implicit);
2754 FLAG(needsOverloadResolutionForDestructor, needs_overload_resolution);
2755 if (!D->needsOverloadResolutionForDestructor())
2756 FLAG(defaultedDestructorIsDeleted, defaulted_is_deleted);
2757 });
2758 });
2759
2760 for (const auto &I : D->bases()) {
2761 AddChild([=] {
2762 if (I.isVirtual())
2763 OS << "virtual ";
2764 dumpAccessSpecifier(I.getAccessSpecifier());
2765 dumpType(I.getType());
2766 if (I.isPackExpansion())
2767 OS << "...";
2768 });
2769 }
2770}
2771
2773 dumpName(D);
2774}
2775
2777 dumpName(D);
2778}
2779
2781 dumpName(D);
2782}
2783
2785 dumpName(D);
2786}
2787
2789 if (const auto *TC = D->getTypeConstraint()) {
2790 OS << " ";
2791 dumpBareDeclRef(TC->getNamedConcept());
2792 if (TC->getNamedConcept() != TC->getFoundDecl()) {
2793 OS << " (";
2794 dumpBareDeclRef(TC->getFoundDecl());
2795 OS << ")";
2796 }
2797 } else if (D->wasDeclaredWithTypename())
2798 OS << " typename";
2799 else
2800 OS << " class";
2801 OS << " depth " << D->getDepth() << " index " << D->getIndex();
2802 if (D->isParameterPack())
2803 OS << " ...";
2804 dumpName(D);
2805}
2806
2808 const NonTypeTemplateParmDecl *D) {
2809 dumpType(D->getType());
2810 OS << " depth " << D->getDepth() << " index " << D->getIndex();
2811 if (D->isParameterPack())
2812 OS << " ...";
2813 dumpName(D);
2814}
2815
2817 const TemplateTemplateParmDecl *D) {
2818 OS << " depth " << D->getDepth() << " index " << D->getIndex();
2819 if (D->isParameterPack())
2820 OS << " ...";
2821 dumpName(D);
2822}
2823
2825 OS << ' ';
2826 D->getQualifier().print(OS, D->getASTContext().getPrintingPolicy());
2827 OS << D->getDeclName();
2828 dumpNestedNameSpecifier(D->getQualifier());
2829}
2830
2832 OS << ' ';
2833 dumpBareDeclRef(D->getEnumDecl());
2834}
2835
2838 OS << ' ';
2839 D->getQualifier().print(OS, D->getASTContext().getPrintingPolicy());
2840 OS << D->getDeclName();
2841}
2842
2844 const UnresolvedUsingValueDecl *D) {
2845 OS << ' ';
2846 D->getQualifier().print(OS, D->getASTContext().getPrintingPolicy());
2847 OS << D->getDeclName();
2848 dumpType(D->getType());
2849}
2850
2852 OS << ' ';
2853 dumpBareDeclRef(D->getTargetDecl());
2854}
2855
2858 if (D->constructsVirtualBase())
2859 OS << " virtual";
2860
2861 AddChild([=] {
2862 OS << "target ";
2863 dumpBareDeclRef(D->getTargetDecl());
2864 });
2865
2866 AddChild([=] {
2867 OS << "nominated ";
2868 dumpBareDeclRef(D->getNominatedBaseClass());
2869 OS << ' ';
2870 dumpBareDeclRef(D->getNominatedBaseClassShadowDecl());
2871 });
2872
2873 AddChild([=] {
2874 OS << "constructed ";
2875 dumpBareDeclRef(D->getConstructedBaseClass());
2876 OS << ' ';
2877 dumpBareDeclRef(D->getConstructedBaseClassShadowDecl());
2878 });
2879}
2880
2882 switch (D->getLanguage()) {
2884 OS << " C";
2885 break;
2887 OS << " C++";
2888 break;
2889 }
2890}
2891
2893 OS << ' ';
2895}
2896
2898 if (TypeSourceInfo *T = D->getFriendType())
2899 dumpType(T->getType());
2900 if (D->isPackExpansion())
2901 OS << "...";
2902}
2903
2905 dumpName(D);
2906 dumpType(D->getType());
2907 if (D->getSynthesize())
2908 OS << " synthesize";
2909
2910 switch (D->getAccessControl()) {
2911 case ObjCIvarDecl::None:
2912 OS << " none";
2913 break;
2915 OS << " private";
2916 break;
2918 OS << " protected";
2919 break;
2921 OS << " public";
2922 break;
2924 OS << " package";
2925 break;
2926 }
2927}
2928
2930 if (D->isInstanceMethod())
2931 OS << " -";
2932 else
2933 OS << " +";
2934 dumpName(D);
2935 dumpType(D->getReturnType());
2936
2937 if (D->isVariadic())
2938 OS << " variadic";
2939}
2940
2942 dumpName(D);
2943 switch (D->getVariance()) {
2945 break;
2946
2948 OS << " covariant";
2949 break;
2950
2952 OS << " contravariant";
2953 break;
2954 }
2955
2956 if (D->hasExplicitBound())
2957 OS << " bounded";
2958 dumpType(D->getUnderlyingType());
2959}
2960
2962 dumpName(D);
2963 dumpDeclRef(D->getClassInterface());
2964 dumpDeclRef(D->getImplementation());
2965 for (const auto *P : D->protocols())
2966 dumpDeclRef(P);
2967}
2968
2970 dumpName(D);
2971 dumpDeclRef(D->getClassInterface());
2972 dumpDeclRef(D->getCategoryDecl());
2973}
2974
2976 dumpName(D);
2977
2978 for (const auto *Child : D->protocols())
2979 dumpDeclRef(Child);
2980}
2981
2983 dumpName(D);
2984 dumpDeclRef(D->getSuperClass(), "super");
2985
2986 dumpDeclRef(D->getImplementation());
2987 for (const auto *Child : D->protocols())
2988 dumpDeclRef(Child);
2989}
2990
2992 const ObjCImplementationDecl *D) {
2993 dumpName(D);
2994 dumpDeclRef(D->getSuperClass(), "super");
2995 dumpDeclRef(D->getClassInterface());
2996}
2997
2999 const ObjCCompatibleAliasDecl *D) {
3000 dumpName(D);
3001 dumpDeclRef(D->getClassInterface());
3002}
3003
3005 dumpName(D);
3006 dumpType(D->getType());
3007
3008 if (D->getPropertyImplementation() == ObjCPropertyDecl::Required)
3009 OS << " required";
3010 else if (D->getPropertyImplementation() == ObjCPropertyDecl::Optional)
3011 OS << " optional";
3012
3013 ObjCPropertyAttribute::Kind Attrs = D->getPropertyAttributes();
3016 OS << " readonly";
3018 OS << " assign";
3020 OS << " readwrite";
3022 OS << " retain";
3024 OS << " copy";
3026 OS << " nonatomic";
3028 OS << " atomic";
3030 OS << " weak";
3032 OS << " strong";
3034 OS << " unsafe_unretained";
3036 OS << " class";
3038 OS << " direct";
3040 dumpDeclRef(D->getGetterMethodDecl(), "getter");
3042 dumpDeclRef(D->getSetterMethodDecl(), "setter");
3043 }
3044}
3045
3047 dumpName(D->getPropertyDecl());
3048 if (D->getPropertyImplementation() == ObjCPropertyImplDecl::Synthesize)
3049 OS << " synthesize";
3050 else
3051 OS << " dynamic";
3052 dumpDeclRef(D->getPropertyDecl());
3053 dumpDeclRef(D->getPropertyIvarDecl());
3054}
3055
3057 if (D->isVariadic())
3058 OS << " variadic";
3059
3060 if (D->capturesCXXThis())
3061 OS << " captures_this";
3062}
3063
3065 dumpName(D);
3066}
3067
3069 VisitStmt(S);
3070 if (S->hasStoredFPFeatures())
3071 printFPOptions(S->getStoredFPFeatures());
3072}
3073
3075 if (D->isCBuffer())
3076 OS << " cbuffer";
3077 else
3078 OS << " tbuffer";
3079 dumpName(D);
3080}
3081
3083 const HLSLRootSignatureDecl *D) {
3084 dumpName(D);
3085 OS << " version: ";
3086 switch (D->getVersion()) {
3087 case llvm::dxbc::RootSignatureVersion::V1_0:
3088 OS << "1.0";
3089 break;
3090 case llvm::dxbc::RootSignatureVersion::V1_1:
3091 OS << "1.1";
3092 break;
3093 }
3094 OS << ", ";
3095 llvm::hlsl::rootsig::dumpRootElements(OS, D->getRootElements());
3096}
3097
3099 OS << (E->isInOut() ? " inout" : " out");
3100}
3101
3103 OS << " " << S->getDirectiveKind();
3104}
3106 if (S->isOrphanedLoopConstruct())
3107 OS << " <orphan>";
3108 else
3109 OS << " parent: " << S->getParentComputeConstructKind();
3110}
3111
3113 const OpenACCCombinedConstruct *S) {
3115}
3116
3119}
3120
3122 const OpenACCEnterDataConstruct *S) {
3124}
3125
3127 const OpenACCExitDataConstruct *S) {
3129}
3130
3132 const OpenACCHostDataConstruct *S) {
3134}
3135
3138}
3140 const OpenACCCacheConstruct *S) {
3142 if (S->hasReadOnly())
3143 OS <<" readonly";
3144}
3147}
3149 const OpenACCShutdownConstruct *S) {
3151}
3154}
3156 const OpenACCUpdateConstruct *S) {
3158}
3159
3161 const OpenACCAtomicConstruct *S) {
3163 OS << ' ' << S->getAtomicKind();
3164}
3165
3167 OS << " " << D->getDirectiveKind();
3168
3169 for (const OpenACCClause *C : D->clauses())
3170 AddChild([=] {
3171 Visit(C);
3172 for (const Stmt *S : C->children())
3173 AddChild([=] { Visit(S); });
3174 });
3175}
3177 OS << " " << D->getDirectiveKind();
3178
3179 dumpSourceRange(SourceRange{D->getLParenLoc(), D->getRParenLoc()});
3180
3181 AddChild([=] { Visit(D->getFunctionReference()); });
3182
3183 for (const OpenACCClause *C : D->clauses())
3184 AddChild([=] {
3185 Visit(C);
3186 for (const Stmt *S : C->children())
3187 AddChild([=] { Visit(S); });
3188 });
3189}
3190
3192 const OpenACCRoutineDeclAttr *A) {
3193 for (const OpenACCClause *C : A->Clauses)
3194 AddChild([=] {
3195 Visit(C);
3196 for (const Stmt *S : C->children())
3197 AddChild([=] { Visit(S); });
3198 });
3199}
3200
3202 AddChild("begin", [=] { OS << S->getStartingElementPos(); });
3203 AddChild("number of elements", [=] { OS << S->getDataElementCount(); });
3204}
3205
3207 OS << ' ' << AE->getOpAsString();
3208}
3209
3211 VisitStmt(S);
3212 if (S->hasStoredFPFeatures())
3213 printFPOptions(S->getStoredFPFeatures());
3214}
static double GetApproxValue(const llvm::APFloat &F)
Definition: APValue.cpp:632
#define V(N, I)
Definition: ASTContext.h:3597
DynTypedNode Node
static bool isTrivial(ASTContext &Ctx, const Expr *E)
Checks if the expression is constant or does not have non-trivial function calls.
const Decl * D
IndirectLocalPath & Path
Expr * E
This file defines OpenMP nodes for declarative directives.
Defines the C++ template declaration subclasses.
#define X(type, name)
Definition: Value.h:145
bool ShowColors
Definition: Logger.cpp:29
llvm::MachO::Target Target
Definition: MachO.h:51
Defines the clang::Module class, which describes a module in the source code.
#define SM(sm)
Definition: OffloadArch.cpp:16
OffloadArch Arch
Definition: OffloadArch.cpp:10
static std::string toString(const clang::SanitizerSet &Sanitizers)
Produce a string containing comma-separated names of sanitizers in Sanitizers set.
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....
SourceRange Range
Definition: SemaObjC.cpp:753
SourceLocation Loc
Definition: SemaObjC.cpp:754
Defines the SourceManager interface.
Defines various enumerations that describe declaration and type specifiers.
static bool isSimpleAPValue(const APValue &Value)
True if the APValue Value can be folded onto the current line.
#define FLAG(fn, name)
static void dumpBasePath(raw_ostream &OS, const CastExpr *Node)
static void dumpPreviousDeclImpl(raw_ostream &OS,...)
static void dumpPreviousDecl(raw_ostream &OS, const Decl *D)
Dump the previous declaration in the redeclaration chain for a declaration, if any.
Defines enumerations for the type traits support.
C Language Family Type Representation.
std::string Label
QualType getDynamicAllocType() const
Definition: APValue.cpp:122
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Definition: APValue.h:122
@ Indeterminate
This object has an indeterminate value (C++ [basic.indet]).
Definition: APValue.h:131
@ None
There is no such object (it's outside its lifetime).
Definition: APValue.h:129
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:188
TemplateArgument getCanonicalTemplateArgument(const TemplateArgument &Arg) const
Retrieve the "canonical" template argument.
ArrayRef< Decl * > getModuleInitializers(Module *M)
Get the initializations to perform when importing a module, if any.
TemplateName getCanonicalTemplateName(TemplateName Name, bool IgnoreDeduced=false) const
Retrieves the "canonical" template name that refers to a given template.
const clang::PrintingPolicy & getPrintingPolicy() const
Definition: ASTContext.h:793
ArrayRef< Module * > getModulesWithMergedDefinition(const NamedDecl *Def)
Get the additional modules in which the definition Def has been merged.
Represents an access specifier followed by colon ':'.
Definition: DeclCXX.h:86
AddrLabelExpr - The GNU address of label extension, representing &&label.
Definition: Expr.h:4486
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
Definition: ExprCXX.h:2990
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Definition: TypeBase.h:3738
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Definition: Expr.h:6816
StringRef getOpAsString() const
Definition: Expr.h:6880
Attr - This represents one attribute.
Definition: Attr.h:44
attr::Kind getKind() const
Definition: Attr.h:90
bool isInherited() const
Definition: Attr.h:99
bool isImplicit() const
Returns true if the attribute has been implicitly created instead of explicitly written by the user.
Definition: Attr.h:103
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
Definition: TypeBase.h:7180
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3974
StringRef getOpcodeStr() const
Definition: Expr.h:4040
A binding in a decomposition declaration.
Definition: DeclCXX.h:4179
A class which contains all the information about a particular captured value.
Definition: Decl.h:4640
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4634
Represents the builtin template declaration which is used to implement __make_integer_seq and other b...
Represents a base class of a C++ class.
Definition: DeclCXX.h:146
Represents binding an expression to a temporary.
Definition: ExprCXX.h:1494
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition: ExprCXX.h:723
Represents a call to a C++ constructor.
Definition: ExprCXX.h:1549
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2604
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2369
Represents a C++ deduction guide declaration.
Definition: DeclCXX.h:1979
A default argument (C++ [dcl.fct.default]).
Definition: ExprCXX.h:1271
A use of a default initializer in a constructor or in aggregate initialization.
Definition: ExprCXX.h:1378
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition: ExprCXX.h:2620
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition: ExprCXX.h:3864
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
Definition: ExprCXX.h:1833
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:2129
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition: ExprCXX.h:375
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition: ExprCXX.h:2349
A call to an overloaded operator written using operator syntax.
Definition: ExprCXX.h:84
Represents a C++ struct/union/class.
Definition: DeclCXX.h:258
A C++ static_cast expression (C++ [expr.static.cast]).
Definition: ExprCXX.h:436
Represents the this expression in C++.
Definition: ExprCXX.h:1155
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition: ExprCXX.h:3738
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2879
Represents the body of a CapturedStmt, and serves as its DeclContext.
Definition: Decl.h:4906
CaseStmt - Represent a case statement.
Definition: Stmt.h:1920
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3612
const CXXBaseSpecifier *const * path_const_iterator
Definition: Expr.h:3679
Declaration of a class template.
Represents a 'co_await' expression.
Definition: ExprCXX.h:5363
CompoundAssignOperator - For compound assignments (e.g.
Definition: Expr.h:4236
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition: Stmt.h:1720
Declaration of a C++20 concept.
A reference to a concept and its template args, as it appears in the code.
Definition: ASTConcept.h:126
SourceRange getSourceRange() const LLVM_READONLY
Definition: ASTConcept.h:189
TemplateDecl * getNamedConcept() const
Definition: ASTConcept.h:197
Represents the specialization of a concept - evaluates to a prvalue of type bool.
Definition: ExprConcepts.h:42
Represents the canonical version of C arrays with a specified constant size.
Definition: TypeBase.h:3776
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition: Expr.h:1084
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Definition: DeclCXX.h:3671
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition: Expr.h:4655
Represents a 'co_return' statement in the C++ Coroutines TS.
Definition: StmtCXX.h:473
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1272
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
Decl * getPreviousDecl()
Retrieve the previous declaration that declares the same entity as this declaration,...
Definition: DeclBase.h:1061
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
Definition: DeclBase.h:648
FriendObjectKind getFriendObjectKind() const
Determines whether this declaration is the object of a friend declaration and, if so,...
Definition: DeclBase.h:1226
ASTContext & getASTContext() const LLVM_READONLY
Definition: DeclBase.cpp:524
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
Definition: DeclBase.h:593
bool isParameterPack() const
Whether this declaration is a parameter pack.
Definition: DeclBase.cpp:244
@ FOK_Undeclared
A friend of a previously-undeclared entity.
Definition: DeclBase.h:1219
@ FOK_None
Not a friend object.
Definition: DeclBase.h:1217
@ FOK_Declared
A friend of a previously-declared entity.
Definition: DeclBase.h:1218
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
Definition: DeclBase.h:842
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
Definition: DeclBase.h:1070
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
Definition: DeclBase.h:793
bool isInvalidDecl() const
Definition: DeclBase.h:588
SourceLocation getLocation() const
Definition: DeclBase.h:439
const char * getDeclKindName() const
Definition: DeclBase.cpp:147
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
Definition: DeclBase.h:621
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required.
Definition: DeclBase.cpp:553
DeclContext * getDeclContext()
Definition: DeclBase.h:448
AccessSpecifier getAccess() const
Definition: DeclBase.h:507
void print(raw_ostream &Out, unsigned Indentation=0, bool PrintInstantiation=false) const
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
Definition: DeclBase.h:918
Kind getKind() const
Definition: DeclBase.h:442
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
Definition: DeclBase.h:427
The name of a declaration.
Represents a C++17 deduced template specialization type.
Definition: TypeBase.h:7228
TemplateName getUnderlying() const
Definition: TemplateName.h:471
DefaultArguments getDefaultArguments() const
Definition: TemplateName.h:473
A qualified reference to a name whose declaration cannot yet be resolved.
Definition: ExprCXX.h:3504
Represents an array type in C++ whose size is a value-dependent expression.
Definition: TypeBase.h:4027
Represents an extended vector type where either the type or size is dependent.
Definition: TypeBase.h:4117
NestedNameSpecifier getQualifier() const
Return the nested name specifier that qualifies this name.
Definition: TemplateName.h:607
SourceRange getSourceRange(bool IncludeQualifier=false) const
For nodes which represent textual entities in the source code, return their SourceRange.
void print(llvm::raw_ostream &OS, const PrintingPolicy &PP) const
Prints the node to the given output stream.
Symbolic representation of a dynamic allocation.
Definition: APValue.h:65
Represents a reference to #emded data.
Definition: Expr.h:5062
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:3420
Represents an enum.
Definition: Decl.h:4004
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
Definition: ExprCXX.h:3655
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
Definition: ExprCXX.h:3661
This represents one expression.
Definition: Expr.h:112
bool isValueDependent() const
Determines whether the value of this expression depends on.
Definition: Expr.h:177
ExprValueKind getValueKind() const
getValueKind - The value kind that this expression produces.
Definition: Expr.h:444
bool containsErrors() const
Whether this expression contains subexpressions which had errors.
Definition: Expr.h:246
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
Definition: Expr.h:451
QualType getType() const
Definition: Expr.h:144
An expression trait intrinsic.
Definition: ExprCXX.h:3063
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition: Expr.h:6500
Represents difference between two FPOptions values.
Definition: LangOptions.h:919
Represents a member of a struct/union/class.
Definition: Decl.h:3157
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Definition: DeclFriend.h:54
Represents a function declaration or definition.
Definition: Decl.h:1999
Represents a prototype with parameter type info, e.g.
Definition: TypeBase.h:5282
QualType desugar() const
Definition: TypeBase.h:5863
ExtProtoInfo getExtProtoInfo() const
Definition: TypeBase.h:5571
Declaration of a template function.
Definition: DeclTemplate.h:952
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: TypeBase.h:4478
ExtInfo getExtInfo() const
Definition: TypeBase.h:4834
static StringRef getNameForCallConv(CallingConv CC)
Definition: Type.cpp:3613
bool isConst() const
Definition: TypeBase.h:4840
bool isRestrict() const
Definition: TypeBase.h:4842
bool isVolatile() const
Definition: TypeBase.h:4841
Represents a C11 generic selection.
Definition: Expr.h:6114
AssociationTy< true > ConstAssociation
Definition: Expr.h:6346
GotoStmt - This represents a direct goto.
Definition: Stmt.h:2969
HLSLBufferDecl - Represent a cbuffer or tbuffer declaration.
Definition: Decl.h:5156
This class represents temporary values used to represent inout and out arguments in HLSL.
Definition: Expr.h:7258
A simple pair of identifier info and location.
IfStmt - This represents an if/then/else.
Definition: Stmt.h:2259
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition: Expr.h:3789
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Definition: Decl.h:5015
Represents a field injected from an anonymous union/struct into the parent scope.
Definition: Decl.h:3464
Describes an C or C++ initializer list.
Definition: Expr.h:5235
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Definition: Expr.h:5361
The injected class name of a C++ class template or class template partial specialization.
Definition: TypeBase.h:6553
Represents the declaration of a label.
Definition: Decl.h:523
LabelStmt - Represents a label, which has a substatement.
Definition: Stmt.h:2146
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
Definition: DeclCXX.h:3302
Represents a linkage specification.
Definition: DeclCXX.h:3009
Base class for BreakStmt and ContinueStmt.
Definition: Stmt.h:3057
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition: ExprCXX.h:4914
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:3300
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
Definition: Redeclarable.h:311
Describes a module or submodule.
Definition: Module.h:144
This represents a decl that may have a name.
Definition: Decl.h:273
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:339
Represents a C++ namespace alias.
Definition: DeclCXX.h:3195
Represent a C++ namespace.
Definition: Decl.h:591
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
@ MicrosoftSuper
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in.
@ Global
The global specifier '::'. There is no stored value.
@ Type
A type, stored as a Type*.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Pseudo declaration for capturing expressions.
Definition: DeclOpenMP.h:383
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:55
This represents '#pragma omp declare reduction ...' directive.
Definition: DeclOpenMP.h:177
This is a basic class for representing single OpenMP executable directive.
Definition: StmtOpenMP.h:266
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
Definition: ExprOpenMP.h:151
This represents '#pragma omp requires...' directive.
Definition: DeclOpenMP.h:417
Represents Objective-C's @catch statement.
Definition: StmtObjC.h:77
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition: ExprObjC.h:88
ObjCBoxedExpr - used for generalized expression boxing.
Definition: ExprObjC.h:128
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2329
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
Definition: DeclObjC.h:2545
ObjCCompatibleAliasDecl - Represents alias of a class.
Definition: DeclObjC.h:2775
ObjCEncodeExpr, used for @encode in Objective-C.
Definition: ExprObjC.h:409
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition: DeclObjC.h:2597
Represents an ObjC class declaration.
Definition: DeclObjC.h:1154
Interfaces are the core concept in Objective-C for object oriented design.
Definition: TypeBase.h:7905
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1952
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition: ExprObjC.h:548
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:940
@ SuperInstance
The receiver is the instance of the superclass object.
Definition: ExprObjC.h:954
@ Instance
The receiver is an object instance.
Definition: ExprObjC.h:948
@ SuperClass
The receiver is a superclass.
Definition: ExprObjC.h:951
@ Class
The receiver is a class.
Definition: ExprObjC.h:945
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:140
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:731
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Definition: DeclObjC.h:2805
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition: ExprObjC.h:616
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2084
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition: ExprObjC.h:504
ObjCSelectorExpr used for @selector in Objective-C.
Definition: ExprObjC.h:454
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition: ExprObjC.h:839
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:578
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
Definition: Expr.h:2092
This is the base type for all OpenACC Clauses.
Definition: OpenACCClause.h:27
This is the base class for an OpenACC statement-level construct, other construct types are expected t...
Definition: StmtOpenACC.h:26
This class represents a 'loop' construct.
Definition: StmtOpenACC.h:190
Represents a pack expansion of types.
Definition: TypeBase.h:7524
Represents a #pragma comment line.
Definition: Decl.h:166
Represents a #pragma detect_mismatch line.
Definition: Decl.h:200
[C99 6.4.2.2] - A predefined identifier such as func.
Definition: Expr.h:2007
StringRef getIdentKindName() const
Definition: Expr.h:2064
Represents an unpacked "presumed" location which can be presented to the user.
unsigned getColumn() const
Return the presumed column number of this location.
const char * getFilename() const
Return the presumed filename of this location.
unsigned getLine() const
Return the presumed line number of this location.
bool isInvalid() const
Return true if this object is invalid or uninitialized.
A (possibly-)qualified type.
Definition: TypeBase.h:937
std::string getAsString() const
Represents a template name as written in source code.
Definition: TemplateName.h:504
NestedNameSpecifier getQualifier() const
Return the nested name specifier that qualifies this name.
Definition: TemplateName.h:532
TemplateName getUnderlyingTemplate() const
Return the underlying template name.
Definition: TemplateName.h:539
bool hasTemplateKeyword() const
Whether the template name was prefixed by the "template" keyword.
Definition: TemplateName.h:536
Represents a struct/union/class.
Definition: Decl.h:4309
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: TypeBase.h:6502
RecordDecl * getOriginalDecl() const
Definition: TypeBase.h:6509
Provides common interface for the Decls that can be redeclared.
Definition: Redeclarable.h:84
Base for LValueReferenceType and RValueReferenceType.
Definition: TypeBase.h:3589
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
Definition: ExprConcepts.h:505
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
Definition: Stmt.h:3160
Represents an expression that computes the length of a parameter pack.
Definition: ExprCXX.h:4435
Encodes a location in the source.
PresumedLoc getPresumedLoc(SourceLocation Loc, bool UseLineDirectives=true) const
Returns the "presumed" location of a SourceLocation specifies.
SourceLocation getSpellingLoc(SourceLocation Loc) const
Given a SourceLocation object, return the spelling location referenced by the ID.
A trivial tuple used to represent a source range.
SourceLocation getEnd() const
SourceLocation getBegin() const
bool isValid() const
RetTy Visit(PTR(Stmt) S, ParamTys... P)
Definition: StmtVisitor.h:45
Stmt - This represents one statement.
Definition: Stmt.h:85
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1801
void outputString(raw_ostream &OS) const
Definition: Expr.cpp:1205
A structure for storing the information associated with a substituted template template parameter.
Definition: TemplateName.h:418
TemplateTemplateParmDecl * getParameter() const
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
Definition: TemplateName.h:441
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
Definition: TemplateName.h:437
Represents the result of substituting a set of types for a template type parameter pack.
Definition: TypeBase.h:7091
Represents the result of substituting a type for a template type parameter.
Definition: TypeBase.h:6972
SwitchStmt - This represents a 'switch' stmt.
Definition: Stmt.h:2509
Represents a template argument.
Definition: TemplateBase.h:61
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
Definition: TemplateBase.h:346
bool structurallyEquals(const TemplateArgument &Other) const
Determines whether two template arguments are superficially the same.
void print(const PrintingPolicy &Policy, raw_ostream &Out, bool IncludeType) const
Print this template argument to the given output stream.
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
Definition: TemplateBase.h:329
bool isCanonicalExpr() const
Definition: TemplateBase.h:416
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
Definition: TemplateBase.h:353
Represents a C++ template name within the type system.
Definition: TemplateName.h:222
TemplateDecl * getAsTemplateDecl(bool IgnoreDeduced=false) const
Retrieve the underlying template declaration that this template name refers to, if known.
DeducedTemplateStorage * getAsDeducedTemplateName() const
Retrieve the deduced template info, if any.
DependentTemplateName * getAsDependentTemplateName() const
Retrieve the underlying dependent template name structure, if any.
QualifiedTemplateName * getAsQualifiedTemplateName() const
Retrieve the underlying qualified template name structure, if any.
void print(raw_ostream &OS, const PrintingPolicy &Policy, Qualified Qual=Qualified::AsWritten) const
Print the template name.
NameKind getKind() const
@ UsingTemplate
A template name that refers to a template declaration found through a specific using shadow declarati...
Definition: TemplateName.h:267
@ OverloadedTemplate
A set of overloaded template declarations.
Definition: TemplateName.h:242
@ Template
A single template declaration.
Definition: TemplateName.h:239
@ DependentTemplate
A dependent template name that has not been resolved to a template (or set of templates).
Definition: TemplateName.h:254
@ SubstTemplateTemplateParm
A template template parameter that has been substituted for some other template name.
Definition: TemplateName.h:258
@ SubstTemplateTemplateParmPack
A template template parameter pack that has been substituted for a template template argument pack,...
Definition: TemplateName.h:263
@ DeducedTemplate
A template name that refers to another TemplateName with deduced default arguments.
Definition: TemplateName.h:271
@ QualifiedTemplate
A qualified template name, where the qualification is kept to describe the source code as written.
Definition: TemplateName.h:250
@ AssumedTemplate
An unqualified-id that has been assumed to name a function template that will be found by ADL.
Definition: TemplateName.h:246
UsingShadowDecl * getAsUsingShadowDecl() const
Retrieve the using shadow declaration through which the underlying template declaration is introduced...
SubstTemplateTemplateParmStorage * getAsSubstTemplateTemplateParm() const
Retrieve the substituted template template parameter, if known.
Represents a type template specialization; the template must be a class template, a type alias templa...
Definition: TypeBase.h:7290
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Declaration of a template type parameter.
void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node)
void VisitEnumDecl(const EnumDecl *D)
void VisitExprWithCleanups(const ExprWithCleanups *Node)
void visitInlineCommandComment(const comments::InlineCommandComment *C, const comments::FullComment *)
void VisitCXXStaticCastExpr(const CXXStaticCastExpr *Node)
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
void dumpPointer(const void *Ptr)
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
void VisitOpenACCLoopConstruct(const OpenACCLoopConstruct *S)
void VisitLinkageSpecDecl(const LinkageSpecDecl *D)
void VisitVectorType(const VectorType *T)
void VisitLoopControlStmt(const LoopControlStmt *L)
void VisitHLSLRootSignatureDecl(const HLSLRootSignatureDecl *D)
void VisitCoawaitExpr(const CoawaitExpr *Node)
void VisitUnaryOperator(const UnaryOperator *Node)
void dumpAccessSpecifier(AccessSpecifier AS)
void VisitHLSLOutArgExpr(const HLSLOutArgExpr *E)
void VisitDeducedTemplateSpecializationType(const DeducedTemplateSpecializationType *T)
void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node)
void VisitCXXOperatorCallExpr(const CXXOperatorCallExpr *Node)
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node)
void VisitPragmaCommentDecl(const PragmaCommentDecl *D)
void VisitOpenACCRoutineDecl(const OpenACCRoutineDecl *D)
void VisitDependentScopeDeclRefExpr(const DependentScopeDeclRefExpr *Node)
void VisitImportDecl(const ImportDecl *D)
void VisitUsingEnumDecl(const UsingEnumDecl *D)
void VisitOMPCapturedExprDecl(const OMPCapturedExprDecl *D)
void VisitUnresolvedUsingType(const UnresolvedUsingType *T)
void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node)
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
void VisitObjCCategoryDecl(const ObjCCategoryDecl *D)
void VisitIndirectFieldDecl(const IndirectFieldDecl *D)
void VisitNullTemplateArgument(const TemplateArgument &TA)
void VisitPackTemplateArgument(const TemplateArgument &TA)
void VisitUsingType(const UsingType *T)
void VisitInjectedClassNameType(const InjectedClassNameType *T)
void VisitBinaryOperator(const BinaryOperator *Node)
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node)
void VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D)
void VisitBlockDecl(const BlockDecl *D)
void VisitCXXDeleteExpr(const CXXDeleteExpr *Node)
void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node)
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
void VisitVarTemplateDecl(const VarTemplateDecl *D)
void VisitSubstTemplateTypeParmPackType(const SubstTemplateTypeParmPackType *T)
void VisitConceptSpecializationExpr(const ConceptSpecializationExpr *Node)
void VisitCXXDeductionGuideDecl(const CXXDeductionGuideDecl *D)
TextNodeDumper(raw_ostream &OS, const ASTContext &Context, bool ShowColors)
void VisitPredefinedExpr(const PredefinedExpr *Node)
void dumpType(QualType T)
void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node)
void dumpNestedNameSpecifier(NestedNameSpecifier NNS)
void VisitStructuralValueTemplateArgument(const TemplateArgument &TA)
void VisitHLSLBufferDecl(const HLSLBufferDecl *D)
void VisitUnresolvedUsingValueDecl(const UnresolvedUsingValueDecl *D)
void VisitNamespaceAliasDecl(const NamespaceAliasDecl *D)
void VisitObjCMessageExpr(const ObjCMessageExpr *Node)
void dumpSourceRange(SourceRange R)
void VisitMemberExpr(const MemberExpr *Node)
void VisitOpenACCDataConstruct(const OpenACCDataConstruct *S)
void dumpBareTemplateName(TemplateName TN)
void VisitOpenACCConstructStmt(const OpenACCConstructStmt *S)
void VisitCompoundStmt(const CompoundStmt *Node)
void VisitConstantExpr(const ConstantExpr *Node)
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node)
void VisitOpenACCDeclareDecl(const OpenACCDeclareDecl *D)
void VisitOpenACCAsteriskSizeExpr(const OpenACCAsteriskSizeExpr *S)
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node)
void VisitConstructorUsingShadowDecl(const ConstructorUsingShadowDecl *D)
void VisitWhileStmt(const WhileStmt *Node)
void VisitCharacterLiteral(const CharacterLiteral *Node)
void VisitAccessSpecDecl(const AccessSpecDecl *D)
void VisitFunctionType(const FunctionType *T)
void VisitObjCImplementationDecl(const ObjCImplementationDecl *D)
void VisitReturnStmt(const ReturnStmt *Node)
void VisitTypeLoc(TypeLoc TL)
void VisitAutoType(const AutoType *T)
void VisitObjCInterfaceType(const ObjCInterfaceType *T)
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
void VisitTypedefDecl(const TypedefDecl *D)
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node)
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
void VisitIntegerLiteral(const IntegerLiteral *Node)
void VisitObjCProtocolDecl(const ObjCProtocolDecl *D)
void VisitGotoStmt(const GotoStmt *Node)
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T)
void VisitFriendDecl(const FriendDecl *D)
void VisitSwitchStmt(const SwitchStmt *Node)
void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node)
void VisitEmbedExpr(const EmbedExpr *S)
void VisitFunctionTemplateDecl(const FunctionTemplateDecl *D)
void VisitTemplateTemplateParmDecl(const TemplateTemplateParmDecl *D)
void VisitUsingDecl(const UsingDecl *D)
void VisitConstantArrayType(const ConstantArrayType *T)
void VisitTypeTemplateArgument(const TemplateArgument &TA)
void VisitObjCPropertyDecl(const ObjCPropertyDecl *D)
void VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D)
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node)
void VisitArrayType(const ArrayType *T)
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node)
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
void VisitLifetimeExtendedTemporaryDecl(const LifetimeExtendedTemporaryDecl *D)
void VisitCXXRecordDecl(const CXXRecordDecl *D)
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
void dumpCleanupObject(const ExprWithCleanups::CleanupObject &C)
void VisitOpenACCExitDataConstruct(const OpenACCExitDataConstruct *S)
void VisitCaseStmt(const CaseStmt *Node)
void VisitRValueReferenceType(const ReferenceType *T)
void VisitPackExpansionType(const PackExpansionType *T)
void VisitConceptDecl(const ConceptDecl *D)
void VisitOpenACCEnterDataConstruct(const OpenACCEnterDataConstruct *S)
void VisitCallExpr(const CallExpr *Node)
void VisitCapturedDecl(const CapturedDecl *D)
void VisitOpenACCWaitConstruct(const OpenACCWaitConstruct *S)
void VisitBuiltinTemplateDecl(const BuiltinTemplateDecl *D)
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node)
void VisitOMPDeclareReductionDecl(const OMPDeclareReductionDecl *D)
void VisitCoreturnStmt(const CoreturnStmt *Node)
void VisitSizeOfPackExpr(const SizeOfPackExpr *Node)
void VisitDeclRefExpr(const DeclRefExpr *Node)
void VisitLabelStmt(const LabelStmt *Node)
void VisitOpenACCUpdateConstruct(const OpenACCUpdateConstruct *S)
void Visit(const comments::Comment *C, const comments::FullComment *FC)
void VisitLabelDecl(const LabelDecl *D)
void VisitUnaryTransformType(const UnaryTransformType *T)
void VisitStringLiteral(const StringLiteral *Str)
void VisitOMPRequiresDecl(const OMPRequiresDecl *D)
void dumpBareType(QualType T, bool Desugar=true)
void VisitTemplateSpecializationType(const TemplateSpecializationType *T)
void VisitOpenACCInitConstruct(const OpenACCInitConstruct *S)
void VisitTemplateTypeParmDecl(const TemplateTypeParmDecl *D)
void VisitCompoundAssignOperator(const CompoundAssignOperator *Node)
void VisitCXXThisExpr(const CXXThisExpr *Node)
void VisitOpenACCRoutineDeclAttr(const OpenACCRoutineDeclAttr *A)
void dumpName(const NamedDecl *ND)
void dumpTemplateName(TemplateName TN, StringRef Label={})
void VisitArrayTypeTraitExpr(const ArrayTypeTraitExpr *Node)
void VisitObjCIvarDecl(const ObjCIvarDecl *D)
void VisitFieldDecl(const FieldDecl *D)
void dumpDeclRef(const Decl *D, StringRef Label={})
void VisitRecordDecl(const RecordDecl *D)
void VisitCXXNewExpr(const CXXNewExpr *Node)
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node)
void VisitCastExpr(const CastExpr *Node)
void VisitObjCTypeParamDecl(const ObjCTypeParamDecl *D)
void VisitSubstTemplateTypeParmType(const SubstTemplateTypeParmType *T)
void VisitExpressionTraitExpr(const ExpressionTraitExpr *Node)
void VisitAddrLabelExpr(const AddrLabelExpr *Node)
void VisitUnresolvedUsingTypenameDecl(const UnresolvedUsingTypenameDecl *D)
void VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node)
void VisitOpenACCAtomicConstruct(const OpenACCAtomicConstruct *S)
void visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
void VisitTypeAliasDecl(const TypeAliasDecl *D)
void VisitVarDecl(const VarDecl *D)
void VisitOpenACCCacheConstruct(const OpenACCCacheConstruct *S)
void VisitFixedPointLiteral(const FixedPointLiteral *Node)
void VisitOMPIteratorExpr(const OMPIteratorExpr *Node)
void VisitUsingDirectiveDecl(const UsingDirectiveDecl *D)
void VisitObjCMethodDecl(const ObjCMethodDecl *D)
void VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D)
void VisitUsingShadowDecl(const UsingShadowDecl *D)
void VisitNamespaceDecl(const NamespaceDecl *D)
void VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D)
void VisitOpenACCHostDataConstruct(const OpenACCHostDataConstruct *S)
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node)
void VisitIfStmt(const IfStmt *Node)
void VisitCXXConstructExpr(const CXXConstructExpr *Node)
void VisitFunctionProtoType(const FunctionProtoType *T)
void dumpTemplateArgument(const TemplateArgument &TA)
void dumpLocation(SourceLocation Loc)
void VisitDependentSizedArrayType(const DependentSizedArrayType *T)
void VisitOpenACCCombinedConstruct(const OpenACCCombinedConstruct *S)
void VisitOMPExecutableDirective(const OMPExecutableDirective *D)
void VisitImplicitCastExpr(const ImplicitCastExpr *Node)
void VisitCXXDefaultArgExpr(const CXXDefaultArgExpr *Node)
void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node)
void VisitTagType(const TagType *T)
void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA)
void VisitSYCLUniqueStableNameExpr(const SYCLUniqueStableNameExpr *Node)
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D)
void VisitOpenACCSetConstruct(const OpenACCSetConstruct *S)
void VisitFunctionDecl(const FunctionDecl *D)
void visitTParamCommandComment(const comments::TParamCommandComment *C, const comments::FullComment *FC)
void VisitTypeTraitExpr(const TypeTraitExpr *Node)
void dumpBareDeclRef(const Decl *D)
void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node)
void VisitConvertVectorExpr(const ConvertVectorExpr *S)
void visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
void VisitOpenACCShutdownConstruct(const OpenACCShutdownConstruct *S)
void VisitFloatingLiteral(const FloatingLiteral *Node)
void VisitInitListExpr(const InitListExpr *ILE)
void VisitRequiresExpr(const RequiresExpr *Node)
void VisitVariableArrayType(const VariableArrayType *T)
void VisitGenericSelectionExpr(const GenericSelectionExpr *E)
void VisitTemplateTypeParmType(const TemplateTypeParmType *T)
void VisitCXXDefaultInitExpr(const CXXDefaultInitExpr *Node)
void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
void VisitEnumConstantDecl(const EnumConstantDecl *D)
void VisitPragmaDetectMismatchDecl(const PragmaDetectMismatchDecl *D)
void dumpTemplateSpecializationKind(TemplateSpecializationKind TSK)
void VisitAtomicExpr(const AtomicExpr *AE)
void VisitObjCCompatibleAliasDecl(const ObjCCompatibleAliasDecl *D)
void VisitClassTemplateDecl(const ClassTemplateDecl *D)
void VisitBindingDecl(const BindingDecl *D)
void VisitTypedefType(const TypedefType *T)
void AddChild(Fn DoAddChild)
Add a child of the current node. Calls DoAddChild without arguments.
Represents the declaration of a typedef-name via a C++11 alias-declaration.
Definition: Decl.h:3685
Declaration of an alias template.
Symbolic representation of typeid(T) for some type T.
Definition: APValue.h:44
RetTy Visit(TypeLoc TyLoc)
Base wrapper for a particular "section" of type source info.
Definition: TypeLoc.h:59
QualType getType() const
Get the type for which this source info wrapper provides information.
Definition: TypeLoc.h:133
SourceRange getSourceRange() const LLVM_READONLY
Get the full source range.
Definition: TypeLoc.h:154
TypeLocClass getTypeLocClass() const
Definition: TypeLoc.h:116
const Type * getTypePtr() const
Definition: TypeLoc.h:137
A container of type source information.
Definition: TypeBase.h:8314
QualType getType() const
Return the type wrapped by this type source info.
Definition: TypeBase.h:8325
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition: ExprCXX.h:2890
RetTy Visit(const Type *T)
Performs the operation associated with this visitor object.
Definition: TypeVisitor.h:68
The base class of the type hierarchy.
Definition: TypeBase.h:1833
QualType getLocallyUnqualifiedSingleStepDesugaredType() const
Pull a single level of sugar off of this locally-unqualified type.
Definition: Type.cpp:521
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
Definition: TypeBase.h:2808
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
Definition: TypeBase.h:2800
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
Definition: TypeBase.h:2423
const char * getTypeClassName() const
Definition: Type.cpp:3386
bool containsErrors() const
Whether this type is an error type.
Definition: TypeBase.h:2794
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
Definition: TypeBase.h:2818
bool isFromAST() const
Whether this type comes from an AST file.
Definition: TypeBase.h:2406
bool isCanonicalUnqualified() const
Determines if this type would be canonical if it had no further qualification.
Definition: TypeBase.h:2429
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Definition: Decl.h:3664
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition: Expr.h:2627
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition: Expr.h:2246
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to,...
Definition: Expr.cpp:1402
A unary type transform, which is a type constructed from another.
Definition: TypeBase.h:6375
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:3384
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:35
Represents the dependent type named by a dependently-scoped typename using declaration,...
Definition: TypeBase.h:5998
Represents a dependent using declaration which was marked with typename.
Definition: DeclCXX.h:4031
Represents a dependent using declaration which was not marked with typename.
Definition: DeclCXX.h:3934
Represents a C++ using-declaration.
Definition: DeclCXX.h:3585
Represents C++ using-directive.
Definition: DeclCXX.h:3090
Represents a C++ using-enum-declaration.
Definition: DeclCXX.h:3786
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition: DeclCXX.h:3393
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
Definition: DeclCXX.h:3457
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:711
QualType getType() const
Definition: Decl.h:722
Kind getKind() const
Definition: Value.h:137
Represents a variable declaration or definition.
Definition: Decl.h:925
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
Definition: Decl.cpp:2121
@ ListInit
Direct list-initialization (C++11)
Definition: Decl.h:936
@ CInit
C-style initialization with assignment.
Definition: Decl.h:930
@ ParenListInit
Parenthesized list-initialization (C++20)
Definition: Decl.h:939
@ CallInit
Call-style initialization (C++98)
Definition: Decl.h:933
@ TLS_Static
TLS with a known-constant initializer.
Definition: Decl.h:948
@ TLS_Dynamic
TLS with a dynamic initializer.
Definition: Decl.h:951
@ TLS_None
Not a TLS variable.
Definition: Decl.h:945
Declaration of a variable template.
Represents a C array with a specified size that is not an integer-constant-expression.
Definition: TypeBase.h:3982
Represents a GCC generic vector type.
Definition: TypeBase.h:4191
WhileStmt - This represents a 'while' stmt.
Definition: Stmt.h:2697
RetTy Visit(PTR(Attr) A)
Definition: AttrVisitor.h:31
A command that has zero or more word-like arguments (number of word-like arguments depends on command...
Definition: Comment.h:625
static const CommandInfo * getBuiltinCommandInfo(StringRef Name)
const CommandInfo * getCommandInfo(StringRef Name) const
RetTy visit(PTR(Comment) C, ParamTys... P)
Any part of the comment.
Definition: Comment.h:66
A full comment attached to a declaration, contains block content.
Definition: Comment.h:1104
An opening HTML tag with attributes.
Definition: Comment.h:454
A command with word-like arguments that is considered inline content.
Definition: Comment.h:341
Doxygen \param command.
Definition: Comment.h:732
static const char * getDirectionAsString(ParamCommandPassDirection D)
Definition: Comment.cpp:189
Doxygen \tparam command, describes a template parameter.
Definition: Comment.h:814
A verbatim block command (e.
Definition: Comment.h:900
A line of text contained in a verbatim block.
Definition: Comment.h:875
A verbatim line command.
Definition: Comment.h:951
A static requirement that can be used in a requires-expression to check properties of types and expre...
Definition: ExprConcepts.h:170
RequirementKind getKind() const
Definition: ExprConcepts.h:200
bool containsUnexpandedParameterPack() const
Definition: ExprConcepts.h:220
RetTy Visit(PTR(Decl) D)
Definition: DeclVisitor.h:38
RetTy Visit(REF(TemplateArgument) TA, ParamTys... P)
The JSON file list parser is used to communicate input to InstallAPI.
static const TerminalColor NullColor
static const TerminalColor ErrorsColor
static const TerminalColor CommentColor
static const TerminalColor DeclNameColor
if(T->getSizeExpr()) TRY_TO(TraverseStmt(const_cast< Expr * >(T -> getSizeExpr())))
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
Definition: Specifiers.h:419
static const TerminalColor AddressColor
@ PCK_ExeStr
Definition: PragmaKinds.h:19
@ PCK_Compiler
Definition: PragmaKinds.h:18
@ PCK_Linker
Definition: PragmaKinds.h:16
@ PCK_Lib
Definition: PragmaKinds.h:17
@ PCK_Unknown
Definition: PragmaKinds.h:15
@ PCK_User
Definition: PragmaKinds.h:20
@ RQ_None
No ref-qualifier was provided.
Definition: TypeBase.h:1782
@ RQ_LValue
An lvalue ref-qualifier was provided (&).
Definition: TypeBase.h:1785
@ RQ_RValue
An rvalue ref-qualifier was provided (&&).
Definition: TypeBase.h:1788
@ OK_VectorComponent
A vector component is an element or range of elements on a vector.
Definition: Specifiers.h:157
@ OK_ObjCProperty
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
Definition: Specifiers.h:161
@ OK_ObjCSubscript
An Objective-C array/dictionary subscripting which reads an object or writes at the subscripted array...
Definition: Specifiers.h:166
@ OK_Ordinary
An ordinary object is located at an address in memory.
Definition: Specifiers.h:151
@ OK_BitField
A bitfield object is a bitfield on a C or C++ record.
Definition: Specifiers.h:154
@ OK_MatrixComponent
A matrix component is a single element of a matrix.
Definition: Specifiers.h:169
static const TerminalColor StmtColor
static const TerminalColor UndeserializedColor
@ Override
Merge availability attributes for an override, which requires an exact match or a weakening of constr...
@ Auto
'auto' clause, allowed on 'loop' directives.
@ Bind
'bind' clause, allowed on routine constructs.
@ Gang
'gang' clause, allowed on 'loop' and Combined constructs.
@ Wait
'wait' clause, allowed on Compute, Data, 'update', and Combined constructs.
@ DevicePtr
'deviceptr' clause, allowed on Compute and Combined Constructs, plus 'data' and 'declare'.
@ PCopyOut
'copyout' clause alias 'pcopyout'. Preserved for diagnostic purposes.
@ VectorLength
'vector_length' clause, allowed on 'parallel', 'kernels', 'parallel loop', and 'kernels loop' constru...
@ Async
'async' clause, allowed on Compute, Data, 'update', 'wait', and Combined constructs.
@ PresentOrCreate
'create' clause alias 'present_or_create'.
@ Collapse
'collapse' clause, allowed on 'loop' and Combined constructs.
@ NoHost
'nohost' clause, allowed on 'routine' directives.
@ PresentOrCopy
'copy' clause alias 'present_or_copy'. Preserved for diagnostic purposes.
@ DeviceNum
'device_num' clause, allowed on 'init', 'shutdown', and 'set' constructs.
@ Private
'private' clause, allowed on 'parallel', 'serial', 'loop', 'parallel loop', and 'serial loop' constru...
@ Invalid
Represents an invalid clause, for the purposes of parsing.
@ Vector
'vector' clause, allowed on 'loop', Combined, and 'routine' directives.
@ Copy
'copy' clause, allowed on Compute and Combined Constructs, plus 'data' and 'declare'.
@ Worker
'worker' clause, allowed on 'loop', Combined, and 'routine' directives.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
@ DeviceType
'device_type' clause, allowed on Compute, 'data', 'init', 'shutdown', 'set', update',...
@ DefaultAsync
'default_async' clause, allowed on 'set' construct.
@ Attach
'attach' clause, allowed on Compute and Combined constructs, plus 'data' and 'enter data'.
@ Shortloop
'shortloop' is represented in the ACC.td file, but isn't present in the standard.
@ NumGangs
'num_gangs' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs.
@ If
'if' clause, allowed on all the Compute Constructs, Data Constructs, Executable Constructs,...
@ Default
'default' clause, allowed on parallel, serial, kernel (and compound) constructs.
@ UseDevice
'use_device' clause, allowed on 'host_data' construct.
@ NoCreate
'no_create' clause, allowed on allowed on Compute and Combined constructs, plus 'data'.
@ PresentOrCopyOut
'copyout' clause alias 'present_or_copyout'.
@ Link
'link' clause, allowed on 'declare' construct.
@ Reduction
'reduction' clause, allowed on Parallel, Serial, Loop, and the combined constructs.
@ Self
'self' clause, allowed on Compute and Combined Constructs, plus 'update'.
@ CopyOut
'copyout' clause, allowed on Compute and Combined constructs, plus 'data', 'exit data',...
@ Seq
'seq' clause, allowed on 'loop' and 'routine' directives.
@ FirstPrivate
'firstprivate' clause, allowed on 'parallel', 'serial', 'parallel loop', and 'serial loop' constructs...
@ Host
'host' clause, allowed on 'update' construct.
@ PCopy
'copy' clause alias 'pcopy'. Preserved for diagnostic purposes.
@ Tile
'tile' clause, allowed on 'loop' and Combined constructs.
@ PCopyIn
'copyin' clause alias 'pcopyin'. Preserved for diagnostic purposes.
@ DeviceResident
'device_resident' clause, allowed on the 'declare' construct.
@ PCreate
'create' clause alias 'pcreate'. Preserved for diagnostic purposes.
@ Present
'present' clause, allowed on Compute and Combined constructs, plus 'data' and 'declare'.
@ DType
'dtype' clause, an alias for 'device_type', stored separately for diagnostic purposes.
@ CopyIn
'copyin' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
@ Device
'device' clause, allowed on the 'update' construct.
@ Independent
'independent' clause, allowed on 'loop' directives.
@ NumWorkers
'num_workers' clause, allowed on 'parallel', 'kernels', parallel loop', and 'kernels loop' constructs...
@ IfPresent
'if_present' clause, allowed on 'host_data' and 'update' directives.
@ Detach
'detach' clause, allowed on the 'exit data' construct.
@ Delete
'delete' clause, allowed on the 'exit data' construct.
@ PresentOrCopyIn
'copyin' clause alias 'present_or_copyin'.
@ Finalize
'finalize' clause, allowed on 'exit data' directive.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:123
StorageClass
Storage classes.
Definition: Specifiers.h:248
@ SC_None
Definition: Specifiers.h:250
static const TerminalColor DeclKindNameColor
static const TerminalColor LocationColor
static const TerminalColor ValueKindColor
static const TerminalColor CastColor
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
Definition: Specifiers.h:135
@ VK_XValue
An x-value expression is a reference to an object with independent storage but which can be "moved",...
Definition: Specifiers.h:144
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
Definition: Specifiers.h:139
const char * getTraitSpelling(ExpressionTrait T) LLVM_READONLY
Return the spelling of the type trait TT. Never null.
const FunctionProtoType * T
static const TerminalColor AttrColor
static const TerminalColor TypeColor
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
Definition: Specifiers.h:188
@ TSK_ExplicitInstantiationDefinition
This template specialization was instantiated from a template due to an explicit instantiation defini...
Definition: Specifiers.h:206
@ TSK_ExplicitInstantiationDeclaration
This template specialization was instantiated from a template due to an explicit instantiation declar...
Definition: Specifiers.h:202
@ TSK_ExplicitSpecialization
This template specialization was declared or defined by an explicit specialization (C++ [temp....
Definition: Specifiers.h:198
@ TSK_ImplicitInstantiation
This template specialization was implicitly instantiated from a template.
Definition: Specifiers.h:194
@ TSK_Undeclared
This template specialization was formed from a template-id but has not yet been declared,...
Definition: Specifiers.h:191
@ Invariant
The parameter is invariant: must match exactly.
@ Contravariant
The parameter is contravariant, e.g., X<T> is a subtype of X when the type parameter is covariant and...
@ Covariant
The parameter is covariant, e.g., X<T> is a subtype of X when the type parameter is covariant and T i...
const char * getOperatorSpelling(OverloadedOperatorKind Operator)
Retrieve the spelling of the given overloaded operator, without the preceding "operator" keyword.
@ AltiVecBool
is AltiVec 'vector bool ...'
@ SveFixedLengthData
is AArch64 SVE fixed-length data vector
@ AltiVecVector
is AltiVec vector
@ AltiVecPixel
is AltiVec 'vector Pixel'
@ Neon
is ARM Neon vector
@ Generic
not a target-specific vector type
@ RVVFixedLengthData
is RISC-V RVV fixed-length data vector
@ RVVFixedLengthMask
is RISC-V RVV fixed-length mask vector
@ NeonPoly
is ARM Neon polynomial vector
@ SveFixedLengthPredicate
is AArch64 SVE fixed-length predicate vector
static const TerminalColor ValueColor
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
Definition: TypeBase.h:5881
@ None
No keyword precedes the qualified type name.
@ EST_DependentNoexcept
noexcept(expression), value-dependent
@ EST_DynamicNone
throw()
@ EST_Uninstantiated
not instantiated yet
@ EST_Unparsed
not parsed yet
@ EST_NoThrow
Microsoft __declspec(nothrow) extension.
@ EST_None
no exception specification
@ EST_MSAny
Microsoft throw(...) extension.
@ EST_BasicNoexcept
noexcept
@ EST_NoexceptFalse
noexcept(expression), evals to 'false'
@ EST_Unevaluated
not evaluated yet, for special member function
@ EST_NoexceptTrue
noexcept(expression), evals to 'true'
@ EST_Dynamic
throw(T1, T2)
static const TerminalColor ObjectKindColor
@ NOUR_Discarded
This name appears as a potential result of a discarded value expression.
Definition: Specifiers.h:183
@ NOUR_Unevaluated
This name appears in an unevaluated operand.
Definition: Specifiers.h:177
@ NOUR_None
This is an odr-use.
Definition: Specifiers.h:175
@ NOUR_Constant
This name appears as a potential result of an lvalue-to-rvalue conversion that is a constant expressi...
Definition: Specifiers.h:180
FunctionDecl * SourceDecl
The function whose exception specification this is, for EST_Unevaluated and EST_Uninstantiated.
Definition: TypeBase.h:5351
FunctionDecl * SourceTemplate
The function template whose exception specification this is instantiated from, for EST_Uninstantiated...
Definition: TypeBase.h:5355
ExceptionSpecificationType Type
The kind of exception specification this is.
Definition: TypeBase.h:5341
Extra information about a function prototype.
Definition: TypeBase.h:5367
static StringRef getKeywordName(ElaboratedTypeKeyword Keyword)
Definition: Type.cpp:3315
Iterator range representation begin:end[:step].
Definition: ExprOpenMP.h:154
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
Definition: TypeBase.h:870
Information about a single command.