clang 24.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"
23#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)
65 : TextTreeStructure(OS, ShowColors), OS(OS), ShowColors(ShowColors),
66 Context(&Context), SM(&Context.getSourceManager()),
67 PrintPolicy(Context.getPrintingPolicy()),
68 Traits(&Context.getCommentCommandTraits()) {}
69
70TextNodeDumper::TextNodeDumper(raw_ostream &OS, bool ShowColors)
71 : TextTreeStructure(OS, ShowColors), OS(OS), ShowColors(ShowColors) {}
72
74 const comments::FullComment *FC) {
75 if (!C) {
76 ColorScope Color(OS, ShowColors, ASTDumpColor::Null);
77 OS << "<<<NULL>>>";
78 return;
79 }
80
81 {
82 ColorScope Color(OS, ShowColors, ASTDumpColor::Comment);
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, ASTDumpColor::Attr);
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
127void TextNodeDumper::Visit(const Stmt *Node) {
128 if (!Node) {
129 ColorScope Color(OS, ShowColors, ASTDumpColor::Null);
130 OS << "<<<NULL>>>";
131 return;
132 }
133 {
134 ColorScope Color(OS, ShowColors, ASTDumpColor::Stmt);
135 OS << Node->getStmtClassName();
136 }
137 dumpPointer(Node);
139
140 if (const auto *E = dyn_cast<Expr>(Node)) {
141 dumpType(E->getType());
142
143 if (E->containsErrors()) {
144 ColorScope Color(OS, ShowColors, ASTDumpColor::Errors);
145 OS << " contains-errors";
146 }
147
148 {
149 ColorScope Color(OS, ShowColors, ASTDumpColor::ValueKind);
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, ASTDumpColor::ObjectKind);
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, ASTDumpColor::Null);
192 OS << "<<<NULL>>>";
193 return;
194 }
195 if (isa<LocInfoType>(T)) {
196 {
197 ColorScope Color(OS, ShowColors, ASTDumpColor::Type);
198 OS << "LocInfo Type";
199 }
200 dumpPointer(T);
201 return;
202 }
203
204 {
205 ColorScope Color(OS, ShowColors, ASTDumpColor::Type);
206 OS << T->getTypeClassName() << "Type";
207 }
208 dumpPointer(T);
209 OS << " ";
210 dumpBareType(QualType(T, 0), false);
211
212 QualType SingleStepDesugar =
213 T->getLocallyUnqualifiedSingleStepDesugaredType();
214 if (SingleStepDesugar != QualType(T, 0))
215 OS << " sugar";
216
217 if (T->containsErrors()) {
218 ColorScope Color(OS, ShowColors, ASTDumpColor::Errors);
219 OS << " contains-errors";
220 }
221
222 if (T->isDependentType())
223 OS << " dependent";
224 else if (T->isInstantiationDependentType())
225 OS << " instantiation_dependent";
226
227 if (T->isVariablyModifiedType())
228 OS << " variably_modified";
229 if (T->containsUnexpandedParameterPack())
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, ASTDumpColor::Null);
248 OS << "<<<NULL>>>";
249 return;
250 }
251
252 {
253 ColorScope Color(OS, ShowColors, ASTDumpColor::Type);
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, ASTDumpColor::Null);
269 OS << "<<<NULL>>>";
270 return;
271 }
272
273 {
274 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
275 OS << D->getDeclKindName() << "Decl";
276 }
277 dumpPointer(D);
278 if (D->getLexicalDeclContext() != D->getDeclContext())
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, ASTDumpColor::Undeserialized);
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, ASTDumpColor::Null);
370 OS << "<<<NULL>>> OMPClause";
371 return;
372 }
373 {
374 ColorScope Color(OS, ShowColors, ASTDumpColor::Attr);
375 OpenMPClauseKind CKind = C->getClauseKind();
376 StringRef ClauseName(CKind == llvm::omp::Clause::OMPC_update_depend_objects
377 ? StringRef("UpdateDependObjects")
378 : llvm::omp::getOpenMPClauseName(CKind));
379 OS << "OMP" << ClauseName.substr(/*Start=*/0, /*N=*/1).upper()
380 << ClauseName.drop_front() << "Clause";
381 }
382 dumpPointer(C);
383 dumpSourceRange(SourceRange(C->getBeginLoc(), C->getEndLoc()));
384 if (C->isImplicit())
385 OS << " <implicit>";
386}
387
389 const OpenACCAsteriskSizeExpr *E) {
390 // Nothing to do here, only location exists, and that is printed elsewhere.
391}
392
394 if (!C) {
395 ColorScope Color(OS, ShowColors, ASTDumpColor::Null);
396 OS << "<<<NULL>>> OpenACCClause";
397 return;
398 }
399 {
400 ColorScope Color(OS, ShowColors, ASTDumpColor::Attr);
401 OS << C->getClauseKind();
402
403 // Handle clauses with parens for types that have no children, likely
404 // because there is no sub expression.
405 switch (C->getClauseKind()) {
407 OS << '(' << cast<OpenACCDefaultClause>(C)->getDefaultClauseKind() << ')';
408 break;
441 // The condition expression will be printed as a part of the 'children',
442 // but print 'clause' here so it is clear what is happening from the dump.
443 OS << " clause";
444 break;
446 OS << " clause";
447 // print the list of all GangKinds, so that there is some sort of
448 // relationship to the expressions listed afterwards.
449 auto *GC = cast<OpenACCGangClause>(C);
450
451 for (unsigned I = 0; I < GC->getNumExprs(); ++I) {
452 OS << " " << GC->getExpr(I).first;
453 }
454 break;
455 }
457 OS << " clause";
458 if (cast<OpenACCCollapseClause>(C)->hasForce())
459 OS << ": force";
460 break;
461
465 OS << " clause";
466 if (cast<OpenACCCopyClause>(C)->getModifierList() !=
468 OS << " modifiers: " << cast<OpenACCCopyClause>(C)->getModifierList();
469 break;
473 OS << " clause";
474 if (cast<OpenACCCopyInClause>(C)->getModifierList() !=
476 OS << " modifiers: " << cast<OpenACCCopyInClause>(C)->getModifierList();
477 break;
481 OS << " clause";
482 if (cast<OpenACCCopyOutClause>(C)->getModifierList() !=
484 OS << " modifiers: "
485 << cast<OpenACCCopyOutClause>(C)->getModifierList();
486 break;
490 OS << " clause";
491 if (cast<OpenACCCreateClause>(C)->getModifierList() !=
493 OS << " modifiers: " << cast<OpenACCCreateClause>(C)->getModifierList();
494 break;
496 OS << " clause";
497 if (cast<OpenACCWaitClause>(C)->hasDevNumExpr())
498 OS << " has devnum";
499 if (cast<OpenACCWaitClause>(C)->hasQueuesTag())
500 OS << " has queues tag";
501 break;
504 OS << "(";
505 llvm::interleaveComma(
506 cast<OpenACCDeviceTypeClause>(C)->getArchitectures(), OS,
507 [&](const DeviceTypeArgument &Arch) {
508 if (Arch.getIdentifierInfo() == nullptr)
509 OS << "*";
510 else
511 OS << Arch.getIdentifierInfo()->getName();
512 });
513 OS << ")";
514 break;
516 OS << " clause Operator: "
517 << cast<OpenACCReductionClause>(C)->getReductionOp();
518 break;
520 OS << " clause";
521 if (cast<OpenACCBindClause>(C)->isIdentifierArgument())
522 OS << " identifier '"
523 << cast<OpenACCBindClause>(C)->getIdentifierArgument()->getName()
524 << "'";
525 else
526 AddChild(
527 [=] { Visit(cast<OpenACCBindClause>(C)->getStringArgument()); });
528 }
529 }
530 dumpPointer(C);
531 dumpSourceRange(SourceRange(C->getBeginLoc(), C->getEndLoc()));
532}
533
535 const TypeSourceInfo *TSI = A.getTypeSourceInfo();
536 if (TSI) {
537 OS << "case ";
538 dumpType(TSI->getType());
539 } else {
540 OS << "default";
541 }
542
543 if (A.isSelected())
544 OS << " selected";
545}
546
548 if (!R) {
549 ColorScope Color(OS, ShowColors, ASTDumpColor::Null);
550 OS << "<<<NULL>>> ConceptReference";
551 return;
552 }
553
554 OS << "ConceptReference";
555 dumpPointer(R);
556 dumpSourceRange(R->getSourceRange());
557 OS << ' ';
558 dumpBareDeclRef(R->getNamedConcept());
559}
560
562 if (!R) {
563 ColorScope Color(OS, ShowColors, ASTDumpColor::Null);
564 OS << "<<<NULL>>> Requirement";
565 return;
566 }
567
568 {
569 ColorScope Color(OS, ShowColors, ASTDumpColor::Stmt);
570 switch (R->getKind()) {
572 OS << "TypeRequirement";
573 break;
575 OS << "SimpleRequirement";
576 break;
578 OS << "CompoundRequirement";
579 break;
581 OS << "NestedRequirement";
582 break;
583 }
584 }
585
586 dumpPointer(R);
587
588 if (auto *ER = dyn_cast<concepts::ExprRequirement>(R)) {
589 if (ER->hasNoexceptRequirement())
590 OS << " noexcept";
591 }
592
593 if (R->isDependent())
594 OS << " dependent";
595 else
596 OS << (R->isSatisfied() ? " satisfied" : " unsatisfied");
597 if (R->containsUnexpandedParameterPack())
598 OS << " contains_unexpanded_pack";
599}
600
601static double GetApproxValue(const llvm::APFloat &F) {
602 llvm::APFloat V = F;
603 bool ignored;
604 V.convert(llvm::APFloat::IEEEdouble(), llvm::APFloat::rmNearestTiesToEven,
605 &ignored);
606 return V.convertToDouble();
607}
608
609/// True if the \p APValue \p Value can be folded onto the current line.
610static bool isSimpleAPValue(const APValue &Value) {
611 switch (Value.getKind()) {
612 case APValue::None:
614 case APValue::Int:
615 case APValue::Float:
619 case APValue::LValue:
622 return true;
623 case APValue::Vector:
624 case APValue::Array:
625 case APValue::Struct:
626 case APValue::Matrix:
627 return false;
628 case APValue::Union:
629 return isSimpleAPValue(Value.getUnionValue());
630 }
631 llvm_unreachable("unexpected APValue kind!");
632}
633
634/// Dump the children of the \p APValue \p Value.
635///
636/// \param[in] Value The \p APValue to visit
637/// \param[in] Ty The \p QualType passed to \p Visit
638///
639/// \param[in] IdxToChildFun A function mapping an \p APValue and an index
640/// to one of the child of the \p APValue
641///
642/// \param[in] NumChildren \p IdxToChildFun will be called on \p Value with
643/// the indices in the range \p [0,NumChildren(
644///
645/// \param[in] LabelSingular The label to use on a line with a single child
646/// \param[in] LabelPlurial The label to use on a line with multiple children
647void TextNodeDumper::dumpAPValueChildren(
648 const APValue &Value, QualType Ty,
649 const APValue &(*IdxToChildFun)(const APValue &, unsigned),
650 unsigned NumChildren, StringRef LabelSingular, StringRef LabelPlurial) {
651 // To save some vertical space we print up to MaxChildrenPerLine APValues
652 // considered to be simple (by isSimpleAPValue) on a single line.
653 constexpr unsigned MaxChildrenPerLine = 4;
654 unsigned I = 0;
655 while (I < NumChildren) {
656 unsigned J = I;
657 while (J < NumChildren) {
658 if (isSimpleAPValue(IdxToChildFun(Value, J)) &&
659 (J - I < MaxChildrenPerLine)) {
660 ++J;
661 continue;
662 }
663 break;
664 }
665
666 J = std::max(I + 1, J);
667
668 // Print [I,J) on a single line.
669 AddChild(J - I > 1 ? LabelPlurial : LabelSingular, [=]() {
670 for (unsigned X = I; X < J; ++X) {
671 Visit(IdxToChildFun(Value, X), Ty);
672 if (X + 1 != J)
673 OS << ", ";
674 }
675 });
676 I = J;
677 }
678}
679
681 ColorScope Color(OS, ShowColors, ASTDumpColor::ValueKind);
682 switch (Value.getKind()) {
683 case APValue::None:
684 OS << "None";
685 return;
687 OS << "Indeterminate";
688 return;
689 case APValue::Int:
690 OS << "Int ";
691 {
692 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
693 OS << Value.getInt();
694 }
695 return;
696 case APValue::Float:
697 OS << "Float ";
698 {
699 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
700 OS << GetApproxValue(Value.getFloat());
701 }
702 return;
704 OS << "FixedPoint ";
705 {
706 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
707 OS << Value.getFixedPoint();
708 }
709 return;
710 case APValue::Vector: {
711 unsigned VectorLength = Value.getVectorLength();
712 OS << "Vector length=" << VectorLength;
713
714 dumpAPValueChildren(
715 Value, Ty,
716 [](const APValue &Value, unsigned Index) -> const APValue & {
717 return Value.getVectorElt(Index);
718 },
719 VectorLength, "element", "elements");
720 return;
721 }
723 OS << "ComplexInt ";
724 {
725 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
726 OS << Value.getComplexIntReal() << " + " << Value.getComplexIntImag()
727 << 'i';
728 }
729 return;
731 OS << "ComplexFloat ";
732 {
733 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
734 OS << GetApproxValue(Value.getComplexFloatReal()) << " + "
735 << GetApproxValue(Value.getComplexFloatImag()) << 'i';
736 }
737 return;
738 case APValue::LValue: {
739 (void)Context;
740 OS << "LValue Base=";
741 APValue::LValueBase B = Value.getLValueBase();
742 if (B.isNull())
743 OS << "null";
744 else if (const auto *BE = B.dyn_cast<const Expr *>()) {
745 OS << BE->getStmtClassName() << ' ';
746 dumpPointer(BE);
747 } else if (const auto BTI = B.dyn_cast<TypeInfoLValue>()) {
748 OS << "TypeInfoLValue ";
749 ColorScope Color(OS, ShowColors, ASTDumpColor::Type);
750 BTI.print(OS, PrintPolicy);
751 } else if (B.is<DynamicAllocLValue>()) {
752 OS << "DynamicAllocLValue";
753 auto BDA = B.getDynamicAllocType();
754 dumpType(BDA);
755 } else {
756 const auto *VDB = B.get<const ValueDecl *>();
757 OS << VDB->getDeclKindName() << "Decl";
758 dumpPointer(VDB);
759 }
760 OS << ", Null=" << Value.isNullPointer()
761 << ", Offset=" << Value.getLValueOffset().getQuantity()
762 << ", OnePastTheEnd=" << Value.isLValueOnePastTheEnd()
763 << ", HasPath=" << Value.hasLValuePath();
764 if (Value.hasLValuePath()) {
765 OS << ", PathLength=" << Value.getLValuePath().size();
766 OS << ", Path=(";
767 llvm::ListSeparator Sep;
768 for (const auto &PathEntry : Value.getLValuePath()) {
769 // We're printing all entries as array indices because don't have the
770 // type information here to do anything else.
771 OS << Sep << PathEntry.getAsArrayIndex();
772 }
773 OS << ")";
774 }
775 return;
776 }
777 case APValue::Array: {
778 unsigned ArraySize = Value.getArraySize();
779 unsigned NumInitializedElements = Value.getArrayInitializedElts();
780 OS << "Array size=" << ArraySize;
781
782 dumpAPValueChildren(
783 Value, Ty,
784 [](const APValue &Value, unsigned Index) -> const APValue & {
785 return Value.getArrayInitializedElt(Index);
786 },
787 NumInitializedElements, "element", "elements");
788
789 if (Value.hasArrayFiller()) {
790 AddChild("filler", [=] {
791 {
792 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
793 OS << ArraySize - NumInitializedElements << " x ";
794 }
795 Visit(Value.getArrayFiller(), Ty);
796 });
797 }
798
799 return;
800 }
801 case APValue::Struct: {
802 OS << "Struct";
803
804 dumpAPValueChildren(
805 Value, Ty,
806 [](const APValue &Value, unsigned Index) -> const APValue & {
807 return Value.getStructBase(Index);
808 },
809 Value.getStructNumBases(), "base", "bases");
810
811 dumpAPValueChildren(
812 Value, Ty,
813 [](const APValue &Value, unsigned Index) -> const APValue & {
814 return Value.getStructField(Index);
815 },
816 Value.getStructNumFields(), "field", "fields");
817
818 dumpAPValueChildren(
819 Value, Ty,
820 [](const APValue &Value, unsigned Index) -> const APValue & {
821 return Value.getStructVirtualBase(Index);
822 },
823 Value.getStructNumVirtualBases(), "vbase", "vbases");
824 return;
825 }
826 case APValue::Matrix: {
827 unsigned NumRows = Value.getMatrixNumRows();
828 unsigned NumCols = Value.getMatrixNumColumns();
829 OS << "Matrix " << NumRows << "x" << NumCols;
830
831 dumpAPValueChildren(
832 Value, Ty,
833 [](const APValue &Value, unsigned Index) -> const APValue & {
834 return Value.getMatrixElt(Index);
835 },
836 Value.getMatrixNumElements(), "element", "elements");
837 return;
838 }
839 case APValue::Union: {
840 OS << "Union";
841 {
842 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
843 if (const FieldDecl *FD = Value.getUnionField())
844 OS << " ." << *cast<NamedDecl>(FD);
845 }
846 // If the union value is considered to be simple, fold it into the
847 // current line to save some vertical space.
848 const APValue &UnionValue = Value.getUnionValue();
849 if (isSimpleAPValue(UnionValue)) {
850 OS << ' ';
851 Visit(UnionValue, Ty);
852 } else {
853 AddChild([=] { Visit(UnionValue, Ty); });
854 }
855
856 return;
857 }
859 OS << "MemberPointer ";
860 auto Path = Value.getMemberPointerPath();
861 for (const CXXRecordDecl *D : Path) {
862 {
863 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclName);
864 OS << D->getDeclName();
865 }
866 OS << "::";
867 }
868
869 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclName);
870 if (const ValueDecl *MemDecl = Value.getMemberPointerDecl())
871 OS << MemDecl->getDeclName();
872 else
873 OS << "null";
874 return;
875 }
877 OS << "AddrLabelDiff ";
878 OS << "&&" << Value.getAddrLabelDiffLHS()->getLabel()->getName();
879 OS << " - ";
880 OS << "&&" << Value.getAddrLabelDiffRHS()->getLabel()->getName();
881 return;
882 }
883 llvm_unreachable("Unknown APValue kind!");
884}
885
886void TextNodeDumper::dumpPointer(const void *Ptr) {
887 ColorScope Color(OS, ShowColors, ASTDumpColor::Address);
888 OS << ' ' << Ptr;
889}
890
892 if (!SM)
893 return;
894
895 ColorScope Color(OS, ShowColors, ASTDumpColor::Location);
896 SourceLocation SpellingLoc = SM->getSpellingLoc(Loc);
897
898 // The general format we print out is filename:line:col, but we drop pieces
899 // that haven't changed since the last loc printed.
900 PresumedLoc PLoc = SM->getPresumedLoc(SpellingLoc);
901
902 if (PLoc.isInvalid()) {
903 OS << "<invalid sloc>";
904 return;
905 }
906
907 if (strcmp(PLoc.getFilename(), LastLocFilename) != 0) {
908 OS << PLoc.getFilename() << ':' << PLoc.getLine() << ':'
909 << PLoc.getColumn();
910 LastLocFilename = PLoc.getFilename();
911 LastLocLine = PLoc.getLine();
912 } else if (PLoc.getLine() != LastLocLine) {
913 OS << "line" << ':' << PLoc.getLine() << ':' << PLoc.getColumn();
914 LastLocLine = PLoc.getLine();
915 } else {
916 OS << "col" << ':' << PLoc.getColumn();
917 }
918}
919
921 // Can't translate locations if a SourceManager isn't available.
922 if (!SM)
923 return;
924
925 OS << " <";
926 dumpLocation(R.getBegin());
927 if (R.getBegin() != R.getEnd()) {
928 OS << ", ";
929 dumpLocation(R.getEnd());
930 }
931 OS << ">";
932
933 // <t2.c:123:421[blah], t2.c:412:321>
934}
935
937 ColorScope Color(OS, ShowColors, ASTDumpColor::Type);
938
939 SplitQualType T_split = T.split();
940 std::string T_str = QualType::getAsString(T_split, PrintPolicy);
941 OS << "'" << T_str << "'";
942
943 if (Desugar && !T.isNull()) {
944 // If the type is sugared, also dump a (shallow) desugared type when
945 // it is visibly different.
946 SplitQualType D_split = T.getSplitDesugaredType();
947 if (T_split != D_split) {
948 std::string D_str = QualType::getAsString(D_split, PrintPolicy);
949 if (T_str != D_str)
950 OS << ":'" << QualType::getAsString(D_split, PrintPolicy) << "'";
951 }
952 }
953}
954
956 OS << ' ';
958}
959
961 if (!D) {
962 ColorScope Color(OS, ShowColors, ASTDumpColor::Null);
963 OS << "<<<NULL>>>";
964 return;
965 }
966
967 {
968 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
969 OS << D->getDeclKindName();
970 }
971 dumpPointer(D);
972
973 if (const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
974 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclName);
975 if (DeclarationName Name = ND->getDeclName())
976 OS << " '" << Name << '\'';
977 else
978 switch (ND->getKind()) {
979 case Decl::Decomposition:
980 if (auto Bindings = cast<DecompositionDecl>(ND)->bindings();
981 !Bindings.empty())
982 OS << " first_binding '" << Bindings[0]->getDeclName() << '\'';
983 else
984 OS << " no_bindings";
985 break;
986 case Decl::Field: {
987 auto *FD = cast<FieldDecl>(ND);
988 OS << " field_index " << FD->getFieldIndex();
989 break;
990 }
991 case Decl::ParmVar: {
992 auto *PD = cast<ParmVarDecl>(ND);
993 OS << " depth " << PD->getFunctionScopeDepth() << " index "
994 << PD->getFunctionScopeIndex();
995 break;
996 }
997 case Decl::TemplateTypeParm: {
998 auto *TD = cast<TemplateTypeParmDecl>(ND);
999 OS << " depth " << TD->getDepth() << " index " << TD->getIndex();
1000 break;
1001 }
1002 case Decl::NonTypeTemplateParm: {
1003 auto *TD = cast<NonTypeTemplateParmDecl>(ND);
1004 OS << " depth " << TD->getDepth() << " index " << TD->getIndex();
1005 break;
1006 }
1007 default:
1008 // Var, Namespace, (CXX)Record: Nothing else besides source location.
1009 dumpSourceRange(ND->getSourceRange());
1010 break;
1011 }
1012 }
1013
1014 if (const ValueDecl *VD = dyn_cast<ValueDecl>(D))
1015 dumpType(VD->getType());
1016}
1017
1019 if (ND->getDeclName()) {
1020 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclName);
1021 OS << ' ' << ND->getDeclName();
1022 }
1023}
1024
1026 const auto AccessSpelling = getAccessSpelling(AS);
1027 if (AccessSpelling.empty())
1028 return;
1029 OS << AccessSpelling;
1030}
1031
1034 if (auto *BD = dyn_cast<BlockDecl *>(C))
1035 dumpDeclRef(BD, "cleanup");
1036 else if (auto *CLE = dyn_cast<CompoundLiteralExpr *>(C))
1037 AddChild([=] {
1038 OS << "cleanup ";
1039 {
1040 ColorScope Color(OS, ShowColors, ASTDumpColor::Stmt);
1041 OS << CLE->getStmtClassName();
1042 }
1043 dumpPointer(CLE);
1044 });
1045 else
1046 llvm_unreachable("unexpected cleanup type");
1047}
1048
1051 switch (TSK) {
1052 case TSK_Undeclared:
1053 break;
1055 OS << " implicit_instantiation";
1056 break;
1058 OS << " explicit_specialization";
1059 break;
1061 OS << " explicit_instantiation_declaration";
1062 break;
1064 OS << " explicit_instantiation_definition";
1065 break;
1066 }
1067}
1068
1070 if (!NNS)
1071 return;
1072
1073 AddChild([=] {
1074 OS << "NestedNameSpecifier";
1075
1076 switch (NNS.getKind()) {
1078 auto [Namespace, Prefix] = NNS.getAsNamespaceAndPrefix();
1079 OS << " "; // "Namespace" is printed as the decl kind.
1080 dumpBareDeclRef(Namespace);
1082 break;
1083 }
1085 OS << " TypeSpec";
1086 dumpType(QualType(NNS.getAsType(), 0));
1087 break;
1089 OS << " Global";
1090 break;
1092 OS << " Super";
1093 break;
1095 llvm_unreachable("unexpected null nested name specifier");
1096 }
1097 });
1098}
1099
1100void TextNodeDumper::dumpDeclRef(const Decl *D, StringRef Label) {
1101 if (!D)
1102 return;
1103
1104 AddChild([=] {
1105 if (!Label.empty())
1106 OS << Label << ' ';
1107 dumpBareDeclRef(D);
1108 });
1109}
1110
1113 {
1114 llvm::raw_svector_ostream SS(Str);
1115 TA.print(PrintPolicy, SS, /*IncludeType=*/true);
1116 }
1117 OS << " '" << Str << "'";
1118
1119 if (!Context)
1120 return;
1121
1122 if (TemplateArgument CanonTA = Context->getCanonicalTemplateArgument(TA);
1123 !CanonTA.structurallyEquals(TA)) {
1124 llvm::SmallString<128> CanonStr;
1125 {
1126 llvm::raw_svector_ostream SS(CanonStr);
1127 CanonTA.print(PrintPolicy, SS, /*IncludeType=*/true);
1128 }
1129 if (CanonStr != Str)
1130 OS << ":'" << CanonStr << "'";
1131 }
1132}
1133
1134const char *TextNodeDumper::getCommandName(unsigned CommandID) {
1135 if (Traits)
1136 return Traits->getCommandInfo(CommandID)->Name;
1137 const comments::CommandInfo *Info =
1139 if (Info)
1140 return Info->Name;
1141 return "<not a builtin command>";
1142}
1143
1144void TextNodeDumper::printFPOptions(FPOptionsOverride FPO) {
1145#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
1146 if (FPO.has##NAME##Override()) \
1147 OS << " " #NAME "=" << FPO.get##NAME##Override();
1148#include "clang/Basic/FPOptions.def"
1149}
1150
1152 const comments::FullComment *) {
1153 OS << " Text=\"" << C->getText() << "\"";
1154}
1155
1158 OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
1159 switch (C->getRenderKind()) {
1161 OS << " RenderNormal";
1162 break;
1164 OS << " RenderBold";
1165 break;
1167 OS << " RenderMonospaced";
1168 break;
1170 OS << " RenderEmphasized";
1171 break;
1173 OS << " RenderAnchor";
1174 break;
1175 }
1176
1177 for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
1178 OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
1179}
1180
1183 OS << " Name=\"" << C->getTagName() << "\"";
1184 if (C->getNumAttrs() != 0) {
1185 OS << " Attrs: ";
1186 for (unsigned i = 0, e = C->getNumAttrs(); i != e; ++i) {
1187 const comments::HTMLStartTagComment::Attribute &Attr = C->getAttr(i);
1188 OS << " \"" << Attr.Name << "=\"" << Attr.Value << "\"";
1189 }
1190 }
1191 if (C->isSelfClosing())
1192 OS << " SelfClosing";
1193}
1194
1197 OS << " Name=\"" << C->getTagName() << "\"";
1198}
1199
1202 OS << " Name=\"" << getCommandName(C->getCommandID()) << "\"";
1203 for (unsigned i = 0, e = C->getNumArgs(); i != e; ++i)
1204 OS << " Arg[" << i << "]=\"" << C->getArgText(i) << "\"";
1205}
1206
1209 OS << " "
1211
1212 if (C->isDirectionExplicit())
1213 OS << " explicitly";
1214 else
1215 OS << " implicitly";
1216
1217 if (C->hasParamName()) {
1218 if (C->isParamIndexValid())
1219 OS << " Param=\"" << C->getParamName(FC) << "\"";
1220 else
1221 OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
1222 }
1223
1224 if (C->isParamIndexValid() && !C->isVarArgParam())
1225 OS << " ParamIndex=" << C->getParamIndex();
1226}
1227
1230 if (C->hasParamName()) {
1231 if (C->isPositionValid())
1232 OS << " Param=\"" << C->getParamName(FC) << "\"";
1233 else
1234 OS << " Param=\"" << C->getParamNameAsWritten() << "\"";
1235 }
1236
1237 if (C->isPositionValid()) {
1238 OS << " Position=<";
1239 for (unsigned i = 0, e = C->getDepth(); i != e; ++i) {
1240 OS << C->getIndex(i);
1241 if (i != e - 1)
1242 OS << ", ";
1243 }
1244 OS << ">";
1245 }
1246}
1247
1250 OS << " Name=\"" << getCommandName(C->getCommandID())
1251 << "\""
1252 " CloseName=\""
1253 << C->getCloseName() << "\"";
1254}
1255
1258 const comments::FullComment *) {
1259 OS << " Text=\"" << C->getText() << "\"";
1260}
1261
1264 OS << " Text=\"" << C->getText() << "\"";
1265}
1266
1268 OS << " null";
1269}
1270
1272 OS << " type";
1274}
1275
1277 const TemplateArgument &TA) {
1278 OS << " decl";
1280 dumpDeclRef(TA.getAsDecl());
1281}
1282
1284 OS << " nullptr";
1286}
1287
1289 OS << " integral";
1291}
1292
1294 const TemplateArgument &TA) {
1295 OS << " structural value";
1297}
1298
1300 AddChild(Label, [=] {
1301 {
1303 {
1304 llvm::raw_svector_ostream SS(Str);
1305 TN.print(SS, PrintPolicy);
1306 }
1307 OS << "'" << Str << "'";
1308
1309 if (Context) {
1310 if (TemplateName CanonTN = Context->getCanonicalTemplateName(TN);
1311 CanonTN != TN) {
1312 llvm::SmallString<128> CanonStr;
1313 {
1314 llvm::raw_svector_ostream SS(CanonStr);
1315 CanonTN.print(SS, PrintPolicy);
1316 }
1317 if (CanonStr != Str)
1318 OS << ":'" << CanonStr << "'";
1319 }
1320 }
1321 }
1323 });
1324}
1325
1327 switch (TN.getKind()) {
1329 AddChild([=] { Visit(TN.getAsTemplateDecl()); });
1330 return;
1332 const UsingShadowDecl *USD = TN.getAsUsingShadowDecl();
1333 AddChild([=] { Visit(USD); });
1334 AddChild("target", [=] { Visit(USD->getTargetDecl()); });
1335 return;
1336 }
1338 OS << " qualified";
1340 if (QTN->hasTemplateKeyword())
1341 OS << " keyword";
1344 return;
1345 }
1347 OS << " dependent";
1350 return;
1351 }
1353 OS << " subst";
1356 OS << " index " << STS->getIndex();
1358 OS << " pack_index " << *PackIndex;
1359 if (STS->getFinal())
1360 OS << " final";
1361 if (const TemplateTemplateParmDecl *P = STS->getParameter())
1362 AddChild("parameter", [=] { Visit(P); });
1363 dumpDeclRef(STS->getAssociatedDecl(), "associated");
1364 dumpTemplateName(STS->getReplacement(), "replacement");
1365 return;
1366 }
1368 OS << " deduced";
1370 dumpTemplateName(DTS->getUnderlying(), "underlying");
1371 AddChild("defaults", [=] {
1372 auto [StartPos, Args] = DTS->getDefaultArguments();
1373 OS << " start " << StartPos;
1374 for (const TemplateArgument &Arg : Args)
1375 AddChild([=] { Visit(Arg, SourceRange()); });
1376 });
1377 return;
1378 }
1379 // FIXME: Implement these.
1381 OS << " overloaded";
1382 return;
1384 OS << " assumed";
1385 return;
1387 OS << " subst_pack";
1388 return;
1389 }
1390 llvm_unreachable("Unexpected TemplateName Kind");
1391}
1392
1398
1405
1407 const TemplateArgument &TA) {
1408 OS << " expr";
1409 if (TA.isCanonicalExpr())
1410 OS << " canonical";
1412}
1413
1415 OS << " pack";
1417}
1418
1419static void dumpBasePath(raw_ostream &OS, const CastExpr *Node) {
1420 if (Node->path_empty())
1421 return;
1422
1423 OS << " (";
1424 bool First = true;
1426 E = Node->path_end();
1427 I != E; ++I) {
1428 const CXXBaseSpecifier *Base = *I;
1429 if (!First)
1430 OS << " -> ";
1431
1432 const auto *RD = cast<CXXRecordDecl>(
1433 Base->getType()->castAsCanonical<RecordType>()->getDecl());
1434
1435 if (Base->isVirtual())
1436 OS << "virtual ";
1437 OS << RD->getName();
1438 First = false;
1439 }
1440
1441 OS << ')';
1442}
1443
1445 switch (ND->getFormalLinkage()) {
1446 case Linkage::None:
1447 // A lot of declarations have no linkage, so we only dump linkage if there
1448 // is one.
1449 break;
1450 case Linkage::Internal:
1451 OS << " internal-linkage";
1452 break;
1453 case Linkage::External:
1454 OS << " external-linkage";
1455 break;
1456 case Linkage::Module:
1457 OS << " module-linkage";
1458 break;
1459 case Linkage::Invalid:
1460 llvm_unreachable("Linkage hasn't been computed!");
1463 llvm_unreachable("Not a formal linkage!");
1464 }
1465}
1466
1468 if (!Node->hasLabelTarget())
1469 return;
1470
1471 OS << " '" << Node->getLabelDecl()->getIdentifier()->getName() << "' (";
1472
1473 auto *Target = Node->getNamedLoopOrSwitch();
1474 if (!Target) {
1475 ColorScope Color(OS, ShowColors, ASTDumpColor::Null);
1476 OS << "<<<NULL>>>";
1477 } else {
1478 {
1479 ColorScope Color(OS, ShowColors, ASTDumpColor::Stmt);
1480 OS << Target->getStmtClassName();
1481 }
1483 }
1484 OS << ")";
1485}
1486
1488 if (Node->hasInitStorage())
1489 OS << " has_init";
1490 if (Node->hasVarStorage())
1491 OS << " has_var";
1492 if (Node->hasElseStorage())
1493 OS << " has_else";
1494 if (Node->isConstexpr())
1495 OS << " constexpr";
1496 if (Node->isConsteval()) {
1497 OS << " ";
1498 if (Node->isNegatedConsteval())
1499 OS << "!";
1500 OS << "consteval";
1501 }
1502}
1503
1505 if (Node->hasInitStorage())
1506 OS << " has_init";
1507 if (Node->hasVarStorage())
1508 OS << " has_var";
1509}
1510
1512 if (Node->hasVarStorage())
1513 OS << " has_var";
1514}
1515
1517 OS << " '" << Node->getName() << "'";
1518 if (Node->isSideEntry())
1519 OS << " side_entry";
1520}
1521
1523 OS << " '" << Node->getLabel()->getName() << "'";
1524 dumpPointer(Node->getLabel());
1525}
1526
1528 if (Node->caseStmtIsGNURange())
1529 OS << " gnu_range";
1530}
1531
1533 if (const VarDecl *Cand = Node->getNRVOCandidate()) {
1534 OS << " nrvo_candidate(";
1535 dumpBareDeclRef(Cand);
1536 OS << ")";
1537 }
1538}
1539
1541 if (Node->isImplicit())
1542 OS << " implicit";
1543}
1544
1546 if (Node->isImplicit())
1547 OS << " implicit";
1548}
1549
1551 const CXXExpansionStmtPattern *Node) {
1552 switch (Node->getKind()) {
1554 OS << " enumerating";
1555 return;
1557 OS << " iterating";
1558 return;
1560 OS << " destructuring";
1561 return;
1563 OS << " dependent";
1564 return;
1565 }
1566
1567 llvm_unreachable("invalid expansion statement kind");
1568}
1569
1571 const CXXExpansionStmtInstantiation *Node) {
1573 OS << " applies_lifetime_extension";
1574}
1575
1577 if (Node->hasAPValueResult())
1578 AddChild("value",
1579 [=] { Visit(Node->getAPValueResult(), Node->getType()); });
1580}
1581
1583 if (Node->usesADL())
1584 OS << " adl";
1585 if (Node->hasStoredFPFeatures())
1586 printFPOptions(Node->getFPFeatures());
1587}
1588
1590 const char *OperatorSpelling = clang::getOperatorSpelling(Node->getOperator());
1591 if (OperatorSpelling)
1592 OS << " '" << OperatorSpelling << "'";
1593
1594 VisitCallExpr(Node);
1595}
1596
1598 OS << " <";
1599 {
1600 ColorScope Color(OS, ShowColors, ASTDumpColor::Cast);
1601 OS << Node->getCastKindName();
1602 }
1603 dumpBasePath(OS, Node);
1604 OS << ">";
1605 if (Node->hasStoredFPFeatures())
1606 printFPOptions(Node->getFPFeatures());
1607}
1608
1610 VisitCastExpr(Node);
1611 if (Node->isPartOfExplicitCast())
1612 OS << " part_of_explicit_cast";
1613}
1614
1616 OS << " ";
1617 dumpBareDeclRef(Node->getDecl());
1619 if (Node->getDecl() != Node->getFoundDecl()) {
1620 OS << " (";
1622 OS << ")";
1623 }
1624 switch (Node->isNonOdrUse()) {
1625 case NOUR_None: break;
1626 case NOUR_Unevaluated: OS << " non_odr_use_unevaluated"; break;
1627 case NOUR_Constant: OS << " non_odr_use_constant"; break;
1628 case NOUR_Discarded: OS << " non_odr_use_discarded"; break;
1629 }
1631 OS << " dependent_capture";
1632 else if (Node->refersToEnclosingVariableOrCapture())
1633 OS << " refers_to_enclosing_variable_or_capture";
1634
1635 if (Node->isImmediateEscalating())
1636 OS << " immediate-escalating";
1637}
1638
1644
1646 const UnresolvedLookupExpr *Node) {
1647 OS << " (";
1648 if (!Node->requiresADL())
1649 OS << "no ";
1650 OS << "ADL) = '" << Node->getName() << '\'';
1651
1653 E = Node->decls_end();
1654 if (I == E)
1655 OS << " empty";
1656 for (; I != E; ++I)
1657 dumpPointer(*I);
1658}
1659
1661 {
1662 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
1663 OS << " " << Node->getDecl()->getDeclKindName() << "Decl";
1664 }
1665 OS << "='" << *Node->getDecl() << "'";
1666 dumpPointer(Node->getDecl());
1667 if (Node->isFreeIvar())
1668 OS << " isFreeIvar";
1669}
1670
1675
1679
1681 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
1682 OS << " " << Node->getValue();
1683}
1684
1686 bool isSigned = Node->getType()->isSignedIntegerType();
1687 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
1688 OS << " " << toString(Node->getValue(), 10, isSigned);
1689}
1690
1692 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
1693 OS << " " << Node->getValueAsString(/*Radix=*/10);
1694}
1695
1697 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
1698 OS << " " << Node->getValueAsApproximateDouble();
1699}
1700
1702 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
1703 OS << " ";
1704 Str->outputString(OS);
1705}
1706
1708 if (auto *Field = ILE->getInitializedFieldInUnion()) {
1709 OS << " field ";
1710 dumpBareDeclRef(Field);
1711 }
1712 OS << ' ' << (ILE->isExplicit() ? "explicit" : "implicit");
1713}
1714
1716 if (E->isResultDependent())
1717 OS << " result_dependent";
1718}
1719
1721 OS << " " << (Node->isPostfix() ? "postfix" : "prefix") << " '"
1722 << UnaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
1723 if (!Node->canOverflow())
1724 OS << " cannot overflow";
1725 if (Node->hasStoredFPFeatures())
1726 printFPOptions(Node->getStoredFPFeatures());
1727}
1728
1730 const UnaryExprOrTypeTraitExpr *Node) {
1731 OS << " " << getTraitSpelling(Node->getKind());
1732
1733 if (Node->isArgumentType())
1734 dumpType(Node->getArgumentType());
1735}
1736
1738 OS << " " << (Node->isArrow() ? "->" : ".") << *Node->getMemberDecl();
1739 dumpPointer(Node->getMemberDecl());
1741 switch (Node->isNonOdrUse()) {
1742 case NOUR_None: break;
1743 case NOUR_Unevaluated: OS << " non_odr_use_unevaluated"; break;
1744 case NOUR_Constant: OS << " non_odr_use_constant"; break;
1745 case NOUR_Discarded: OS << " non_odr_use_discarded"; break;
1746 }
1747}
1748
1750 const ExtVectorElementExpr *Node) {
1751 OS << " " << Node->getAccessor().getNameStart();
1752}
1753
1755 OS << " " << Node->getAccessor().getNameStart();
1756}
1757
1759 OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode()) << "'";
1760 if (Node->hasStoredFPFeatures())
1761 printFPOptions(Node->getStoredFPFeatures());
1762}
1763
1765 const CompoundAssignOperator *Node) {
1766 OS << " '" << BinaryOperator::getOpcodeStr(Node->getOpcode())
1767 << "' ComputeLHSTy=";
1769 OS << " ComputeResultTy=";
1771 if (Node->hasStoredFPFeatures())
1772 printFPOptions(Node->getStoredFPFeatures());
1773}
1774
1776 OS << " " << Node->getLabel()->getName();
1777 dumpPointer(Node->getLabel());
1778}
1779
1781 OS << " " << Node->getCastName() << "<"
1782 << Node->getTypeAsWritten().getAsString() << ">"
1783 << " <" << Node->getCastKindName();
1784 dumpBasePath(OS, Node);
1785 OS << ">";
1786}
1787
1789 OS << " " << (Node->getValue() ? "true" : "false");
1790}
1791
1793 if (Node->isImplicit())
1794 OS << " implicit";
1796 OS << " dependent_capture";
1797 OS << " this";
1798}
1799
1801 const CXXFunctionalCastExpr *Node) {
1802 OS << " functional cast to " << Node->getTypeAsWritten().getAsString() << " <"
1803 << Node->getCastKindName() << ">";
1804 if (Node->hasStoredFPFeatures())
1805 printFPOptions(Node->getFPFeatures());
1806}
1807
1810 if (Node->hasStoredFPFeatures())
1811 printFPOptions(Node->getFPFeatures());
1812}
1813
1815 const CXXUnresolvedConstructExpr *Node) {
1816 dumpType(Node->getTypeAsWritten());
1817 if (Node->isListInitialization())
1818 OS << " list";
1819}
1820
1822 CXXConstructorDecl *Ctor = Node->getConstructor();
1823 dumpType(Ctor->getType());
1824 if (Node->isElidable())
1825 OS << " elidable";
1826 if (Node->isListInitialization())
1827 OS << " list";
1828 if (Node->isStdInitListInitialization())
1829 OS << " std::initializer_list";
1830 if (Node->requiresZeroInitialization())
1831 OS << " zeroing";
1832 if (Node->isImmediateEscalating())
1833 OS << " immediate-escalating";
1834}
1835
1837 const CXXBindTemporaryExpr *Node) {
1838 OS << " (CXXTemporary";
1839 dumpPointer(Node);
1840 OS << ")";
1841}
1842
1844 if (Node->isGlobalNew())
1845 OS << " global";
1846 if (Node->isArray())
1847 OS << " array";
1848 if (Node->getOperatorNew()) {
1849 OS << ' ';
1851 }
1852 // We could dump the deallocation function used in case of error, but it's
1853 // usually not that interesting.
1854}
1855
1857 if (Node->isGlobalDelete())
1858 OS << " global";
1859 if (Node->isArrayForm())
1860 OS << " array";
1861 if (Node->getOperatorDelete()) {
1862 OS << ' ';
1864 }
1865}
1866
1868 OS << " " << getTraitSpelling(Node->getTrait());
1869}
1870
1872 OS << " " << getTraitSpelling(Node->getTrait());
1873}
1874
1878
1880 if (Node->hasRewrittenInit())
1881 OS << " has rewritten init";
1882}
1883
1885 if (Node->hasRewrittenInit())
1886 OS << " has rewritten init";
1887}
1888
1890 const MaterializeTemporaryExpr *Node) {
1891 if (const ValueDecl *VD = Node->getExtendingDecl()) {
1892 OS << " extended by ";
1893 dumpBareDeclRef(VD);
1894 }
1895}
1896
1898 for (unsigned i = 0, e = Node->getNumObjects(); i != e; ++i)
1899 dumpCleanupObject(Node->getObject(i));
1900}
1901
1903 dumpPointer(Node->getPack());
1904 dumpName(Node->getPack());
1905}
1906
1908 const CXXDependentScopeMemberExpr *Node) {
1909 OS << " " << (Node->isArrow() ? "->" : ".") << Node->getMember();
1910}
1911
1913 OS << " selector=";
1914 Node->getSelector().print(OS);
1915 switch (Node->getReceiverKind()) {
1917 break;
1918
1920 OS << " class=";
1922 break;
1923
1925 OS << " super (instance)";
1926 break;
1927
1929 OS << " super (class)";
1930 break;
1931 }
1932}
1933
1935 if (auto *BoxingMethod = Node->getBoxingMethod()) {
1936 OS << " selector=";
1937 BoxingMethod->getSelector().print(OS);
1938 }
1939}
1940
1942 if (!Node->getCatchParamDecl())
1943 OS << " catch all";
1944}
1945
1949
1951 OS << " ";
1952 Node->getSelector().print(OS);
1953}
1954
1956 OS << ' ' << *Node->getProtocol();
1957}
1958
1960 if (Node->isImplicitProperty()) {
1961 OS << " Kind=MethodRef Getter=\"";
1962 if (Node->getImplicitPropertyGetter())
1964 else
1965 OS << "(null)";
1966
1967 OS << "\" Setter=\"";
1968 if (ObjCMethodDecl *Setter = Node->getImplicitPropertySetter())
1969 Setter->getSelector().print(OS);
1970 else
1971 OS << "(null)";
1972 OS << "\"";
1973 } else {
1974 OS << " Kind=PropertyRef Property=\"" << *Node->getExplicitProperty()
1975 << '"';
1976 }
1977
1978 if (Node->isSuperReceiver())
1979 OS << " super";
1980
1981 OS << " Messaging=";
1982 if (Node->isMessagingGetter() && Node->isMessagingSetter())
1983 OS << "Getter&Setter";
1984 else if (Node->isMessagingGetter())
1985 OS << "Getter";
1986 else if (Node->isMessagingSetter())
1987 OS << "Setter";
1988}
1989
1991 const ObjCSubscriptRefExpr *Node) {
1992 if (Node->isArraySubscriptRefExpr())
1993 OS << " Kind=ArraySubscript GetterForArray=\"";
1994 else
1995 OS << " Kind=DictionarySubscript GetterForDictionary=\"";
1996 if (Node->getAtIndexMethodDecl())
1997 Node->getAtIndexMethodDecl()->getSelector().print(OS);
1998 else
1999 OS << "(null)";
2000
2001 if (Node->isArraySubscriptRefExpr())
2002 OS << "\" SetterForArray=\"";
2003 else
2004 OS << "\" SetterForDictionary=\"";
2005 if (Node->setAtIndexMethodDecl())
2006 Node->setAtIndexMethodDecl()->getSelector().print(OS);
2007 else
2008 OS << "(null)";
2009}
2010
2012 OS << " " << (Node->getValue() ? "__objc_yes" : "__objc_no");
2013}
2014
2016 OS << " ";
2017 for (unsigned I = 0, E = Node->numOfIterators(); I < E; ++I) {
2018 Visit(Node->getIteratorDecl(I));
2019 OS << " = ";
2020 const OMPIteratorExpr::IteratorRange Range = Node->getIteratorRange(I);
2021 OS << " begin ";
2022 Visit(Range.Begin);
2023 OS << " end ";
2024 Visit(Range.End);
2025 if (Range.Step) {
2026 OS << " step ";
2027 Visit(Range.Step);
2028 }
2029 }
2030}
2031
2037
2039 const RequiresExpr *Node) {
2040 if (!Node->isValueDependent())
2041 OS << (Node->isSatisfied() ? " satisfied" : " unsatisfied");
2042}
2043
2045 if (T->isSpelledAsLValue())
2046 OS << " written as lvalue reference";
2047}
2048
2050 switch (T->getSizeModifier()) {
2052 break;
2054 OS << " static";
2055 break;
2057 OS << " *";
2058 break;
2059 }
2060 OS << " " << T->getIndexTypeQualifiers().getAsString();
2061}
2062
2064 OS << " " << T->getSize();
2066}
2067
2071
2076
2079 OS << " ";
2080 dumpLocation(T->getAttributeLoc());
2081}
2082
2084 switch (T->getVectorKind()) {
2086 break;
2088 OS << " altivec";
2089 break;
2091 OS << " altivec pixel";
2092 break;
2094 OS << " altivec bool";
2095 break;
2096 case VectorKind::Neon:
2097 OS << " neon";
2098 break;
2100 OS << " neon poly";
2101 break;
2103 OS << " fixed-length sve data vector";
2104 break;
2106 OS << " fixed-length sve predicate vector";
2107 break;
2109 OS << " fixed-length rvv data vector";
2110 break;
2115 OS << " fixed-length rvv mask vector";
2116 break;
2117 }
2118 OS << " " << T->getNumElements();
2119}
2120
2122 auto EI = T->getExtInfo();
2123 if (EI.getNoReturn())
2124 OS << " noreturn";
2125 if (EI.getProducesResult())
2126 OS << " produces_result";
2127 if (EI.getHasRegParm())
2128 OS << " regparm " << EI.getRegParm();
2129 OS << " " << FunctionType::getNameForCallConv(EI.getCC());
2130}
2131
2133 auto EPI = T->getExtProtoInfo();
2134 if (EPI.HasTrailingReturn)
2135 OS << " trailing_return";
2136 if (T->isConst())
2137 OS << " const";
2138 if (T->isVolatile())
2139 OS << " volatile";
2140 if (T->isRestrict())
2141 OS << " restrict";
2142 if (T->getExtProtoInfo().Variadic)
2143 OS << " variadic";
2144 switch (EPI.RefQualifier) {
2145 case RQ_None:
2146 break;
2147 case RQ_LValue:
2148 OS << " &";
2149 break;
2150 case RQ_RValue:
2151 OS << " &&";
2152 break;
2153 }
2154
2155 switch (EPI.ExceptionSpec.Type) {
2156 case EST_None:
2157 break;
2158 case EST_DynamicNone:
2159 OS << " exceptionspec_dynamic_none";
2160 break;
2161 case EST_Dynamic:
2162 OS << " exceptionspec_dynamic";
2163 break;
2164 case EST_MSAny:
2165 OS << " exceptionspec_ms_any";
2166 break;
2167 case EST_NoThrow:
2168 OS << " exceptionspec_nothrow";
2169 break;
2170 case EST_BasicNoexcept:
2171 OS << " exceptionspec_basic_noexcept";
2172 break;
2174 OS << " exceptionspec_dependent_noexcept";
2175 break;
2176 case EST_NoexceptFalse:
2177 OS << " exceptionspec_noexcept_false";
2178 break;
2179 case EST_NoexceptTrue:
2180 OS << " exceptionspec_noexcept_true";
2181 break;
2182 case EST_Unevaluated:
2183 OS << " exceptionspec_unevaluated";
2184 break;
2185 case EST_Uninstantiated:
2186 OS << " exceptionspec_uninstantiated";
2187 break;
2188 case EST_Unparsed:
2189 OS << " exceptionspec_unparsed";
2190 break;
2191 }
2192 if (!EPI.ExceptionSpec.Exceptions.empty()) {
2193 AddChild([=] {
2194 OS << "Exceptions:";
2195 for (unsigned I = 0, N = EPI.ExceptionSpec.Exceptions.size(); I != N;
2196 ++I) {
2197 if (I)
2198 OS << ",";
2199 dumpType(EPI.ExceptionSpec.Exceptions[I]);
2200 }
2201 });
2202 }
2203 if (EPI.ExceptionSpec.NoexceptExpr) {
2204 AddChild([=] {
2205 OS << "NoexceptExpr: ";
2206 Visit(EPI.ExceptionSpec.NoexceptExpr);
2207 });
2208 }
2209 dumpDeclRef(EPI.ExceptionSpec.SourceDecl, "ExceptionSourceDecl");
2210 dumpDeclRef(EPI.ExceptionSpec.SourceTemplate, "ExceptionSourceTemplate");
2211
2212 // FIXME: Consumed parameters.
2214}
2215
2217 if (ElaboratedTypeKeyword K = T->getKeyword();
2219 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2220 dumpNestedNameSpecifier(T->getQualifier());
2221 dumpDeclRef(T->getDecl());
2222}
2223
2225 if (ElaboratedTypeKeyword K = T->getKeyword();
2227 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2228 dumpNestedNameSpecifier(T->getQualifier());
2229 dumpDeclRef(T->getDecl());
2230 dumpType(T->desugar());
2231}
2232
2234 if (ElaboratedTypeKeyword K = T->getKeyword();
2236 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2237 dumpNestedNameSpecifier(T->getQualifier());
2238 dumpDeclRef(T->getDecl());
2239 if (!T->typeMatchesDecl()) {
2240 OS << " divergent";
2241 dumpType(T->desugar());
2242 }
2243}
2244
2245void TextNodeDumper::VisitUnaryTransformType(const UnaryTransformType *T) {
2246 switch (T->getUTTKind()) {
2247#define TRANSFORM_TYPE_TRAIT_DEF(Enum, Trait) \
2248 case UnaryTransformType::Enum: \
2249 OS << " " #Trait; \
2250 break;
2251#include "clang/Basic/BuiltinTraits.inc"
2252 }
2253}
2254
2255void TextNodeDumper::VisitTagType(const TagType *T) {
2256 if (T->isCanonicalUnqualified())
2257 OS << " canonical";
2258 if (T->isTagOwned())
2259 OS << " owns_tag";
2260 if (T->isInjected())
2261 OS << " injected";
2262 if (ElaboratedTypeKeyword K = T->getKeyword();
2264 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2265 dumpNestedNameSpecifier(T->getQualifier());
2266 dumpDeclRef(T->getDecl());
2267}
2268
2269void TextNodeDumper::VisitTemplateTypeParmType(const TemplateTypeParmType *T) {
2270 OS << " depth " << T->getDepth() << " index " << T->getIndex();
2271 if (T->isParameterPack())
2272 OS << " pack";
2273 dumpDeclRef(T->getDecl());
2274}
2275
2277 const SubstTemplateTypeParmType *T) {
2278 dumpDeclRef(T->getAssociatedDecl());
2279 VisitTemplateTypeParmDecl(T->getReplacedParameter());
2280 if (auto PackIndex = T->getPackIndex())
2281 OS << " pack_index " << *PackIndex;
2282 if (T->getFinal())
2283 OS << " final";
2284}
2285
2287 const SubstTemplateTypeParmPackType *T) {
2288 dumpDeclRef(T->getAssociatedDecl());
2289 VisitTemplateTypeParmDecl(T->getReplacedParameter());
2290}
2291
2292void TextNodeDumper::VisitDeducedType(const DeducedType *T) {
2293 switch (T->getDeducedKind()) {
2295 OS << " undeduced";
2296 break;
2298 break;
2300 OS << " deduced-as-dependent";
2301 break;
2303 OS << " deduced-as-pack";
2304 break;
2305 }
2306}
2307
2308void TextNodeDumper::VisitAutoType(const AutoType *T) {
2310 // Not necessary to dump the keyword since it's spelled plainly in the printed
2311 // type anyway.
2312 if (T->isConstrained())
2313 dumpDeclRef(T->getTypeConstraintConcept());
2314}
2315
2317 const DeducedTemplateSpecializationType *T) {
2319 dumpTemplateName(T->getTemplateName(), "name");
2320}
2321
2323 const TemplateSpecializationType *T) {
2324 if (T->isTypeAlias())
2325 OS << " alias";
2326 if (ElaboratedTypeKeyword K = T->getKeyword();
2328 OS << ' ' << TypeWithKeyword::getKeywordName(K);
2329 dumpTemplateName(T->getTemplateName(), "name");
2330}
2331
2333 const InjectedClassNameType *T) {
2334 dumpDeclRef(T->getDecl());
2335}
2336
2340
2341void TextNodeDumper::VisitPackExpansionType(const PackExpansionType *T) {
2342 if (auto N = T->getNumExpansions())
2343 OS << " expansions " << *N;
2344}
2345
2347 // By default, add extra Type details with no extra loc info.
2349}
2350// FIXME: override behavior for TypeLocs that have interesting location
2351// information, such as the qualifier in ElaboratedTypeLoc.
2352
2354
2356 dumpName(D);
2358 if (D->isModulePrivate())
2359 OS << " __module_private__";
2360
2361 const TagDecl *TD = D->getUnderlyingType()->getAsTagDecl();
2362 if (TD && TD->getTypedefNameForAnonDecl()) {
2364 }
2365}
2366
2368 if (D->isScoped()) {
2369 if (D->isScopedUsingClassTag())
2370 OS << " class";
2371 else
2372 OS << " struct";
2373 }
2374 dumpName(D);
2375 if (D->isModulePrivate())
2376 OS << " __module_private__";
2377 if (D->isFixed())
2379
2380 if (const auto *Instance = D->getTemplateInstantiationPattern()) {
2381 OS << " instantiated_from";
2382 dumpPointer(Instance);
2383 }
2384
2386}
2387
2389 OS << ' ' << D->getKindName();
2390 dumpName(D);
2391 if (D->isModulePrivate())
2392 OS << " __module_private__";
2393 if (D->isCompleteDefinition())
2394 OS << " definition";
2395
2396 if (!D->isImplicit() && !D->getDescribedTemplate()) {
2398 }
2399}
2400
2405
2407 dumpName(D);
2408 dumpType(D->getType());
2409
2410 for (const auto *Child : D->chain())
2411 dumpDeclRef(Child);
2412}
2413
2415 dumpName(D);
2416 dumpType(D->getType());
2418
2419 StorageClass SC = D->getStorageClass();
2420 if (SC != SC_None)
2422 if (D->isInlineSpecified())
2423 OS << " inline";
2424 if (D->isVirtualAsWritten())
2425 OS << " virtual";
2426 if (D->isModulePrivate())
2427 OS << " __module_private__";
2428
2429 if (D->isPureVirtual())
2430 OS << " pure";
2431 if (D->isDefaulted()) {
2432 OS << " default";
2433 if (D->isDeleted())
2434 OS << "_delete";
2435 }
2436 if (D->isDeletedAsWritten())
2437 OS << " delete";
2438 if (D->isTrivial())
2439 OS << " trivial";
2440
2441 if (const StringLiteral *M = D->getDeletedMessage())
2442 AddChild("delete message", [=] { Visit(M); });
2443
2445 OS << (isa<CXXDestructorDecl>(D) ? " not_selected" : " ineligible");
2446
2447 if (const auto *FPT = D->getType()->getAs<FunctionProtoType>()) {
2448 FunctionProtoType::ExtProtoInfo EPI = FPT->getExtProtoInfo();
2449 switch (EPI.ExceptionSpec.Type) {
2450 default:
2451 break;
2452 case EST_Unevaluated:
2453 OS << " noexcept-unevaluated " << EPI.ExceptionSpec.SourceDecl;
2454 break;
2455 case EST_Uninstantiated:
2456 OS << " noexcept-uninstantiated " << EPI.ExceptionSpec.SourceTemplate;
2457 break;
2458 }
2459 }
2460
2461 if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) {
2462 if (MD->size_overridden_methods() != 0) {
2463 auto dumpOverride = [=](const CXXMethodDecl *D) {
2464 SplitQualType T_split = D->getType().split();
2465 OS << D << " " << D->getParent()->getName() << "::" << D->getDeclName()
2466 << " '" << QualType::getAsString(T_split, PrintPolicy) << "'";
2467 };
2468
2469 AddChild([=] {
2470 auto Overrides = MD->overridden_methods();
2471 OS << "Overrides: [ ";
2472 dumpOverride(*Overrides.begin());
2473 for (const auto *Override : llvm::drop_begin(Overrides)) {
2474 OS << ", ";
2475 dumpOverride(Override);
2476 }
2477 OS << " ]";
2478 });
2479 }
2480 }
2481
2482 if (!D->isInlineSpecified() && D->isInlined()) {
2483 OS << " implicit-inline";
2484 }
2485 // Since NumParams comes from the FunctionProtoType of the FunctionDecl and
2486 // the Params are set later, it is possible for a dump during debugging to
2487 // encounter a FunctionDecl that has been created but hasn't been assigned
2488 // ParmVarDecls yet.
2489 if (!D->param_empty() && !D->param_begin())
2490 OS << " <<<NULL params x " << D->getNumParams() << ">>>";
2491
2492 if (const auto *Instance = D->getTemplateInstantiationPattern()) {
2493 OS << " instantiated_from";
2494 dumpPointer(Instance);
2495 }
2496
2499 }
2500}
2501
2503 const CXXDeductionGuideDecl *D) {
2505 switch (D->getDeductionCandidateKind()) {
2508 return;
2510 OS << " aggregate ";
2511 break;
2512 }
2513}
2514
2517 OS << " extended by ";
2519 OS << " mangling ";
2520 {
2521 ColorScope Color(OS, ShowColors, ASTDumpColor::Value);
2522 OS << D->getManglingNumber();
2523 }
2524}
2525
2527 dumpName(D);
2528 dumpType(D->getType());
2529 if (D->isMutable())
2530 OS << " mutable";
2531 if (D->isModulePrivate())
2532 OS << " __module_private__";
2533}
2534
2537 dumpName(D);
2538 if (const auto *P = dyn_cast<ParmVarDecl>(D);
2539 P && P->isExplicitObjectParameter())
2540 OS << " this";
2541
2542 dumpType(D->getType());
2544 StorageClass SC = D->getStorageClass();
2545 if (SC != SC_None)
2547 switch (D->getTLSKind()) {
2548 case VarDecl::TLS_None:
2549 break;
2551 OS << " tls";
2552 break;
2554 OS << " tls_dynamic";
2555 break;
2556 }
2557 if (D->isModulePrivate())
2558 OS << " __module_private__";
2559 if (D->isNRVOVariable())
2560 OS << " nrvo";
2561 if (D->isInline())
2562 OS << " inline";
2563 if (D->isConstexpr())
2564 OS << " constexpr";
2565 if (D->hasInit()) {
2566 switch (D->getInitStyle()) {
2567 case VarDecl::CInit:
2568 OS << " cinit";
2569 break;
2570 case VarDecl::CallInit:
2571 OS << " callinit";
2572 break;
2573 case VarDecl::ListInit:
2574 OS << " listinit";
2575 break;
2577 OS << " parenlistinit";
2578 }
2579 }
2580 if (D->needsDestruction(D->getASTContext()))
2581 OS << " destroyed";
2582 if (D->isParameterPack())
2583 OS << " pack";
2584
2585 if (const auto *Instance = D->getTemplateInstantiationPattern()) {
2586 OS << " instantiated_from";
2587 dumpPointer(Instance);
2588 }
2589
2590 if (D->hasInit()) {
2591 const Expr *E = D->getInit();
2592 // Only dump the value of constexpr VarDecls for now.
2593 if (E && !E->isValueDependent() && D->isConstexpr() &&
2594 !D->getType()->isDependentType()) {
2595 const APValue *Value = D->evaluateValue();
2596 if (Value)
2597 AddChild("value", [=] { Visit(*Value, E->getType()); });
2598 }
2599 }
2600
2601 if (!D->getDescribedVarTemplate()) {
2603 }
2604}
2605
2607 dumpName(D);
2608 dumpType(D->getType());
2609}
2610
2612 if (D->isNothrow())
2613 OS << " nothrow";
2614}
2615
2617 OS << ' ' << D->getImportedModule()->getFullModuleName();
2618
2619 for (Decl *InitD :
2621 dumpDeclRef(InitD, "initializer");
2622}
2623
2625 OS << ' ';
2626 switch (D->getCommentKind()) {
2627 case PCK_Unknown:
2628 llvm_unreachable("unexpected pragma comment kind");
2629 case PCK_Compiler:
2630 OS << "compiler";
2631 break;
2632 case PCK_ExeStr:
2633 OS << "exestr";
2634 break;
2635 case PCK_Lib:
2636 OS << "lib";
2637 break;
2638 case PCK_Linker:
2639 OS << "linker";
2640 break;
2641 case PCK_User:
2642 OS << "user";
2643 break;
2644 case PCK_Copyright:
2645 OS << "copyright";
2646 break;
2647 }
2648 StringRef Arg = D->getArg();
2649 if (!Arg.empty())
2650 OS << " \"" << Arg << "\"";
2651}
2652
2654 const PragmaDetectMismatchDecl *D) {
2655 OS << " \"" << D->getName() << "\" \"" << D->getValue() << "\"";
2656}
2657
2659 const OMPExecutableDirective *D) {
2660 if (D->isStandaloneDirective())
2661 OS << " openmp_standalone_directive";
2662}
2663
2665 const OMPDeclareReductionDecl *D) {
2666 dumpName(D);
2667 dumpType(D->getType());
2668 OS << " combiner";
2670 if (const auto *Initializer = D->getInitializer()) {
2671 OS << " initializer";
2673 switch (D->getInitializerKind()) {
2675 OS << " omp_priv = ";
2676 break;
2678 OS << " omp_priv ()";
2679 break;
2681 break;
2682 }
2683 }
2684}
2685
2687 for (const auto *C : D->clauselists()) {
2688 AddChild([=] {
2689 if (!C) {
2690 ColorScope Color(OS, ShowColors, ASTDumpColor::Null);
2691 OS << "<<<NULL>>> OMPClause";
2692 return;
2693 }
2694 {
2695 ColorScope Color(OS, ShowColors, ASTDumpColor::Attr);
2696 StringRef ClauseName(
2697 llvm::omp::getOpenMPClauseName(C->getClauseKind()));
2698 OS << "OMP" << ClauseName.substr(/*Start=*/0, /*N=*/1).upper()
2699 << ClauseName.drop_front() << "Clause";
2700 }
2701 dumpPointer(C);
2702 dumpSourceRange(SourceRange(C->getBeginLoc(), C->getEndLoc()));
2703 });
2704 }
2705}
2706
2711
2713 dumpName(D);
2714 if (D->isInline())
2715 OS << " inline";
2716 if (D->isNested())
2717 OS << " nested";
2718 if (!D->isFirstDecl())
2719 dumpDeclRef(D->getFirstDecl(), "original");
2720
2722}
2723
2728
2733
2735 dumpName(D);
2737
2738 const TagDecl *TD = D->getUnderlyingType()->getAsTagDecl();
2739 if (TD && TD->getTypedefNameForAnonDecl()) {
2741 }
2742}
2743
2749
2751 VisitRecordDecl(D);
2752 if (const auto *Instance = D->getTemplateInstantiationPattern()) {
2753 OS << " instantiated_from";
2754 dumpPointer(Instance);
2755 }
2756 if (const auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(D)) {
2757 dumpTemplateSpecializationKind(CTSD->getSpecializationKind());
2758 if (CTSD->hasStrictPackMatch())
2759 OS << " strict-pack-match";
2760 }
2761
2763
2764 if (!D->isCompleteDefinition())
2765 return;
2766
2767 AddChild([=] {
2768 {
2769 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
2770 OS << "DefinitionData";
2771 }
2772#define FLAG(fn, name) \
2773 if (D->fn()) \
2774 OS << " " #name;
2775 FLAG(isParsingBaseSpecifiers, parsing_base_specifiers);
2776
2777 FLAG(isGenericLambda, generic);
2778 FLAG(isLambda, lambda);
2779
2780 FLAG(isAnonymousStructOrUnion, is_anonymous);
2781 FLAG(canPassInRegisters, pass_in_registers);
2782 FLAG(isEmpty, empty);
2783 FLAG(isAggregate, aggregate);
2784 FLAG(isStandardLayout, standard_layout);
2785 FLAG(isTriviallyCopyable, trivially_copyable);
2786 FLAG(isPOD, pod);
2787 FLAG(isTrivial, trivial);
2788 FLAG(isPolymorphic, polymorphic);
2789 FLAG(isAbstract, abstract);
2790 FLAG(isLiteral, literal);
2791
2792 FLAG(hasUserDeclaredConstructor, has_user_declared_ctor);
2793 FLAG(hasConstexprNonCopyMoveConstructor, has_constexpr_non_copy_move_ctor);
2794 FLAG(hasMutableFields, has_mutable_fields);
2795 FLAG(hasVariantMembers, has_variant_members);
2796 FLAG(allowConstDefaultInit, can_const_default_init);
2797
2798 AddChild([=] {
2799 {
2800 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
2801 OS << "DefaultConstructor";
2802 }
2803 FLAG(hasDefaultConstructor, exists);
2804 FLAG(hasTrivialDefaultConstructor, trivial);
2805 FLAG(hasNonTrivialDefaultConstructor, non_trivial);
2806 FLAG(hasUserProvidedDefaultConstructor, user_provided);
2807 FLAG(hasConstexprDefaultConstructor, constexpr);
2808 FLAG(needsImplicitDefaultConstructor, needs_implicit);
2809 FLAG(defaultedDefaultConstructorIsConstexpr, defaulted_is_constexpr);
2810 });
2811
2812 AddChild([=] {
2813 {
2814 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
2815 OS << "CopyConstructor";
2816 }
2817 FLAG(hasSimpleCopyConstructor, simple);
2818 FLAG(hasTrivialCopyConstructor, trivial);
2819 FLAG(hasNonTrivialCopyConstructor, non_trivial);
2820 FLAG(hasUserDeclaredCopyConstructor, user_declared);
2821 FLAG(hasCopyConstructorWithConstParam, has_const_param);
2822 FLAG(needsImplicitCopyConstructor, needs_implicit);
2823 FLAG(needsOverloadResolutionForCopyConstructor,
2824 needs_overload_resolution);
2826 FLAG(defaultedCopyConstructorIsDeleted, defaulted_is_deleted);
2827 FLAG(implicitCopyConstructorHasConstParam, implicit_has_const_param);
2828 });
2829
2830 AddChild([=] {
2831 {
2832 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
2833 OS << "MoveConstructor";
2834 }
2835 FLAG(hasMoveConstructor, exists);
2836 FLAG(hasSimpleMoveConstructor, simple);
2837 FLAG(hasTrivialMoveConstructor, trivial);
2838 FLAG(hasNonTrivialMoveConstructor, non_trivial);
2839 FLAG(hasUserDeclaredMoveConstructor, user_declared);
2840 FLAG(needsImplicitMoveConstructor, needs_implicit);
2841 FLAG(needsOverloadResolutionForMoveConstructor,
2842 needs_overload_resolution);
2844 FLAG(defaultedMoveConstructorIsDeleted, defaulted_is_deleted);
2845 });
2846
2847 AddChild([=] {
2848 {
2849 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
2850 OS << "CopyAssignment";
2851 }
2852 FLAG(hasSimpleCopyAssignment, simple);
2853 FLAG(hasTrivialCopyAssignment, trivial);
2854 FLAG(hasNonTrivialCopyAssignment, non_trivial);
2855 FLAG(hasCopyAssignmentWithConstParam, has_const_param);
2856 FLAG(hasUserDeclaredCopyAssignment, user_declared);
2857 FLAG(needsImplicitCopyAssignment, needs_implicit);
2858 FLAG(needsOverloadResolutionForCopyAssignment, needs_overload_resolution);
2859 FLAG(implicitCopyAssignmentHasConstParam, implicit_has_const_param);
2860 });
2861
2862 AddChild([=] {
2863 {
2864 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
2865 OS << "MoveAssignment";
2866 }
2867 FLAG(hasMoveAssignment, exists);
2868 FLAG(hasSimpleMoveAssignment, simple);
2869 FLAG(hasTrivialMoveAssignment, trivial);
2870 FLAG(hasNonTrivialMoveAssignment, non_trivial);
2871 FLAG(hasUserDeclaredMoveAssignment, user_declared);
2872 FLAG(needsImplicitMoveAssignment, needs_implicit);
2873 FLAG(needsOverloadResolutionForMoveAssignment, needs_overload_resolution);
2874 });
2875
2876 AddChild([=] {
2877 {
2878 ColorScope Color(OS, ShowColors, ASTDumpColor::DeclKindName);
2879 OS << "Destructor";
2880 }
2881 FLAG(hasSimpleDestructor, simple);
2882 FLAG(hasIrrelevantDestructor, irrelevant);
2883 FLAG(hasTrivialDestructor, trivial);
2884 FLAG(hasNonTrivialDestructor, non_trivial);
2885 FLAG(hasUserDeclaredDestructor, user_declared);
2886 FLAG(hasConstexprDestructor, constexpr);
2887 FLAG(needsImplicitDestructor, needs_implicit);
2888 FLAG(needsOverloadResolutionForDestructor, needs_overload_resolution);
2890 FLAG(defaultedDestructorIsDeleted, defaulted_is_deleted);
2891 });
2892 });
2893
2894 for (const auto &I : D->bases()) {
2895 AddChild([=] {
2896 if (I.isVirtual())
2897 OS << "virtual ";
2898 dumpAccessSpecifier(I.getAccessSpecifier());
2899 dumpType(I.getType());
2900 if (I.isPackExpansion())
2901 OS << "...";
2902 });
2903 }
2904}
2905
2910
2915
2920
2924
2926 if (const auto *TC = D->getTypeConstraint()) {
2927 OS << " ";
2928 dumpBareDeclRef(TC->getNamedConcept());
2929 if (TC->getNamedConcept() != TC->getFoundDecl()) {
2930 OS << " (";
2931 dumpBareDeclRef(TC->getFoundDecl());
2932 OS << ")";
2933 }
2934 } else if (D->wasDeclaredWithTypename())
2935 OS << " typename";
2936 else
2937 OS << " class";
2938 OS << " depth " << D->getDepth() << " index " << D->getIndex();
2939 if (D->isParameterPack())
2940 OS << " ...";
2941 dumpName(D);
2942}
2943
2945 const NonTypeTemplateParmDecl *D) {
2946 dumpType(D->getType());
2947 OS << " depth " << D->getDepth() << " index " << D->getIndex();
2948 if (D->isParameterPack())
2949 OS << " ...";
2950 dumpName(D);
2951}
2952
2954 const TemplateTemplateParmDecl *D) {
2955 OS << " depth " << D->getDepth() << " index " << D->getIndex();
2956 if (D->isParameterPack())
2957 OS << " ...";
2958 dumpName(D);
2959}
2960
2962 OS << ' ';
2964 OS << D->getDeclName();
2966}
2967
2969 OS << ' ';
2971}
2972
2974 const UnresolvedUsingTypenameDecl *D) {
2975 OS << ' ';
2977 OS << D->getDeclName();
2978}
2979
2981 const UnresolvedUsingValueDecl *D) {
2982 OS << ' ';
2984 OS << D->getDeclName();
2985 dumpType(D->getType());
2986}
2987
2992
2994 const ConstructorUsingShadowDecl *D) {
2995 if (D->constructsVirtualBase())
2996 OS << " virtual";
2997
2998 AddChild([=] {
2999 OS << "target ";
3001 });
3002
3003 AddChild([=] {
3004 OS << "nominated ";
3006 OS << ' ';
3008 });
3009
3010 AddChild([=] {
3011 OS << "constructed ";
3013 OS << ' ';
3015 });
3016}
3017
3019 switch (D->getLanguage()) {
3021 OS << " C";
3022 break;
3024 OS << " C++";
3025 break;
3026 }
3027}
3028
3030 OS << ' ';
3032}
3033
3035 const ExplicitInstantiationDecl *D) {
3037 if (D->isExternTemplate())
3038 OS << " extern";
3039 if (D->getQualifierLoc())
3041 if (const NamedDecl *Spec = D->getSpecialization()) {
3042 OS << " '" << Spec->getDeclName() << "'";
3043 dumpDeclRef(Spec);
3044 }
3045}
3046
3048 if (TypeSourceInfo *T = D->getFriendType())
3049 dumpType(T->getType());
3050 if (D->isPackExpansion())
3051 OS << "...";
3052}
3053
3055 if (D->getFriendKind() !=
3057 VisitFriendDecl(D);
3058 return;
3059 }
3060
3062 if (D->isPackExpansion())
3063 OS << "...";
3064}
3065
3067 dumpName(D);
3068 dumpType(D->getType());
3069 if (D->getSynthesize())
3070 OS << " synthesize";
3071
3072 switch (D->getAccessControl()) {
3073 case ObjCIvarDecl::None:
3074 OS << " none";
3075 break;
3077 OS << " private";
3078 break;
3080 OS << " protected";
3081 break;
3083 OS << " public";
3084 break;
3086 OS << " package";
3087 break;
3088 }
3089}
3090
3092 if (D->isInstanceMethod())
3093 OS << " -";
3094 else
3095 OS << " +";
3096 dumpName(D);
3097 dumpType(D->getReturnType());
3098
3099 if (D->isVariadic())
3100 OS << " variadic";
3101}
3102
3104 dumpName(D);
3105 switch (D->getVariance()) {
3107 break;
3108
3110 OS << " covariant";
3111 break;
3112
3114 OS << " contravariant";
3115 break;
3116 }
3117
3118 if (D->hasExplicitBound())
3119 OS << " bounded";
3121}
3122
3124 dumpName(D);
3127 for (const auto *P : D->protocols())
3128 dumpDeclRef(P);
3129}
3130
3136
3138 dumpName(D);
3139
3140 for (const auto *Child : D->protocols())
3141 dumpDeclRef(Child);
3142}
3143
3145 dumpName(D);
3146 dumpDeclRef(D->getSuperClass(), "super");
3147
3149 for (const auto *Child : D->protocols())
3150 dumpDeclRef(Child);
3151}
3152
3159
3165
3167 dumpName(D);
3168 dumpType(D->getType());
3169
3171 OS << " required";
3173 OS << " optional";
3174
3178 OS << " readonly";
3180 OS << " assign";
3182 OS << " readwrite";
3184 OS << " retain";
3186 OS << " copy";
3188 OS << " nonatomic";
3190 OS << " atomic";
3192 OS << " weak";
3194 OS << " strong";
3196 OS << " unsafe_unretained";
3198 OS << " class";
3200 OS << " direct";
3202 dumpDeclRef(D->getGetterMethodDecl(), "getter");
3204 dumpDeclRef(D->getSetterMethodDecl(), "setter");
3205 }
3206}
3207
3211 OS << " synthesize";
3212 else
3213 OS << " dynamic";
3216}
3217
3219 if (D->isVariadic())
3220 OS << " variadic";
3221
3222 if (D->capturesCXXThis())
3223 OS << " captures_this";
3224}
3225
3230
3232 VisitStmt(S);
3233 if (S->hasStoredFPFeatures())
3234 printFPOptions(S->getStoredFPFeatures());
3235}
3236
3238 if (D->isCBuffer())
3239 OS << " cbuffer";
3240 else
3241 OS << " tbuffer";
3242 dumpName(D);
3243}
3244
3246 const HLSLRootSignatureDecl *D) {
3247 dumpName(D);
3248 OS << " version: ";
3249 switch (D->getVersion()) {
3250 case llvm::dxbc::RootSignatureVersion::V1_0:
3251 OS << "1.0";
3252 break;
3253 case llvm::dxbc::RootSignatureVersion::V1_1:
3254 OS << "1.1";
3255 break;
3256 case llvm::dxbc::RootSignatureVersion::V1_2:
3257 OS << "1.2";
3258 break;
3259 }
3260 OS << ", ";
3261 llvm::hlsl::rootsig::dumpRootElements(OS, D->getRootElements());
3262}
3263
3265 OS << (E->isInOut() ? " inout" : " out");
3266}
3267
3272 if (S->isOrphanedLoopConstruct())
3273 OS << " <orphan>";
3274 else
3275 OS << " parent: " << S->getParentComputeConstructKind();
3276}
3277
3282
3286
3291
3296
3301
3306 const OpenACCCacheConstruct *S) {
3308 if (S->hasReadOnly())
3309 OS <<" readonly";
3310}
3325
3331
3333 OS << " " << D->getDirectiveKind();
3334
3335 for (const OpenACCClause *C : D->clauses())
3336 AddChild([=] {
3337 Visit(C);
3338 for (const Stmt *S : C->children())
3339 AddChild([=] { Visit(S); });
3340 });
3341}
3343 OS << " " << D->getDirectiveKind();
3344
3346
3347 AddChild([=] { Visit(D->getFunctionReference()); });
3348
3349 for (const OpenACCClause *C : D->clauses())
3350 AddChild([=] {
3351 Visit(C);
3352 for (const Stmt *S : C->children())
3353 AddChild([=] { Visit(S); });
3354 });
3355}
3356
3358 const OpenACCRoutineDeclAttr *A) {
3359 for (const OpenACCClause *C : A->Clauses)
3360 AddChild([=] {
3361 Visit(C);
3362 for (const Stmt *S : C->children())
3363 AddChild([=] { Visit(S); });
3364 });
3365}
3366
3368 AddChild("begin", [=] { OS << S->getStartingElementPos(); });
3369 AddChild("number of elements", [=] { OS << S->getDataElementCount(); });
3370}
3371
3373 OS << ' ' << AE->getOpAsString();
3374}
3375
3377 VisitStmt(S);
3378 if (S->hasStoredFPFeatures())
3379 printFPOptions(S->getStoredFPFeatures());
3380}
static double GetApproxValue(const llvm::APFloat &F)
Definition APValue.cpp:640
#define V(N, I)
Defines enumerations for traits support.
static bool isTrivial(ASTContext &Ctx, const Expr *E)
Checks if the expression is constant or does not have non-trivial function calls.
This file defines OpenMP nodes for declarative directives.
Defines the C++ template declaration subclasses.
#define X(type, name)
Definition Value.h:97
Defines the clang::Module class, which describes a module in the source code.
llvm::SmallVector< std::pair< const MemRegion *, SVal >, 4 > Bindings
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....
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.
C Language Family Type Representation.
OpenACCAtomicKind getAtomicKind() const
bool hasReadOnly() const
This class represents a 'loop' construct. The 'loop' construct applies to a 'for' loop (or range-for ...
bool isOrphanedLoopConstruct() const
OpenACC 3.3 2.9: An orphaned loop construct is a loop construct that is not lexically enclosed within...
OpenACCDirectiveKind getParentComputeConstructKind() const
llvm::APInt getValue() const
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:223
ArrayRef< Decl * > getModuleInitializers(Module *M)
Get the initializations to perform when importing a module, if any.
const clang::PrintingPolicy & getPrintingPolicy() const
Definition ASTContext.h:876
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:4561
LabelDecl * getLabel() const
Definition Expr.h:4584
An Embarcadero array type trait, as used in the implementation of __array_rank and __array_extent.
Definition ExprCXX.h:2999
ArrayTypeTrait getTrait() const
Definition ExprCXX.h:3039
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Definition TypeBase.h:3836
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Definition Expr.h:6945
StringRef getOpAsString() const
Definition Expr.h:7009
Attr - This represents one attribute.
Definition Attr.h:46
attr::Kind getKind() const
Definition Attr.h:92
bool isInherited() const
Definition Attr.h:101
bool isImplicit() const
Returns true if the attribute has been implicitly created instead of explicitly written by the user.
Definition Attr.h:105
A builtin binary operation expression such as "x + y" or "x <= y".
Definition Expr.h:4049
StringRef getOpcodeStr() const
Definition Expr.h:4115
bool hasStoredFPFeatures() const
Definition Expr.h:4234
FPOptionsOverride getStoredFPFeatures() const
Get FPFeatures from trailing storage.
Definition Expr.h:4246
Opcode getOpcode() const
Definition Expr.h:4094
A binding in a decomposition declaration.
Definition DeclCXX.h:4210
A class which contains all the information about a particular captured value.
Definition Decl.h:4812
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition Decl.h:4806
bool capturesCXXThis() const
Definition Decl.h:4938
bool isVariadic() const
Definition Decl.h:4881
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:1496
A boolean literal, per ([C++ lex.bool] Boolean literals).
Definition ExprCXX.h:726
bool getValue() const
Definition ExprCXX.h:743
Represents a call to a C++ constructor.
Definition ExprCXX.h:1551
bool isElidable() const
Whether this construction is elidable.
Definition ExprCXX.h:1620
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
Definition ExprCXX.h:1644
bool isImmediateEscalating() const
Definition ExprCXX.h:1709
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called.
Definition ExprCXX.h:1653
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
Definition ExprCXX.h:1614
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
Definition ExprCXX.h:1633
Represents a C++ constructor within a class.
Definition DeclCXX.h:2637
Represents a C++ base or member initializer.
Definition DeclCXX.h:2402
Represents a C++ deduction guide declaration.
Definition DeclCXX.h:1996
DeductionCandidate getDeductionCandidateKind() const
Definition DeclCXX.h:2091
A default argument (C++ [dcl.fct.default]).
Definition ExprCXX.h:1273
bool hasRewrittenInit() const
Definition ExprCXX.h:1318
A use of a default initializer in a constructor or in aggregate initialization.
Definition ExprCXX.h:1380
bool hasRewrittenInit() const
Definition ExprCXX.h:1409
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition ExprCXX.h:2629
FunctionDecl * getOperatorDelete() const
Definition ExprCXX.h:2668
bool isArrayForm() const
Definition ExprCXX.h:2655
bool isGlobalDelete() const
Definition ExprCXX.h:2654
Represents a C++ member access expression where the actual member referenced could not be resolved be...
Definition ExprCXX.h:3869
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '.
Definition ExprCXX.h:3968
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
Definition ExprCXX.h:4007
Represents the code generated for an expanded expansion statement.
Definition StmtCXX.h:1028
bool shouldApplyLifetimeExtensionToPreamble() const
Definition StmtCXX.h:1077
CXXExpansionStmtPattern - Represents an unexpanded C++ expansion statement.
Definition StmtCXX.h:675
ExpansionStmtKind getKind() const
Definition StmtCXX.h:774
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr....
Definition ExprCXX.h:1834
Represents a static or instance method of a struct/union/class.
Definition DeclCXX.h:2145
Abstract class common to all of the C++ "named"/"keyword" casts.
Definition ExprCXX.h:378
const char * getCastName() const
getCastName - Get the name of the C++ cast being used, e.g., "static_cast", "dynamic_cast",...
Definition ExprCXX.cpp:775
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)".
Definition ExprCXX.h:2358
bool isArray() const
Definition ExprCXX.h:2467
FunctionDecl * getOperatorNew() const
Definition ExprCXX.h:2462
bool isGlobalNew() const
Definition ExprCXX.h:2524
A call to an overloaded operator written using operator syntax.
Definition ExprCXX.h:84
OverloadedOperatorKind getOperator() const
Returns the kind of overloaded operator that this expression refers to.
Definition ExprCXX.h:114
Represents a C++ struct/union/class.
Definition DeclCXX.h:258
base_class_range bases()
Definition DeclCXX.h:608
const CXXRecordDecl * getTemplateInstantiationPattern() const
Retrieve the record declaration from which this record could be instantiated.
Definition DeclCXX.cpp:2087
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class.
Definition DeclCXX.h:905
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
Definition DeclCXX.h:1018
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class.
Definition DeclCXX.h:807
A C++ static_cast expression (C++ [expr.static.cast]).
Definition ExprCXX.h:439
Represents the this expression in C++.
Definition ExprCXX.h:1157
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
Definition ExprCXX.h:1183
bool isImplicit() const
Definition ExprCXX.h:1180
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
Definition ExprCXX.h:3743
bool isListInitialization() const
Determine whether this expression models list-initialization.
Definition ExprCXX.h:3798
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
Definition ExprCXX.h:3777
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition Expr.h:2954
bool hasStoredFPFeatures() const
Definition Expr.h:3113
bool usesADL() const
Definition Expr.h:3111
FPOptionsOverride getFPFeatures() const
Definition Expr.h:3253
Represents the body of a CapturedStmt, and serves as its DeclContext.
Definition Decl.h:5078
bool isNothrow() const
Definition Decl.cpp:5769
CaseStmt - Represent a case statement.
Definition Stmt.h:1929
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ... RHS, which is a GNU extension.
Definition Stmt.h:1992
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition Expr.h:3687
path_iterator path_begin()
Definition Expr.h:3757
bool hasStoredFPFeatures() const
Definition Expr.h:3786
static const char * getCastKindName(CastKind CK)
Definition Expr.cpp:1959
path_iterator path_end()
Definition Expr.h:3758
const CXXBaseSpecifier *const * path_const_iterator
Definition Expr.h:3754
bool path_empty() const
Definition Expr.h:3755
FPOptionsOverride getFPFeatures() const
Definition Expr.h:3807
unsigned getValue() const
Definition Expr.h:1640
Declaration of a class template.
Represents a 'co_await' expression.
Definition ExprCXX.h:5368
bool isImplicit() const
Definition ExprCXX.h:5390
CompoundAssignOperator - For compound assignments (e.g.
Definition Expr.h:4311
QualType getComputationLHSType() const
Definition Expr.h:4345
QualType getComputationResultType() const
Definition Expr.h:4348
CompoundStmt - This represents a group of statements like { stmt stmt }.
Definition Stmt.h:1749
FPOptionsOverride getStoredFPFeatures() const
Get FPOptionsOverride from trailing storage.
Definition Stmt.h:1799
bool hasStoredFPFeatures() const
Definition Stmt.h:1796
Declaration of a C++20 concept.
A reference to a concept and its template args, as it appears in the code.
Definition ASTConcept.h:130
Represents the specialization of a concept - evaluates to a prvalue of type bool.
NamedDecl * getFoundDecl() const
Represents the canonical version of C arrays with a specified constant size.
Definition TypeBase.h:3874
ConstantExpr - An expression that occurs in a constant context and optionally the result of evaluatin...
Definition Expr.h:1093
APValue getAPValueResult() const
Definition Expr.cpp:419
bool hasAPValueResult() const
Definition Expr.h:1168
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Definition DeclCXX.h:3702
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
Definition DeclCXX.h:3793
bool constructsVirtualBase() const
Returns true if the constructed base class is a virtual base class subobject of this declaration's cl...
Definition DeclCXX.h:3802
ConstructorUsingShadowDecl * getConstructedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the base class for which we don't have an explicit ini...
Definition DeclCXX.h:3783
ConstructorUsingShadowDecl * getNominatedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the direct base class from which this using shadow dec...
Definition DeclCXX.h:3777
CXXRecordDecl * getNominatedBaseClass() const
Get the base class that was named in the using declaration.
Definition DeclCXX.cpp:3510
ConvertVectorExpr - Clang builtin function __builtin_convertvector This AST node provides support for...
Definition Expr.h:4730
FPOptionsOverride getStoredFPFeatures() const
Get FPFeatures from trailing storage.
Definition Expr.h:4793
bool hasStoredFPFeatures() const
Is FPFeatures in Trailing Storage?
Definition Expr.h:4788
Represents a 'co_return' statement in the C++ Coroutines TS.
Definition StmtCXX.h:474
bool isImplicit() const
Definition StmtCXX.h:507
DeclContext * getParent()
getParent - Returns the containing DeclContext.
Definition DeclBase.h:2126
A reference to a declared variable, function, enum, etc.
Definition Expr.h:1281
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
Definition Expr.h:1392
NestedNameSpecifier getQualifier() const
If the name was qualified, retrieves the nested-name-specifier that precedes the name.
Definition Expr.h:1382
bool refersToEnclosingVariableOrCapture() const
Does this DeclRefExpr refer to an enclosing local or a captured variable?
Definition Expr.h:1485
bool isCapturedByCopyInLambdaWithExplicitObjectParameter() const
Definition Expr.h:1497
ValueDecl * getDecl()
Definition Expr.h:1349
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
Definition Expr.h:1479
bool isImmediateEscalating() const
Definition Expr.h:1489
Decl - This represents one declaration (or definition), e.g.
Definition DeclBase.h:86
TemplateDecl * getDescribedTemplate() const
If this is a declaration that describes some template, this method returns that template declaration.
Definition DeclBase.cpp:285
FriendObjectKind getFriendObjectKind() const
Determines whether this declaration is the object of a friend declaration and, if so,...
Definition DeclBase.h:1243
ASTContext & getASTContext() const LLVM_READONLY
Definition DeclBase.cpp:550
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
Definition DeclBase.h:601
@ FOK_Undeclared
A friend of a previously-undeclared entity.
Definition DeclBase.h:1236
@ FOK_None
Not a friend object.
Definition DeclBase.h:1234
@ FOK_Declared
A friend of a previously-declared entity.
Definition DeclBase.h:1235
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
Definition DeclBase.h:854
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
Definition DeclBase.h:805
bool isInvalidDecl() const
Definition DeclBase.h:596
SourceLocation getLocation() const
Definition DeclBase.h:447
const char * getDeclKindName() const
Definition DeclBase.cpp:169
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
Definition DeclBase.h:629
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required.
Definition DeclBase.cpp:579
DeclContext * getDeclContext()
Definition DeclBase.h:456
AccessSpecifier getAccess() const
Definition DeclBase.h:515
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC).
Definition DeclBase.h:935
Kind getKind() const
Definition DeclBase.h:450
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
Definition DeclBase.h:435
The name of a declaration.
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in ...
Definition Decl.h:837
TemplateName getUnderlying() const
DefaultArguments getDefaultArguments() const
A qualified reference to a name whose declaration cannot yet be resolved.
Definition ExprCXX.h:3509
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies this declaration.
Definition ExprCXX.h:3561
Represents an array type in C++ whose size is a value-dependent expression.
Definition TypeBase.h:4125
Represents an extended vector type where either the type or size is dependent.
Definition TypeBase.h:4215
NestedNameSpecifier getQualifier() const
Return the nested name specifier that qualifies this name.
Symbolic representation of a dynamic allocation.
Definition APValue.h:65
IdentifierInfo & getAccessor() const
Definition Expr.h:6602
Represents a reference to emded data.
Definition Expr.h:5146
unsigned getStartingElementPos() const
Definition Expr.h:5167
size_t getDataElementCount() const
Definition Expr.h:5168
An instance of this object exists for each enum constant that is defined.
Definition Decl.h:3557
Represents an enum.
Definition Decl.h:4145
bool isScoped() const
Returns true if this is a C++11 scoped enumeration.
Definition Decl.h:4363
bool isScopedUsingClassTag() const
Returns true if this is a C++11 scoped enumeration.
Definition Decl.h:4366
bool isFixed() const
Returns true if this is an Objective-C, C++11, or Microsoft-style enumeration with a fixed underlying...
Definition Decl.h:4372
QualType getIntegerType() const
Return the integer type this enum decl corresponds to.
Definition Decl.h:4318
EnumDecl * getTemplateInstantiationPattern() const
Retrieve the enum definition from which this enumeration could be instantiated, if it is an instantia...
Definition Decl.cpp:5202
QualType getTypeAsWritten() const
getTypeAsWritten - Returns the type that this expression is casting to, as written in the source code...
Definition Expr.h:3966
Represents an explicit instantiation of a template entity in source code.
TemplateSpecializationKind getTemplateSpecializationKind() const
NamedDecl * getSpecialization() const
NestedNameSpecifierLoc getQualifierLoc() const
Returns the qualifier regardless of where it is stored.
Represents an expression – generally a full-expression – that introduces cleanups to be run at the en...
Definition ExprCXX.h:3660
CleanupObject getObject(unsigned i) const
Definition ExprCXX.h:3690
unsigned getNumObjects() const
Definition ExprCXX.h:3688
llvm::PointerUnion< BlockDecl *, CompoundLiteralExpr * > CleanupObject
The type of objects that are kept in the cleanup.
Definition ExprCXX.h:3666
This represents one expression.
Definition Expr.h:112
bool isValueDependent() const
Determines whether the value of this expression depends on.
Definition Expr.h:177
QualType getType() const
Definition Expr.h:144
An expression trait intrinsic.
Definition ExprCXX.h:3072
ExpressionTrait getTrait() const
Definition ExprCXX.h:3107
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Definition Expr.h:6627
Represents difference between two FPOptions values.
Represents a member of a struct/union/class.
Definition Decl.h:3294
bool isMutable() const
Determines whether this field is mutable (C++ only).
Definition Decl.h:3394
std::string getValueAsString(unsigned Radix) const
Definition Expr.cpp:1016
double getValueAsApproximateDouble() const
getValueAsApproximateDouble - This returns the value as an inaccurate double.
Definition Expr.cpp:1095
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Definition DeclFriend.h:46
TypeSourceInfo * getFriendType() const
If this friend declaration names an (untemplated but possibly dependent) type, return the type; other...
Definition DeclFriend.h:96
bool isPackExpansion() const
Definition DeclFriend.h:113
Declaration of a friend template.
TemplateName getFriendTemplateName() const
FriendTemplateEntityKind getFriendKind() const
Represents a function declaration or definition.
Definition Decl.h:2058
StringLiteral * getDeletedMessage() const
Get the message that indicates why this function was deleted.
Definition Decl.h:2888
bool isInlined() const
Determine whether this function should be inlined, because it is either marked "inline" or "constexpr...
Definition Decl.h:3051
FunctionDecl * getTemplateInstantiationPattern(bool ForDefinition=true) const
Retrieve the function declaration from which this function could be instantiated, if it is an instant...
Definition Decl.cpp:4307
bool isTrivial() const
Whether this function is "trivial" in some specialized C++ senses.
Definition Decl.h:2503
param_iterator param_begin()
Definition Decl.h:2916
bool isDeleted() const
Whether this function has been deleted.
Definition Decl.h:2666
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition Decl.h:3018
bool isDeletedAsWritten() const
Definition Decl.h:2670
bool isPureVirtual() const
Whether this virtual function is pure, i.e.
Definition Decl.h:2479
bool param_empty() const
Definition Decl.h:2915
bool isDefaulted() const
Whether this function is defaulted.
Definition Decl.h:2511
bool isIneligibleOrNotSelected() const
Definition Decl.h:2544
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine what kind of template instantiation this function represents.
Definition Decl.cpp:4460
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
Definition Decl.h:2470
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
Definition Decl.cpp:3869
bool isInlineSpecified() const
Determine whether the "inline" keyword was specified for this function.
Definition Decl.h:3029
Represents a prototype with parameter type info, e.g.
Definition TypeBase.h:5421
Declaration of a template function.
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition TypeBase.h:4617
static StringRef getNameForCallConv(CallingConv CC)
Definition Type.cpp:3738
Represents a C11 generic selection.
Definition Expr.h:6199
AssociationTy< true > ConstAssociation
Definition Expr.h:6433
bool isResultDependent() const
Whether this generic selection is result-dependent.
Definition Expr.h:6453
GotoStmt - This represents a direct goto.
Definition Stmt.h:2978
LabelDecl * getLabel() const
Definition Stmt.h:2991
HLSLBufferDecl - Represent a cbuffer or tbuffer declaration.
Definition Decl.h:5328
bool isCBuffer() const
Definition Decl.h:5372
This class represents temporary values used to represent inout and out arguments in HLSL.
Definition Expr.h:7414
bool isInOut() const
returns true if the parameter is inout and false if the parameter is out.
Definition Expr.h:7473
ArrayRef< llvm::hlsl::rootsig::RootElement > getRootElements() const
Definition Decl.h:5445
llvm::dxbc::RootSignatureVersion getVersion() const
Definition Decl.h:5443
const char * getNameStart() const
Return the beginning of the actual null-terminated string for this identifier.
StringRef getName() const
Return the actual identifier string.
IfStmt - This represents an if/then/else.
Definition Stmt.h:2268
bool hasElseStorage() const
True if this IfStmt has storage for an else statement.
Definition Stmt.h:2343
bool hasVarStorage() const
True if this IfStmt has storage for a variable declaration.
Definition Stmt.h:2340
bool isConstexpr() const
Definition Stmt.h:2461
bool hasInitStorage() const
True if this IfStmt has the storage for an init statement.
Definition Stmt.h:2337
bool isNegatedConsteval() const
Definition Stmt.h:2457
bool isConsteval() const
Definition Stmt.h:2448
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
Definition Expr.h:3864
bool isPartOfExplicitCast() const
Definition Expr.h:3895
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Definition Decl.h:5187
Module * getImportedModule() const
Retrieve the module that was imported by the import declaration.
Definition Decl.h:5245
Represents a field injected from an anonymous union/struct into the parent scope.
Definition Decl.h:3601
ArrayRef< NamedDecl * > chain() const
Definition Decl.h:3622
Describes an C or C++ initializer list.
Definition Expr.h:5319
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
Definition Expr.h:5446
bool isExplicit() const
Definition Expr.h:5462
Represents the declaration of a label.
Definition Decl.h:524
LabelStmt - Represents a label, which has a substatement.
Definition Stmt.h:2155
bool isSideEntry() const
Definition Stmt.h:2202
const char * getName() const
Definition Stmt.cpp:437
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
Definition DeclCXX.h:3333
Represents a linkage specification.
Definition DeclCXX.h:3040
LinkageSpecLanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Definition DeclCXX.h:3063
Base class for BreakStmt and ContinueStmt.
Definition Stmt.h:3066
LabelDecl * getLabelDecl()
Definition Stmt.h:3104
const Stmt * getNamedLoopOrSwitch() const
If this is a named break/continue, get the loop or switch statement that this targets.
Definition Stmt.cpp:1535
bool hasLabelTarget() const
Definition Stmt.h:3099
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition ExprCXX.h:4919
ValueDecl * getExtendingDecl()
Get the declaration which triggered the lifetime-extension of this temporary, if any.
Definition ExprCXX.h:4969
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition Expr.h:3375
NestedNameSpecifier getQualifier() const
If the member name was qualified, retrieves the nested-name-specifier that precedes the member name.
Definition Expr.h:3486
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
Definition Expr.h:3458
NonOdrUseReason isNonOdrUse() const
Is this expression a non-odr-use reference, and if so, why?
Definition Expr.h:3599
bool isArrow() const
Definition Expr.h:3559
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
Describes a module or submodule.
Definition Module.h:340
std::string getFullModuleName(bool AllowStringLiterals=false) const
Retrieve the full name of this module, including the path from its top-level module.
Definition Module.cpp:240
This represents a decl that may have a name.
Definition Decl.h:274
bool isModulePrivate() const
Whether this declaration was marked as being private to the module in which it was defined.
Definition DeclBase.h:656
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
Definition Decl.h:295
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Definition Decl.h:301
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition Decl.h:340
Linkage getFormalLinkage() const
Get the linkage from a semantic point of view.
Definition Decl.cpp:1207
Represents a C++ namespace alias.
Definition DeclCXX.h:3226
NamespaceBaseDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
Definition DeclCXX.h:3319
Represent a C++ namespace.
Definition Decl.h:592
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
bool isInline() const
Returns true if this is an inline namespace declaration.
Definition Decl.h:648
bool isNested() const
Returns true if this is a nested namespace declaration.
Definition Decl.h:657
NestedNameSpecifier getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
NamespaceAndPrefix getAsNamespaceAndPrefix() const
void print(raw_ostream &OS, const PrintingPolicy &Policy, bool ResolveTemplateArguments=false, bool PrintFinalScopeResOp=true) const
Print this nested name specifier to the given output stream.
@ MicrosoftSuper
Microsoft's '__super' specifier, stored as a CXXRecordDecl* of the class it appeared in.
@ Global
The global specifier '::'. There is no stored value.
@ Namespace
A namespace-like entity, stored as a NamespaceBaseDecl*.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
bool isParameterPack() const
Whether this parameter is a non-type template parameter pack.
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
unsigned getDepth() const
Get the nesting depth of the template parameter.
Pseudo declaration for capturing expressions.
Definition DeclOpenMP.h:445
This is a basic class for representing single OpenMP clause.
This represents 'pragma omp declare reduction ...' directive.
Definition DeclOpenMP.h:239
Expr * getInitializer()
Get initializer expression (if specified) of the declare reduction construct.
Definition DeclOpenMP.h:300
Expr * getCombiner()
Get combiner expression of the declare reduction construct.
Definition DeclOpenMP.h:282
OMPDeclareReductionInitKind getInitializerKind() const
Get initializer kind.
Definition DeclOpenMP.h:303
OpenMP 5.0 [2.1.6 Iterators] Iterators are identifiers that expand to multiple values in the clause o...
Definition ExprOpenMP.h:151
IteratorRange getIteratorRange(unsigned I)
Gets the iterator range for the given iterator.
Definition Expr.cpp:5575
unsigned numOfIterators() const
Returns number of iterator definitions.
Definition ExprOpenMP.h:275
Decl * getIteratorDecl(unsigned I)
Gets the iterator declaration for the given iterator.
Definition Expr.cpp:5571
This represents 'pragma omp requires...' directive.
Definition DeclOpenMP.h:479
clauselist_range clauselists()
Definition DeclOpenMP.h:504
Represents Objective-C's @catch statement.
Definition StmtObjC.h:77
const VarDecl * getCatchParamDecl() const
Definition StmtObjC.h:97
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
Definition ExprObjC.h:119
ObjCBoxedExpr - used for generalized expression boxing.
Definition ExprObjC.h:159
ObjCMethodDecl * getBoxingMethod() const
Definition ExprObjC.h:181
ObjCCategoryDecl - Represents a category declaration.
Definition DeclObjC.h:2335
ObjCCategoryImplDecl * getImplementation() const
ObjCInterfaceDecl * getClassInterface()
Definition DeclObjC.h:2378
protocol_range protocols() const
Definition DeclObjC.h:2409
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
Definition DeclObjC.h:2551
ObjCCategoryDecl * getCategoryDecl() const
ObjCCompatibleAliasDecl - Represents alias of a class.
Definition DeclObjC.h:2781
const ObjCInterfaceDecl * getClassInterface() const
Definition DeclObjC.h:2799
ObjCEncodeExpr, used for @encode in Objective-C.
Definition ExprObjC.h:441
QualType getEncodedType() const
Definition ExprObjC.h:460
const ObjCInterfaceDecl * getClassInterface() const
Definition DeclObjC.h:2492
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition DeclObjC.h:2603
const ObjCInterfaceDecl * getSuperClass() const
Definition DeclObjC.h:2741
Represents an ObjC class declaration.
Definition DeclObjC.h:1160
protocol_range protocols() const
Definition DeclObjC.h:1365
ObjCImplementationDecl * getImplementation() const
ObjCInterfaceDecl * getSuperClass() const
Definition DeclObjC.cpp:349
Represents typeof(type), a C23 feature and GCC extension, or `typeof_unqual(type),...
Definition TypeBase.h:8066
ObjCIvarDecl - Represents an ObjC instance variable.
Definition DeclObjC.h:1958
AccessControl getAccessControl() const
Definition DeclObjC.h:2006
bool getSynthesize() const
Definition DeclObjC.h:2013
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Definition ExprObjC.h:582
ObjCIvarDecl * getDecl()
Definition ExprObjC.h:612
bool isFreeIvar() const
Definition ExprObjC.h:621
An expression that sends a message to the given Objective-C object or class.
Definition ExprObjC.h:973
Selector getSelector() const
Definition ExprObjC.cpp:301
@ SuperInstance
The receiver is the instance of the superclass object.
Definition ExprObjC.h:987
@ Instance
The receiver is an object instance.
Definition ExprObjC.h:981
@ SuperClass
The receiver is a superclass.
Definition ExprObjC.h:984
@ Class
The receiver is a class.
Definition ExprObjC.h:978
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
Definition ExprObjC.h:1320
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
Definition ExprObjC.h:1262
ObjCMethodDecl - Represents an instance or class method declaration.
Definition DeclObjC.h:140
bool isVariadic() const
Definition DeclObjC.h:434
Selector getSelector() const
Definition DeclObjC.h:330
bool isInstanceMethod() const
Definition DeclObjC.h:429
QualType getReturnType() const
Definition DeclObjC.h:332
Represents one property declaration in an Objective-C interface.
Definition DeclObjC.h:734
ObjCMethodDecl * getGetterMethodDecl() const
Definition DeclObjC.h:907
ObjCMethodDecl * getSetterMethodDecl() const
Definition DeclObjC.h:910
QualType getType() const
Definition DeclObjC.h:810
ObjCPropertyAttribute::Kind getPropertyAttributes() const
Definition DeclObjC.h:821
PropertyControl getPropertyImplementation() const
Definition DeclObjC.h:918
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Definition DeclObjC.h:2811
ObjCIvarDecl * getPropertyIvarDecl() const
Definition DeclObjC.h:2885
Kind getPropertyImplementation() const
Definition DeclObjC.h:2881
ObjCPropertyDecl * getPropertyDecl() const
Definition DeclObjC.h:2876
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
Definition ExprObjC.h:650
bool isMessagingGetter() const
True if the property reference will result in a message to the getter.
Definition ExprObjC.h:769
ObjCPropertyDecl * getExplicitProperty() const
Definition ExprObjC.h:739
bool isMessagingSetter() const
True if the property reference will result in a message to the setter.
Definition ExprObjC.h:776
ObjCMethodDecl * getImplicitPropertyGetter() const
Definition ExprObjC.h:744
bool isImplicitProperty() const
Definition ExprObjC.h:736
ObjCMethodDecl * getImplicitPropertySetter() const
Definition ExprObjC.h:749
bool isSuperReceiver() const
Definition ExprObjC.h:804
Represents an Objective-C protocol declaration.
Definition DeclObjC.h:2090
protocol_range protocols() const
Definition DeclObjC.h:2167
ObjCProtocolExpr used for protocol expression in Objective-C.
Definition ExprObjC.h:538
ObjCProtocolDecl * getProtocol() const
Definition ExprObjC.h:555
ObjCSelectorExpr used for @selector in Objective-C.
Definition ExprObjC.h:486
Selector getSelector() const
Definition ExprObjC.h:500
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
Definition ExprObjC.h:872
bool isArraySubscriptRefExpr() const
Definition ExprObjC.h:925
ObjCMethodDecl * getAtIndexMethodDecl() const
Definition ExprObjC.h:917
ObjCMethodDecl * setAtIndexMethodDecl() const
Definition ExprObjC.h:921
Represents the declaration of an Objective-C type parameter.
Definition DeclObjC.h:581
bool hasExplicitBound() const
Whether this type parameter has an explicitly-written type bound, e.g., "T : NSView".
Definition DeclObjC.h:643
ObjCTypeParamVariance getVariance() const
Determine the variance of this type parameter.
Definition DeclObjC.h:626
This expression type represents an asterisk in an OpenACC Size-Expr, used in the 'tile' and 'gang' cl...
Definition Expr.h:2101
This is the base type for all OpenACC Clauses.
OpenACCDirectiveKind getDirectiveKind() const
Definition DeclOpenACC.h:56
ArrayRef< const OpenACCClause * > clauses() const
Definition DeclOpenACC.h:62
This is the base class for an OpenACC statement-level construct, other construct types are expected t...
Definition StmtOpenACC.h:26
OpenACCDirectiveKind getDirectiveKind() const
Definition StmtOpenACC.h:57
SourceLocation getRParenLoc() const
const Expr * getFunctionReference() const
SourceLocation getLParenLoc() const
UnresolvedSetImpl::iterator decls_iterator
Definition ExprCXX.h:3222
decls_iterator decls_begin() const
Definition ExprCXX.h:3224
decls_iterator decls_end() const
Definition ExprCXX.h:3227
DeclarationName getName() const
Gets the name looked up.
Definition ExprCXX.h:3241
Represents a #pragma comment line.
Definition Decl.h:167
StringRef getArg() const
Definition Decl.h:190
PragmaMSCommentKind getCommentKind() const
Definition Decl.h:188
Represents a #pragma detect_mismatch line.
Definition Decl.h:201
StringRef getName() const
Definition Decl.h:222
StringRef getValue() const
Definition Decl.h:223
[C99 6.4.2.2] - A predefined identifier such as func.
Definition Expr.h:2016
StringRef getIdentKindName() const
Definition Expr.h:2073
PredefinedIdentKind getIdentKind() const
Definition Expr.h:2051
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:938
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
Definition TypeBase.h:8525
std::string getAsString() const
static std::string getAsString(SplitQualType split, const PrintingPolicy &Policy)
Definition TypeBase.h:1348
Represents a template name as written in source code.
NestedNameSpecifier getQualifier() const
Return the nested name specifier that qualifies this name.
TemplateName getUnderlyingTemplate() const
Return the underlying template name.
bool hasTemplateKeyword() const
Whether the template name was prefixed by the "template" keyword.
Represents a struct/union/class.
Definition Decl.h:4459
Provides common interface for the Decls that can be redeclared.
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
decl_type * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
Base for LValueReferenceType and RValueReferenceType.
Definition TypeBase.h:3687
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
bool isSatisfied() const
Whether or not the requires clause is satisfied.
ReturnStmt - This represents a return, optionally of an expression: return; return 4;.
Definition Stmt.h:3169
const VarDecl * getNRVOCandidate() const
Retrieve the variable that might be used for the named return value optimization.
Definition Stmt.h:3205
TypeSourceInfo * getTypeSourceInfo()
Definition Expr.h:2154
void print(llvm::raw_ostream &OS) const
Prints the full selector name (e.g. "foo:bar:").
Represents an expression that computes the length of a parameter pack.
Definition ExprCXX.h:4440
NamedDecl * getPack() const
Retrieve the parameter pack.
Definition ExprCXX.h:4508
Encodes a location in the source.
A trivial tuple used to represent a source range.
Stmt - This represents one statement.
Definition Stmt.h:85
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Definition Stmt.cpp:343
const char * getStmtClassName() const
Definition Stmt.cpp:86
StringLiteral - This represents a string literal expression, e.g.
Definition Expr.h:1810
void outputString(raw_ostream &OS) const
Definition Expr.cpp:1215
A structure for storing the information associated with a substituted template template parameter.
TemplateTemplateParmDecl * getParameter() const
unsigned getIndex() const
Returns the index of the replaced parameter in the associated declaration.
Decl * getAssociatedDecl() const
A template-like entity which owns the whole pattern being substituted.
SwitchStmt - This represents a 'switch' stmt.
Definition Stmt.h:2518
bool hasVarStorage() const
True if this SwitchStmt has storage for a condition variable.
Definition Stmt.h:2579
bool hasInitStorage() const
True if this SwitchStmt has storage for an init statement.
Definition Stmt.h:2576
Represents the declaration of a struct/union/class/enum.
Definition Decl.h:3851
StringRef getKindName() const
Definition Decl.h:4047
bool isCompleteDefinition() const
Return true if this decl has its body fully specified.
Definition Decl.h:3952
TypedefNameDecl * getTypedefNameForAnonDecl() const
Definition Decl.h:4088
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of this declaration, if it was present in ...
Definition Decl.h:4097
Represents a template argument.
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
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.
bool isCanonicalExpr() const
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
Represents a C++ template name within the type system.
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...
@ OverloadedTemplate
A set of overloaded template declarations.
@ Template
A single template declaration.
@ DependentTemplate
A dependent template name that has not been resolved to a template (or set of templates).
@ SubstTemplateTemplateParm
A template template parameter that has been substituted for some other template name.
@ SubstTemplateTemplateParmPack
A template template parameter pack that has been substituted for a template template argument pack,...
@ DeducedTemplate
A template name that refers to another TemplateName with deduced default arguments.
@ QualifiedTemplate
A qualified template name, where the qualification is kept to describe the source code as written.
@ AssumedTemplate
An unqualified-id that has been assumed to name a function template that will be found by ADL.
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.
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
unsigned getIndex() const
Get the index of the template parameter within its parameter list.
unsigned getDepth() const
Get the nesting depth of the template parameter.
Declaration of a template type parameter.
bool wasDeclaredWithTypename() const
Whether this template type parameter was declared with the 'typename' keyword.
unsigned getIndex() const
Retrieve the index of the template parameter.
const TypeConstraint * getTypeConstraint() const
Returns the type constraint associated with this template parameter (if any).
bool isParameterPack() const
Returns whether this is a parameter pack.
unsigned getDepth() const
Retrieve the depth of the template parameter.
void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node)
void VisitDeducedType(const DeducedType *T)
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 VisitExplicitInstantiationDecl(const ExplicitInstantiationDecl *D)
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 VisitCXXExpansionStmtInstantiation(const CXXExpansionStmtInstantiation *Node)
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 VisitMatrixElementExpr(const MatrixElementExpr *Node)
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 dumpFormalLinkage(const NamedDecl *ND)
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 VisitFriendTemplateDecl(const FriendTemplateDecl *D)
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 VisitCXXExpansionStmtPattern(const CXXExpansionStmtPattern *Node)
void VisitTypedefType(const TypedefType *T)
TextTreeStructure(raw_ostream &OS, bool ShowColors)
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:3822
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:8475
QualType getType() const
Return the type wrapped by this type source info.
Definition TypeBase.h:8486
A type trait used in the implementation of various C++11 and Library TR1 trait templates.
Definition ExprCXX.h:2899
TypeTrait getTrait() const
Determine which type trait this expression uses.
Definition ExprCXX.h:2942
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:1879
bool isSignedIntegerType() const
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char,...
Definition Type.cpp:2296
TagDecl * getAsTagDecl() const
Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is...
Definition Type.h:63
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
Definition TypeBase.h:2859
const char * getTypeClassName() const
Definition Type.cpp:3507
const T * getAs() const
Member-template getAs<specific type>'.
Definition TypeBase.h:9340
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Definition Decl.h:3801
QualType getUnderlyingType() const
Definition Decl.h:3751
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand.
Definition Expr.h:2636
QualType getArgumentType() const
Definition Expr.h:2679
UnaryExprOrTypeTrait getKind() const
Definition Expr.h:2668
UnaryOperator - This represents the unary-expression's (except sizeof and alignof),...
Definition Expr.h:2255
static bool isPostfix(Opcode Op)
isPostfix - Return true if this is a postfix operation, like x++.
Definition Expr.h:2325
Opcode getOpcode() const
Definition Expr.h:2291
bool hasStoredFPFeatures() const
Is FPFeatures in Trailing Storage?
Definition Expr.h:2392
FPOptionsOverride getStoredFPFeatures() const
Get FPFeatures from trailing storage.
Definition Expr.h:2395
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to,...
Definition Expr.cpp:1412
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
Definition Expr.h:2309
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition ExprCXX.h:3389
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Definition ExprCXX.h:3458
Represents the dependent type named by a dependently-scoped typename using declaration,...
Definition TypeBase.h:6137
Represents a dependent using declaration which was marked with typename.
Definition DeclCXX.h:4062
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition DeclCXX.h:4099
Represents a dependent using declaration which was not marked with typename.
Definition DeclCXX.h:3965
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition DeclCXX.h:4009
Represents a C++ using-declaration.
Definition DeclCXX.h:3616
NestedNameSpecifier getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
Definition DeclCXX.h:3653
Represents C++ using-directive.
Definition DeclCXX.h:3121
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
Definition DeclCXX.cpp:3357
Represents a C++ using-enum-declaration.
Definition DeclCXX.h:3817
EnumDecl * getEnumDecl() const
Definition DeclCXX.h:3859
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition DeclCXX.h:3424
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
Definition DeclCXX.h:3488
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition Decl.h:712
QualType getType() const
Definition Decl.h:723
bool isParameterPack() const
Determine whether this value is actually a function parameter pack, init-capture pack,...
Definition Decl.cpp:5656
Kind getKind() const
Definition Value.h:137
Represents a variable declaration or definition.
Definition Decl.h:932
VarTemplateDecl * getDescribedVarTemplate() const
Retrieves the variable template that is described by this variable declaration.
Definition Decl.cpp:2781
bool isConstexpr() const
Whether this variable is (C++11) constexpr.
Definition Decl.h:1593
TLSKind getTLSKind() const
Definition Decl.cpp:2149
bool hasInit() const
Definition Decl.cpp:2379
InitializationStyle getInitStyle() const
The style of initialization for this declaration.
Definition Decl.h:1490
static const char * getStorageClassSpecifierString(StorageClass SC)
Return the string used to specify the storage class SC.
Definition Decl.cpp:2102
@ ListInit
Direct list-initialization (C++11)
Definition Decl.h:943
@ CInit
C-style initialization with assignment.
Definition Decl.h:937
@ ParenListInit
Parenthesized list-initialization (C++20)
Definition Decl.h:946
@ CallInit
Call-style initialization (C++98)
Definition Decl.h:940
VarDecl * getTemplateInstantiationPattern() const
Retrieve the variable declaration from which this variable could be instantiated, if it is an instant...
Definition Decl.cpp:2698
bool isNRVOVariable() const
Determine whether this local variable can be used with the named return value optimization (NRVO).
Definition Decl.h:1536
QualType::DestructionKind needsDestruction(const ASTContext &Ctx) const
Would the destruction of this variable have any effect, and if so, what kind?
Definition Decl.cpp:2822
bool isInline() const
Whether this variable is (C++1z) inline.
Definition Decl.h:1575
const Expr * getInit() const
Definition Decl.h:1391
const APValue * evaluateValue() const
Attempt to evaluate the value of the initializer attached to this declaration, and produce notes expl...
Definition Decl.cpp:2556
@ TLS_Static
TLS with a known-constant initializer.
Definition Decl.h:955
@ TLS_Dynamic
TLS with a dynamic initializer.
Definition Decl.h:958
@ TLS_None
Not a TLS variable.
Definition Decl.h:952
StorageClass getStorageClass() const
Returns the storage class as written in the source.
Definition Decl.h:1174
TemplateSpecializationKind getTemplateSpecializationKind() const
If this variable is an instantiation of a variable template or a static data member of a class templa...
Definition Decl.cpp:2750
Declaration of a variable template.
Represents a C array with a specified size that is not an integer-constant-expression.
Definition TypeBase.h:4080
Represents a GCC generic vector type.
Definition TypeBase.h:4289
WhileStmt - This represents a 'while' stmt.
Definition Stmt.h:2706
bool hasVarStorage() const
True if this WhileStmt has storage for a condition variable.
Definition Stmt.h:2756
A command that has zero or more word-like arguments (number of word-like arguments depends on command...
Definition Comment.h:616
static const CommandInfo * getBuiltinCommandInfo(StringRef Name)
Any part of the comment.
Definition Comment.h:66
A full comment attached to a declaration, contains block content.
Definition Comment.h:1097
An opening HTML tag with attributes.
Definition Comment.h:445
A command with word-like arguments that is considered inline content.
Definition Comment.h:341
Doxygen \param command.
Definition Comment.h:723
static const char * getDirectionAsString(ParamCommandPassDirection D)
Definition Comment.cpp:189
Doxygen \tparam command, describes a template parameter.
Definition Comment.h:805
A verbatim block command (e.
Definition Comment.h:891
A line of text contained in a verbatim block.
Definition Comment.h:866
A verbatim line command.
Definition Comment.h:942
A static requirement that can be used in a requires-expression to check properties of types and expre...
Top level wrappers for InstallAPI frontend operations.
const char * getTraitSpelling(TypeTrait T) LLVM_READONLY
Return the spelling of the trait T. Never null.
bool isa(CodeGen::Address addr)
Definition Address.h:330
llvm::StringRef getAccessSpelling(AccessSpecifier AS)
Definition Specifiers.h:420
@ 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_Copyright
Definition PragmaKinds.h:21
@ PCK_Unknown
Definition PragmaKinds.h:15
@ PCK_User
Definition PragmaKinds.h:20
@ RQ_None
No ref-qualifier was provided.
Definition TypeBase.h:1801
@ RQ_LValue
An lvalue ref-qualifier was provided (&).
Definition TypeBase.h:1804
@ RQ_RValue
An rvalue ref-qualifier was provided (&&).
Definition TypeBase.h:1807
@ OK_VectorComponent
A vector component is an element or range of elements of a vector.
Definition Specifiers.h:158
@ 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:162
@ OK_ObjCSubscript
An Objective-C array/dictionary subscripting which reads an object or writes at the subscripted array...
Definition Specifiers.h:167
@ OK_Ordinary
An ordinary object is located at an address in memory.
Definition Specifiers.h:152
@ OK_BitField
A bitfield object is a bitfield on a C or C++ record.
Definition Specifiers.h:155
@ OK_MatrixComponent
A matrix component is a single element or range of elements of a matrix.
Definition Specifiers.h:170
@ Override
Merge availability attributes for an override, which requires an exact match or a weakening of constr...
Definition Sema.h:631
@ 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:124
StorageClass
Storage classes.
Definition Specifiers.h:249
@ SC_None
Definition Specifiers.h:251
IdentifierLoc DeviceTypeArgument
@ VisibleNone
No linkage according to the standard, but is visible from other translation units because of types de...
Definition Linkage.h:48
@ None
No linkage, which means that the entity is unique and can only be referred to from within its scope.
Definition Linkage.h:30
@ UniqueExternal
External linkage within a unique namespace.
Definition Linkage.h:44
@ Internal
Internal linkage, which indicates that the entity can be referred to from within the translation unit...
Definition Linkage.h:35
@ External
External linkage, which indicates that the entity can be referred to from other translation units.
Definition Linkage.h:58
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
Definition Linkage.h:54
OptionalUnsigned< unsigned > UnsignedOrNone
const FunctionProtoType * T
@ Deduced
The normal deduced case.
Definition TypeBase.h:1818
@ Undeduced
Not deduced yet. This is for example an 'auto' which was just parsed.
Definition TypeBase.h:1813
@ DeducedAsPack
Same as above, but additionally this represents a case where the deduced entity itself is a pack.
Definition TypeBase.h:1834
@ DeducedAsDependent
This is a special case where the initializer is dependent, so we can't deduce a type yet.
Definition TypeBase.h:1828
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
Definition Specifiers.h:136
@ VK_XValue
An x-value expression is a reference to an object with independent storage but which can be "moved",...
Definition Specifiers.h:145
@ VK_LValue
An l-value expression is a reference to an object with independent storage.
Definition Specifiers.h:140
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
Definition Specifiers.h:189
@ TSK_ExplicitInstantiationDefinition
This template specialization was instantiated from a template due to an explicit instantiation defini...
Definition Specifiers.h:207
@ TSK_ExplicitInstantiationDeclaration
This template specialization was instantiated from a template due to an explicit instantiation declar...
Definition Specifiers.h:203
@ TSK_ExplicitSpecialization
This template specialization was declared or defined by an explicit specialization (C++ [temp....
Definition Specifiers.h:199
@ TSK_ImplicitInstantiation
This template specialization was implicitly instantiated from a template.
Definition Specifiers.h:195
@ TSK_Undeclared
This template specialization was formed from a template-id but has not yet been declared,...
Definition Specifiers.h:192
@ Invariant
The parameter is invariant: must match exactly.
Definition DeclObjC.h:558
@ Contravariant
The parameter is contravariant, e.g., X<T> is a subtype of X when the type parameter is covariant and...
Definition DeclObjC.h:566
@ Covariant
The parameter is covariant, e.g., X<T> is a subtype of X when the type parameter is covariant and T i...
Definition DeclObjC.h:562
const char * getOperatorSpelling(OverloadedOperatorKind Operator)
Retrieve the spelling of the given overloaded operator, without the preceding "operator" keyword.
@ AltiVecBool
is AltiVec 'vector bool ...'
Definition TypeBase.h:4259
@ SveFixedLengthData
is AArch64 SVE fixed-length data vector
Definition TypeBase.h:4268
@ AltiVecVector
is AltiVec vector
Definition TypeBase.h:4253
@ AltiVecPixel
is AltiVec 'vector Pixel'
Definition TypeBase.h:4256
@ Neon
is ARM Neon vector
Definition TypeBase.h:4262
@ Generic
not a target-specific vector type
Definition TypeBase.h:4250
@ RVVFixedLengthData
is RISC-V RVV fixed-length data vector
Definition TypeBase.h:4274
@ RVVFixedLengthMask
is RISC-V RVV fixed-length mask vector
Definition TypeBase.h:4277
@ NeonPoly
is ARM Neon polynomial vector
Definition TypeBase.h:4265
@ SveFixedLengthPredicate
is AArch64 SVE fixed-length predicate vector
Definition TypeBase.h:4271
U cast(CodeGen::Address addr)
Definition Address.h:327
@ PackIndex
Index of a pack indexing expression or specifier.
Definition Sema.h:846
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
Definition TypeBase.h:6020
@ None
No keyword precedes the qualified type name.
Definition TypeBase.h:6041
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
Definition OpenMPKinds.h:28
@ EST_DependentNoexcept
noexcept(expression), value-dependent
@ 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)
@ NOUR_Discarded
This name appears as a potential result of a discarded value expression.
Definition Specifiers.h:184
@ NOUR_Unevaluated
This name appears in an unevaluated operand.
Definition Specifiers.h:178
@ NOUR_None
This is an odr-use.
Definition Specifiers.h:176
@ NOUR_Constant
This name appears as a potential result of an lvalue-to-rvalue conversion that is a constant expressi...
Definition Specifiers.h:181
static constexpr TerminalColor Value
static constexpr TerminalColor Address
static constexpr TerminalColor Comment
static constexpr TerminalColor DeclKindName
static constexpr TerminalColor ObjectKind
static constexpr TerminalColor Null
static constexpr TerminalColor Location
static constexpr TerminalColor Attr
static constexpr TerminalColor DeclName
static constexpr TerminalColor Stmt
static constexpr TerminalColor Cast
static constexpr TerminalColor ValueKind
static constexpr TerminalColor Undeserialized
static constexpr TerminalColor Type
static constexpr TerminalColor Errors
FunctionDecl * SourceDecl
The function whose exception specification this is, for EST_Unevaluated and EST_Uninstantiated.
Definition TypeBase.h:5490
FunctionDecl * SourceTemplate
The function template whose exception specification this is instantiated from, for EST_Uninstantiated...
Definition TypeBase.h:5494
ExceptionSpecificationType Type
The kind of exception specification this is.
Definition TypeBase.h:5480
Extra information about a function prototype.
Definition TypeBase.h:5506
static StringRef getKeywordName(ElaboratedTypeKeyword Keyword)
Definition Type.cpp:3466
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:871
Information about a single command.