20 using namespace clang;
28 OS <<
" first " << First;
35 OS <<
" prev " << Prev;
42 #define DECL(DERIVED, BASE) \ 44 return dumpPreviousDeclImpl(OS, cast<DERIVED##Decl>(D)); 45 #define ABSTRACT_DECL(DECL) 46 #include "clang/AST/DeclNodes.inc" 48 llvm_unreachable(
"Decl that isn't part of DeclNodes.inc!");
56 PrintPolicy(PrintPolicy), Traits(Traits) {}
86 #include "clang/Basic/AttrList.inc" 102 OS <<
"TemplateArgument";
125 if (
const auto *E = dyn_cast<Expr>(Node)) {
130 switch (E->getValueKind()) {
144 switch (E->getObjectKind()) {
151 OS <<
" objcproperty";
154 OS <<
" objcsubscript";
157 OS <<
" vectorcomponent";
172 if (isa<LocInfoType>(T)) {
175 OS <<
"LocInfo Type";
191 if (SingleStepDesugar !=
QualType(T, 0))
197 OS <<
" instantiation_dependent";
200 OS <<
" variably_modified";
202 OS <<
" contains_unexpanded_pack";
238 OS <<
" in " << M->getFullModuleName();
239 if (
auto *ND = dyn_cast<NamedDecl>(D))
241 const_cast<NamedDecl *>(ND)))
242 AddChild([=] { OS <<
"also in " << M->getFullModuleName(); });
243 if (
const NamedDecl *ND = dyn_cast<NamedDecl>(D))
257 if (FD->isConstexpr())
262 OS <<
"CXXCtorInitializer";
271 llvm_unreachable(
"Unknown initializer type");
290 OS <<
"<<<NULL>>> OMPClause";
296 OS <<
"OMP" << ClauseName.substr(0, 1).upper()
297 << ClauseName.drop_front() <<
"Clause";
322 OS <<
"<invalid sloc>";
326 if (strcmp(PLoc.
getFilename(), LastLocFilename) != 0) {
331 }
else if (PLoc.
getLine() != LastLocLine) {
361 if (Desugar && !T.
isNull()) {
364 if (T_split != D_split)
387 if (
const NamedDecl *ND = dyn_cast<NamedDecl>(D)) {
389 OS <<
" '" << ND->getDeclName() <<
'\'';
392 if (
const ValueDecl *VD = dyn_cast<ValueDecl>(D))
419 void TextNodeDumper::dumpCXXTemporary(
const CXXTemporary *Temporary) {
420 OS <<
"(CXXTemporary";
436 const char *TextNodeDumper::getCommandName(
unsigned CommandID) {
443 return "<not a builtin command>";
448 OS <<
" Text=\"" << C->
getText() <<
"\"";
453 OS <<
" Name=\"" << getCommandName(C->
getCommandID()) <<
"\"";
456 OS <<
" RenderNormal";
462 OS <<
" RenderMonospaced";
465 OS <<
" RenderEmphasized";
469 for (
unsigned i = 0, e = C->
getNumArgs(); i != e; ++i)
470 OS <<
" Arg[" << i <<
"]=\"" << C->
getArgText(i) <<
"\"";
478 for (
unsigned i = 0, e = C->
getNumAttrs(); i != e; ++i) {
480 OS <<
" \"" << Attr.
Name <<
"=\"" << Attr.
Value <<
"\"";
484 OS <<
" SelfClosing";
494 OS <<
" Name=\"" << getCommandName(C->
getCommandID()) <<
"\"";
495 for (
unsigned i = 0, e = C->
getNumArgs(); i != e; ++i)
496 OS <<
" Arg[" << i <<
"]=\"" << C->
getArgText(i) <<
"\"";
531 for (
unsigned i = 0, e = C->
getDepth(); i != e; ++i) {
551 OS <<
" Text=\"" << C->
getText() <<
"\"";
556 OS <<
" Text=\"" << C->
getText() <<
"\"";
589 OS <<
" template expansion ";
648 OS <<
" '" << Node->
getName() <<
"'";
679 OS <<
" part_of_explicit_cast";
697 OS <<
"ADL) = '" << Node->
getName() <<
'\'';
712 OS <<
"='" << *Node->
getDecl() <<
"'";
730 OS <<
" " << Node->
getValue().toString(10, isSigned);
757 OS <<
" " << (Node->
isPostfix() ?
"postfix" :
"prefix") <<
" '" 760 OS <<
" cannot overflow";
776 OS <<
" __builtin_omp_required_simd_align";
803 <<
"' ComputeLHSTy=";
805 OS <<
" ComputeResultTy=";
823 OS <<
" " << (Node->
getValue() ?
"true" :
"false");
851 OS <<
" std::initializer_list";
889 OS <<
" extended by ";
922 OS <<
" super (instance)";
926 OS <<
" super (class)";
934 BoxingMethod->getSelector().print(OS);
958 OS <<
" Kind=MethodRef Getter=\"";
964 OS <<
"\" Setter=\"";
966 Setter->getSelector().print(OS);
980 OS <<
"Getter&Setter";
990 OS <<
" Kind=ArraySubscript GetterForArray=\"";
992 OS <<
" Kind=DictionarySubscript GetterForDictionary=\"";
999 OS <<
"\" SetterForArray=\"";
1001 OS <<
"\" SetterForDictionary=\"";
1009 OS <<
" " << (Node->
getValue() ?
"__objc_yes" :
"__objc_no");
1014 OS <<
" written as lvalue reference";
1063 OS <<
" altivec pixel";
1066 OS <<
" altivec bool";
1080 if (EI.getNoReturn())
1082 if (EI.getProducesResult())
1083 OS <<
" produces_result";
1084 if (EI.getHasRegParm())
1085 OS <<
" regparm " << EI.getRegParm();
1091 if (EPI.HasTrailingReturn)
1092 OS <<
" trailing_return";
1099 switch (EPI.RefQualifier) {
1125 OS <<
" underlying_type";
1143 OS <<
" decltype(auto)";
1167 OS <<
" expansions " << *N;
ObjCPropertyRefExpr - A dot-syntax expression to access an ObjC property.
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
The receiver is the instance of the superclass object.
void VisitObjCIvarRefExpr(const ObjCIvarRefExpr *Node)
Represents a function declaration or definition.
static const TerminalColor StmtColor
NamedDecl * getFoundDecl()
Get the NamedDecl through which this reference occurred.
The receiver is an object instance.
void VisitCXXDeleteExpr(const CXXDeleteExpr *Node)
A class which contains all the information about a particular captured value.
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
Represents the dependent type named by a dependently-scoped typename using declaration, e.g.
void VisitIfStmt(const IfStmt *Node)
A (possibly-)qualified type.
void VisitNullPtrTemplateArgument(const TemplateArgument &TA)
const char * getDeclKindName() const
ValueDecl * getMemberDecl() const
Retrieve the member declaration to which this expression refers.
ObjCMethodDecl * getAtIndexMethodDecl() const
Selector getSelector() const
void VisitCXXConstructExpr(const CXXConstructExpr *Node)
bool isSuperReceiver() const
bool hasVarStorage() const
True if this IfStmt has storage for a variable declaration.
static void dumpPreviousDeclImpl(raw_ostream &OS,...)
bool isListInitialization() const
Determine whether this expression models list-initialization.
RetTy Visit(REF(TemplateArgument) TA, ParamTys... P)
ObjCProtocolDecl * getProtocol() const
Stmt - This represents one statement.
FunctionType - C99 6.7.5.3 - Function Declarators.
IfStmt - This represents an if/then/else.
ObjCMethodDecl * setAtIndexMethodDecl() const
bool isDecltypeAuto() const
void VisitPredefinedExpr(const PredefinedExpr *Node)
void VisitCompoundAssignOperator(const CompoundAssignOperator *Node)
Decl - This represents one declaration (or definition), e.g.
TagDecl * getDecl() const
void VisitObjCProtocolExpr(const ObjCProtocolExpr *Node)
ObjCMethodDecl * getImplicitPropertySetter() const
FunctionDecl * getOperatorNew() const
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Defines the C++ template declaration subclasses.
Represents a C++11 auto or C++14 decltype(auto) type.
void visitTParamCommandComment(const comments::TParamCommandComment *C, const comments::FullComment *FC)
void VisitCaseStmt(const CaseStmt *Node)
The base class of the type hierarchy.
bool requiresZeroInitialization() const
Whether this construction first requires zero-initialization before the initializer is called...
void VisitCastExpr(const CastExpr *Node)
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Represents a call to a C++ constructor.
ObjCSubscriptRefExpr - used for array and dictionary subscripting.
RetTy Visit(const Type *T)
Performs the operation associated with this visitor object.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
bool hasVarStorage() const
True if this SwitchStmt has storage for a condition variable.
IdentKind getIdentKind() const
void VisitObjCBoolLiteralExpr(const ObjCBoolLiteralExpr *Node)
TemplateTypeParmDecl * getDecl() const
Represents a C++ constructor within a class.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
static const TerminalColor ObjectKindColor
void dumpSourceRange(SourceRange R)
void VisitSizeOfPackExpr(const SizeOfPackExpr *Node)
const CXXBaseSpecifier *const * path_const_iterator
An Objective-C array/dictionary subscripting which reads an object or writes at the subscripted array...
void VisitTagType(const TagType *T)
const T * getAs() const
Member-template getAs<specific type>'.
void VisitExtVectorElementExpr(const ExtVectorElementExpr *Node)
ObjCMethodDecl - Represents an instance or class method declaration.
bool hasInitStorage() const
True if this SwitchStmt has storage for an init statement.
void VisitVectorType(const VectorType *T)
DeclarationName getName() const
Gets the name looked up.
const char * getName() const
bool isInvalidDecl() const
bool requiresADL() const
True if this declaration should be extended by argument-dependent lookup.
Describes how types, statements, expressions, and declarations should be printed. ...
Represents an expression – generally a full-expression – that introduces cleanups to be run at the ...
ObjCPropertyDecl * getExplicitProperty() const
void VisitDeclarationTemplateArgument(const TemplateArgument &TA)
void VisitTemplateSpecializationType(const TemplateSpecializationType *T)
const char * getStmtClassName() const
SourceLocation getAttributeLoc() const
LabelStmt - Represents a label, which has a substatement.
void VisitCXXNamedCastExpr(const CXXNamedCastExpr *Node)
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
const char * getOpenMPClauseName(OpenMPClauseKind Kind)
Provides common interface for the Decls that can be redeclared.
void VisitMaterializeTemporaryExpr(const MaterializeTemporaryExpr *Node)
QualType getComputationResultType() const
bool isImplicit() const
Returns true if the attribute has been implicitly created instead of explicitly written by the user...
A vector component is an element or range of elements on a vector.
Used for GCC's __alignof.
bool isSpelledAsLValue() const
void VisitPackTemplateArgument(const TemplateArgument &TA)
TemplateName getTemplateName() const
Retrieve the name of the template that we are specializing.
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
The iterator over UnresolvedSets.
void VisitFunctionProtoType(const FunctionProtoType *T)
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
ExtVectorElementExpr - This represents access to specific elements of a vector, and may occur on the ...
Describes a module or submodule.
An r-value expression (a pr-value in the C++11 taxonomy) produces a temporary value.
Selector getSelector() const
Represents Objective-C's @catch statement.
StringRef getOpcodeStr() const
void VisitSwitchStmt(const SwitchStmt *Node)
Describes an C or C++ initializer list.
void VisitCXXBindTemporaryExpr(const CXXBindTemporaryExpr *Node)
UnresolvedUsingTypenameDecl * getDecl() const
An lvalue ref-qualifier was provided (&).
bool isMessagingSetter() const
True if the property reference will result in a message to the setter.
FunctionDecl * getOperatorDelete() const
bool isElidable() const
Whether this construction is elidable.
void VisitUnresolvedLookupExpr(const UnresolvedLookupExpr *Node)
An x-value expression is a reference to an object with independent storage but which can be "moved"...
bool isTypeAlias() const
Determine if this template specialization type is for a type alias template that has been substituted...
path_iterator path_begin()
void VisitObjCSubscriptRefExpr(const ObjCSubscriptRefExpr *Node)
bool isByRef() const
Whether this is a "by ref" capture, i.e.
bool containsUnexpandedParameterPack() const
Whether this type is or contains an unexpanded parameter pack, used to support C++0x variadic templat...
A builtin binary operation expression such as "x + y" or "x <= y".
static bool isPostfix(Opcode Op)
isPostfix - Return true if this is a postfix operation, like x++.
void VisitObjCAtCatchStmt(const ObjCAtCatchStmt *Node)
bool hasElseStorage() const
True if this IfStmt has storage for an else statement.
CXXRecordDecl * getDecl() const
static const TerminalColor DeclNameColor
void VisitTemplateTypeParmType(const TemplateTypeParmType *T)
void VisitTemplateExpansionTemplateArgument(const TemplateArgument &TA)
static const TerminalColor LocationColor
void VisitExpressionTemplateArgument(const TemplateArgument &TA)
CaseStmt - Represent a case statement.
bool isAnyMemberInitializer() const
void dumpLocation(SourceLocation Loc)
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Represents binding an expression to a temporary.
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC)...
SourceLocation getSpellingLoc(SourceLocation Loc) const
Given a SourceLocation object, return the spelling location referenced by the ID. ...
CXXTemporary * getTemporary()
FieldDecl * getAnyMember() const
void * getAsOpaquePtr() const
void VisitLabelStmt(const LabelStmt *Node)
An ordinary object is located at an address in memory.
Represents a C++ member access expression where the actual member referenced could not be resolved be...
is ARM Neon polynomial vector
SplitQualType getSplitDesugaredType() const
void visitHTMLStartTagComment(const comments::HTMLStartTagComment *C, const comments::FullComment *)
Represents an extended vector type where either the type or size is dependent.
void visitVerbatimBlockComment(const comments::VerbatimBlockComment *C, const comments::FullComment *)
Represents the this expression in C++.
QualType getTypeAsWritten() const
getTypeAsWritten - Returns the type that this expression is casting to, as written in the source code...
decl_type * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
void VisitInjectedClassNameType(const InjectedClassNameType *T)
const ValueDecl * getExtendingDecl() const
Get the declaration which triggered the lifetime-extension of this temporary, if any.
void VisitDependentSizedExtVectorType(const DependentSizedExtVectorType *T)
void VisitTemplateTemplateArgument(const TemplateArgument &TA)
bool isStdInitListInitialization() const
Whether this constructor call was written as list-initialization, but was interpreted as forming a st...
ArrayRef< Module * > getModulesWithMergedDefinition(const NamedDecl *Def)
Get the additional modules in which the definition Def has been merged.
Represents a prototype with parameter type info, e.g.
void VisitImplicitCastExpr(const ImplicitCastExpr *Node)
CXXConstructorDecl * getConstructor() const
Get the constructor that this expression will (ultimately) call.
QualType getComputationLHSType() const
OpenMPClauseKind getClauseKind() const
Returns kind of OpenMP clause (private, shared, reduction, etc.).
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
UnaryExprOrTypeTraitExpr - expression with either a type or (unevaluated) expression operand...
void VisitObjCPropertyRefExpr(const ObjCPropertyRefExpr *Node)
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
void outputString(raw_ostream &OS) const
unsigned getValue() const
An Objective-C property is a logical field of an Objective-C object which is read and written via Obj...
Represents an array type in C++ whose size is a value-dependent expression.
ObjCMethodDecl * getBoxingMethod() const
static const TerminalColor ValueColor
static const TerminalColor CommentColor
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
void visitParamCommandComment(const comments::ParamCommandComment *C, const comments::FullComment *FC)
void visitInlineCommandComment(const comments::InlineCommandComment *C, const comments::FullComment *)
bool isInvalid() const
Return true if this object is invalid or uninitialized.
unsigned getIndex() const
void VisitObjCSelectorExpr(const ObjCSelectorExpr *Node)
unsigned getLine() const
Return the presumed line number of this location.
void visitVerbatimBlockLineComment(const comments::VerbatimBlockLineComment *C, const comments::FullComment *)
void VisitCXXFunctionalCastExpr(const CXXFunctionalCastExpr *Node)
bool isImplicit() const
isImplicit - Indicates whether the declaration was implicitly generated by the implementation.
TextNodeDumper(raw_ostream &OS, bool ShowColors, const SourceManager *SM, const PrintingPolicy &PrintPolicy, const comments::CommandTraits *Traits)
const char * getTypeClassName() const
QualType getArgumentType() const
DeclContext * getDeclContext()
ObjCSelectorExpr used for @selector in Objective-C.
Represents an expression that computes the length of a parameter pack.
IdentifierInfo & getAccessor() const
decls_iterator decls_begin() const
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
bool isSignedIntegerType() const
Return true if this is an integer type that is signed, according to C99 6.2.5p4 [char, signed char, short, int, long..], or an enum decl which has a signed representation.
void print(llvm::raw_ostream &OS) const
Prints the full selector name (e.g. "foo:bar:").
static const TerminalColor ValueKindColor
void VisitGotoStmt(const GotoStmt *Node)
void dump(raw_ostream &OS) const
Debugging aid that dumps the template name.
Qualifiers Quals
The local qualifiers.
LabelDecl * getLabel() const
QualType getEncodedType() const
An expression that sends a message to the given Objective-C object or class.
void VisitTypedefType(const TypedefType *T)
Represents an unpacked "presumed" location which can be presented to the user.
ObjCMethodDecl * getImplicitPropertyGetter() const
SourceLocation getEnd() const
UnaryOperator - This represents the unary-expression's (except sizeof and alignof), the postinc/postdec operators from postfix-expression, and various extensions.
void dumpBareType(QualType T, bool Desugar=true)
Represents a GCC generic vector type.
ReceiverKind getReceiverKind() const
Determine the kind of receiver that this message is being sent to.
ArraySizeModifier getSizeModifier() const
Selector getSelector() const
std::string getAsString() const
static QualType Desugar(ASTContext &Context, QualType QT, bool &ShouldAKA)
void VisitExprWithCleanups(const ExprWithCleanups *Node)
bool isNull() const
Return true if this QualType doesn't point to a type yet.
void visitBlockCommandComment(const comments::BlockCommandComment *C, const comments::FullComment *)
void VisitFloatingLiteral(const FloatingLiteral *Node)
SplitQualType split() const
Divides a QualType into its unqualified type and a set of local qualifiers.
const char * getFilename() const
Return the presumed filename of this location.
is AltiVec 'vector Pixel'
static StringRef getIdentKindName(IdentKind IK)
not a target-specific vector type
bool isImplicitProperty() const
decl_type * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
void VisitNullTemplateArgument(const TemplateArgument &TA)
ExtProtoInfo getExtProtoInfo() const
unsigned getColumn() const
Return the presumed column number of this location.
Encodes a location in the source.
ObjCInterfaceDecl * getDecl() const
Get the declaration of this interface.
void VisitIntegralTemplateArgument(const TemplateArgument &TA)
void VisitDependentSizedArrayType(const DependentSizedArrayType *T)
bool hasVarStorage() const
True if this WhileStmt has storage for a condition variable.
void dumpPointer(const void *Ptr)
Represents a C++ temporary.
void VisitFixedPointLiteral(const FixedPointLiteral *Node)
Interfaces are the core concept in Objective-C for object oriented design.
bool isVariablyModifiedType() const
Whether this type is a variably-modified type (C99 6.7.5).
std::string getNameAsString() const
Get a human-readable name for the declaration, even if it is one of the special kinds of names (C++ c...
Represents a new-expression for memory allocation and constructor calls, e.g: "new CXXNewExpr(foo)"...
ASTContext & getASTContext() const LLVM_READONLY
void VisitCXXBoolLiteralExpr(const CXXBoolLiteralExpr *Node)
static void dumpBasePath(raw_ostream &OS, const CastExpr *Node)
QualType getLocallyUnqualifiedSingleStepDesugaredType() const
Pull a single level of sugar off of this locally-unqualified type.
std::string getValueAsString(unsigned Radix) const
void VisitMemberExpr(const MemberExpr *Node)
void VisitCallExpr(const CallExpr *Node)
bool canOverflow() const
Returns true if the unary operator can cause an overflow.
No ref-qualifier was provided.
const char * getNameStart() const
Return the beginning of the actual null-terminated string for this identifier.
This file defines OpenMP nodes for declarative directives.
bool isParameterPack() const
This is a basic class for representing single OpenMP clause.
UnaryExprOrTypeTrait getKind() const
static const TerminalColor NullColor
ObjCProtocolExpr used for protocol expression in Objective-C.
is AltiVec 'vector bool ...'
ImplicitCastExpr - Allows us to explicitly represent implicit type conversions, which have no direct ...
bool isFromASTFile() const
Determine whether this declaration came from an AST file (such as a precompiled header or module) rat...
void dumpDeclRef(const Decl *D, StringRef Label={})
bool isMessagingGetter() const
True if the property reference will result in a message to the getter.
void VisitCXXNewExpr(const CXXNewExpr *Node)
Qualifiers getIndexTypeQualifiers() const
Used for C's _Alignof and C++'s alignof.
void VisitVariableArrayType(const VariableArrayType *T)
bool isUsed(bool CheckUsedAttr=true) const
Whether any (re-)declaration of the entity was used, meaning that a definition is required...
VarDecl * getVariable() const
The variable being captured.
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
void VisitInitListExpr(const InitListExpr *ILE)
An rvalue ref-qualifier was provided (&&).
SourceRange getBracketsRange() const
void VisitPackExpansionType(const PackExpansionType *T)
ObjCBoxedExpr - used for generalized expression boxing.
bool isArgumentType() const
Optional< unsigned > getNumExpansions() const
Retrieve the number of expansions that this pack expansion will generate, if known.
bool isPartOfExplicitCast() const
std::string getAsString() const
bool isInstantiationDependentType() const
Determine whether this type is an instantiation-dependent type, meaning that the type involves a temp...
void VisitObjCEncodeExpr(const ObjCEncodeExpr *Node)
The injected class name of a C++ class template or class template partial specialization.
Represents a pack expansion of types.
CompoundAssignOperator - For compound assignments (e.g.
void VisitArrayType(const ArrayType *T)
SourceRange getRange() const
void VisitIntegerLiteral(const IntegerLiteral *Node)
AddrLabelExpr - The GNU address of label extension, representing &&label.
ast_type_traits::DynTypedNode Node
void dumpAccessSpecifier(AccessSpecifier AS)
Represents a template argument.
bool isThisDeclarationReferenced() const
Whether this declaration was referenced.
Dataflow Directional Tag Classes.
ExtInfo getExtInfo() const
[C99 6.4.2.2] - A predefined identifier such as func.
static const TerminalColor AttrColor
Represents a delete expression for memory deallocation and destructor calls, e.g. ...
bool isNested() const
Whether this is a nested capture, i.e.
bool hasInitStorage() const
True if this IfStmt has the storage for an init statement.
void visitTextComment(const comments::TextComment *C, const comments::FullComment *)
DeclarationName getMember() const
Retrieve the name of the member that this expression refers to.
VectorKind getVectorKind() const
static std::string getAsString(SplitQualType split, const PrintingPolicy &Policy)
void VisitUnresolvedUsingType(const UnresolvedUsingType *T)
bool isListInitialization() const
Whether this constructor call was written as list-initialization.
const Type * getBaseClass() const
If this is a base class initializer, returns the type of the base class.
void VisitDeclRefExpr(const DeclRefExpr *Node)
PresumedLoc getPresumedLoc(SourceLocation Loc, bool UseLineDirectives=true) const
Returns the "presumed" location of a SourceLocation specifies.
void VisitObjCMessageExpr(const ObjCMessageExpr *Node)
SourceLocation getBeginLoc() const
Returns the starting location of the clause.
llvm::APInt getValue() const
LabelDecl * getLabel() const
void VisitTypeTemplateArgument(const TemplateArgument &TA)
SourceLocation getEndLoc() const
Returns the ending location of the clause.
QualType getClassReceiver() const
Returns the type of a class message send, or NULL if the message is not a class message.
void VisitAddrLabelExpr(const AddrLabelExpr *Node)
SwitchStmt - This represents a 'switch' stmt.
void Visit(const comments::Comment *C, const comments::FullComment *FC)
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
void VisitCXXDependentScopeMemberExpr(const CXXDependentScopeMemberExpr *Node)
void VisitFunctionType(const FunctionType *T)
Represents a C++ base or member initializer.
unsigned getNumObjects() const
ObjCEncodeExpr, used for @encode in Objective-C.
bool isFromAST() const
Whether this type comes from an AST file.
void VisitConstantArrayType(const ConstantArrayType *T)
static void dumpPreviousDecl(raw_ostream &OS, const Decl *D)
Dump the previous declaration in the redeclaration chain for a declaration, if any.
static const TerminalColor CastColor
const llvm::APInt & getSize() const
static const TerminalColor TypeColor
Base for LValueReferenceType and RValueReferenceType.
static const TerminalColor DeclKindNameColor
SourceRange getBracketsRange() const
static const char * getCastKindName(CastKind CK)
void VisitCXXUnresolvedConstructExpr(const CXXUnresolvedConstructExpr *Node)
bool isArrow() const
Determine whether this member expression used the '->' operator; otherwise, it used the '...
Represents a base class of a C++ class.
A bitfield object is a bitfield on a C or C++ record.
void VisitCharacterLiteral(const CharacterLiteral *Node)
ObjCIvarRefExpr - A reference to an ObjC instance variable.
Describes an explicit type conversion that uses functional notion but could not be resolved because o...
GotoStmt - This represents a direct goto.
void VisitBinaryOperator(const BinaryOperator *Node)
TypedefNameDecl * getDecl() const
unsigned getDepth() const
void dumpName(const NamedDecl *ND)
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Represents a C++ struct/union/class.
void VisitUnaryTransformType(const UnaryTransformType *T)
Represents an explicit C++ type conversion that uses "functional" notation (C++ [expr.type.conv]).
WhileStmt - This represents a 'while' stmt.
void dumpBareDeclRef(const Decl *D)
CleanupObject getObject(unsigned i) const
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
bool isGlobalDelete() const
void VisitObjCInterfaceType(const ObjCInterfaceType *T)
StringLiteral - This represents a string literal expression, e.g.
void dumpType(QualType T)
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
RetTy Visit(PTR(Stmt) S, ParamTys... P)
Abstract class common to all of the C++ "named"/"keyword" casts.
unsigned getNumElements() const
ObjCBoolLiteralExpr - Objective-C Boolean Literal.
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
QualType getAsType() const
Retrieve the type for a type template argument.
A reference to a declared variable, function, enum, etc.
Represents a type template specialization; the template must be a class template, a type alias templa...
const VarDecl * getCatchParamDecl() const
const char * getCastName() const
getCastName - Get the name of the C++ cast being used, e.g., "static_cast", "dynamic_cast", "reinterpret_cast", or "const_cast".
FieldDecl * getInitializedFieldInUnion()
If this initializes a union, specifies which field in the union to initialize.
bool isArraySubscriptRefExpr() const
QualType getTypeAsWritten() const
Retrieve the type that is being constructed, as specified in the source code.
static StringRef getNameForCallConv(CallingConv CC)
An l-value expression is a reference to an object with independent storage.
void VisitAutoType(const AutoType *T)
static const TerminalColor AddressColor
A trivial tuple used to represent a source range.
static StringRef getOpcodeStr(Opcode Op)
getOpcodeStr - Turn an Opcode enum value into the punctuation char it corresponds to...
This represents a decl that may have a name.
A boolean literal, per ([C++ lex.bool] Boolean literals).
Represents a C array with a specified size that is not an integer-constant-expression.
void VisitCXXThisExpr(const CXXThisExpr *Node)
TemplateName getAsTemplate() const
Retrieve the template name for a template name argument.
void VisitUnaryExprOrTypeTraitExpr(const UnaryExprOrTypeTraitExpr *Node)
void visitHTMLEndTagComment(const comments::HTMLEndTagComment *C, const comments::FullComment *)
void visitVerbatimLineComment(const comments::VerbatimLineComment *C, const comments::FullComment *)
double getValueAsApproximateDouble() const
getValueAsApproximateDouble - This returns the value as an inaccurate double.
attr::Kind getKind() const
The receiver is a superclass.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name.
SourceLocation getBegin() const
NamedDecl * getPack() const
Retrieve the parameter pack.
decls_iterator decls_end() const
bool caseStmtIsGNURange() const
True if this case statement is of the form case LHS ...
Represents the canonical version of C arrays with a specified constant size.
This class handles loading and caching of source files into memory.
void VisitUnaryOperator(const UnaryOperator *Node)
void AddChild(Fn DoAddChild)
Add a child of the current node. Calls DoAddChild without arguments.
Attr - This represents one attribute.
SourceLocation getLocation() const
QualType getType() const
Return the type wrapped by this type source info.
void VisitObjCBoxedExpr(const ObjCBoxedExpr *Node)
void VisitWhileStmt(const WhileStmt *Node)
void VisitStringLiteral(const StringLiteral *Str)
QualType getType() const
Retrieves the type of the base class.
void VisitRValueReferenceType(const ReferenceType *T)