;
35 conststd::pair<FileID, unsigned> &Decomposed =
SM.getDecomposedLoc(
Loc);
38OS << llvm::sys::path::filename(FE->
getName());
47OS <<
'@'<< Decomposed.second;
56 return attr->getDefinedIn();
64llvm::raw_svector_ostream Out;
67 boolIgnoreResults =
false;
68 boolgeneratedLoc =
false;
70llvm::DenseMap<const Type *, unsigned> TypeSubstitutions;
75: Buf(Buf), Out(Buf), Context(Ctx), LangOpts(LangOpts) {
80 boolignoreResults()
const{
returnIgnoreResults; }
96 voidVisitTagDecl(
const TagDecl*
D);
99 voidVisitVarDecl(
const VarDecl*
D);
108IgnoreResults =
true;
112IgnoreResults =
true;
119 boolEmittedDeclName = !EmitDeclName(
D);
120assert(EmittedDeclName &&
"EmitDeclName can not fail for UsingDecls");
121(void)EmittedDeclName;
124 boolShouldGenerateLocation(
const NamedDecl*
D);
130 voidGenExtSymbolContainer(
const NamedDecl*
D);
134 boolGenLoc(
const Decl*
D,
boolIncludeOffset);
143 voidGenObjCClass(StringRef cls, StringRef ExtSymDefinedIn,
144StringRef CategoryContextExtSymbolDefinedIn) {
146CategoryContextExtSymbolDefinedIn);
150 voidGenObjCCategory(StringRef cls, StringRef cat,
151StringRef clsExt, StringRef catExt) {
156 voidGenObjCProperty(StringRef prop,
boolisClassProp) {
161 voidGenObjCProtocol(StringRef prot, StringRef ext) {
182boolUSRGenerator::EmitDeclName(
const NamedDecl*
D) {
190boolUSRGenerator::ShouldGenerateLocation(
const NamedDecl*
D) {
191 if(
D->isExternallyVisible())
199 return!
SM.isInSystemHeader(
Loc);
202voidUSRGenerator::VisitDeclContext(
const DeclContext*DC) {
203 if(
const NamedDecl*
D= dyn_cast<NamedDecl>(DC))
205 else if(isa<LinkageSpecDecl>(DC))
209voidUSRGenerator::VisitFieldDecl(
const FieldDecl*
D) {
216Out << (isa<ObjCIvarDecl>(
D) ?
"@":
"@FI@");
217 if(EmitDeclName(
D)) {
219IgnoreResults =
true;
224voidUSRGenerator::VisitFunctionDecl(
const FunctionDecl*
D) {
225 if(ShouldGenerateLocation(
D) && GenLoc(
D,
isLocal(
D)))
228 if(
D->getType().isNull()) {
229IgnoreResults =
true;
233 const unsignedStartSize = Buf.size();
235 if(Buf.size() == StartSize)
236GenExtSymbolContainer(
D);
238 boolIsTemplate =
false;
242VisitTemplateParameterList(FunTmpl->getTemplateParameters());
249Policy.SuppressTemplateArgsInCXXConstructors =
true;
250 D->getDeclName().
print(Out, Policy);
252 if((!LangOpts.CPlusPlus ||
D->isExternC()) &&
253!
D->
hasAttr<OverloadableAttr>())
256 if(
D->isFunctionTemplateSpecialization()) {
259 D->getTemplateSpecializationArgs()) {
260 for(
const auto&Arg : SpecArgs->asArray()) {
262VisitTemplateArgument(Arg);
265 D->getTemplateSpecializationArgsAsWritten()) {
266 for(
const auto&ArgLoc : SpecArgsWritten->arguments()) {
268VisitTemplateArgument(ArgLoc.getArgument());
274 QualTypeCanonicalType =
D->getType().getCanonicalType();
277 for(
QualTypePT : FPT->param_types()) {
282 if(
D->isVariadic())
291VisitType(
D->getReturnType());
298 if(
unsignedquals = MD->getMethodQualifiers().getCVRUQualifiers())
299Out << (char)(
'0'+ quals);
300 switch(MD->getRefQualifier()) {
308voidUSRGenerator::VisitNamedDecl(
const NamedDecl*
D) {
312 if(EmitDeclName(
D)) {
317IgnoreResults =
true;
321voidUSRGenerator::VisitVarDecl(
const VarDecl*
D) {
325 if(ShouldGenerateLocation(
D) && GenLoc(
D,
isLocal(
D)))
332VisitTemplateParameterList(VarTmpl->getTemplateParameters());
334= dyn_cast<VarTemplatePartialSpecializationDecl>(
D)) {
336VisitTemplateParameterList(PartialSpec->getTemplateParameters());
340StringRef
s=
D->getName();
347IgnoreResults =
true;
353= dyn_cast<VarTemplateSpecializationDecl>(
D)) {
356 for(
unsignedI = 0, N = Args.
size(); I != N; ++I) {
358VisitTemplateArgument(Args.
get(I));
363voidUSRGenerator::VisitBindingDecl(
const BindingDecl*
D) {
364 if(isLocal(
D) && GenLoc(
D,
true))
369voidUSRGenerator::VisitNonTypeTemplateParmDecl(
374voidUSRGenerator::VisitTemplateTemplateParmDecl(
383 if(
D->isAnonymousNamespace()) {
387Out <<
"@N@"<<
D->getName();
391VisitFunctionDecl(
D->getTemplatedDecl());
395VisitTagDecl(
D->getTemplatedDecl());
401Out <<
"@NA@"<<
D->getName();
407 if(
auto*ICD = dyn_cast<ObjCCategoryImplDecl>(
D->
getDeclContext()))
408 returnICD->getCategoryDecl();
422IgnoreResults =
true;
426VisitObjCContainerDecl(ID, CD);
431Out << (
D->isInstanceMethod() ?
"(im)":
"(cm)")
439llvm_unreachable(
"Invalid ObjC container.");
440 caseDecl::ObjCInterface:
441 caseDecl::ObjCImplementation:
445 caseDecl::ObjCCategory: {
453IgnoreResults =
true;
459Out <<
"objc(ext)"<<
ID->getName() <<
'@';
463GenObjCCategory(
ID->getName(), CD->
getName(),
469 caseDecl::ObjCCategoryImpl: {
477IgnoreResults =
true;
480GenObjCCategory(
ID->getName(), CD->
getName(),
485 caseDecl::ObjCProtocol: {
500GenObjCProperty(
D->getName(),
D->isClassProperty());
505VisitObjCPropertyDecl(PD);
509IgnoreResults =
true;
512voidUSRGenerator::VisitTagDecl(
const TagDecl*
D) {
515 if(!isa<EnumDecl>(
D) &&
516ShouldGenerateLocation(
D) && GenLoc(
D,
isLocal(
D)))
519GenExtSymbolContainer(
D);
524 boolAlreadyStarted =
false;
525 if(
const CXXRecordDecl*CXXRecord = dyn_cast<CXXRecordDecl>(
D)) {
527AlreadyStarted =
true;
529 switch(
D->getTagKind()) {
530 caseTagTypeKind::Interface:
531 caseTagTypeKind::Class:
532 caseTagTypeKind::Struct:
535 caseTagTypeKind::Union:
538 caseTagTypeKind::Enum:
539llvm_unreachable(
"enum template");
541VisitTemplateParameterList(ClassTmpl->getTemplateParameters());
543= dyn_cast<ClassTemplatePartialSpecializationDecl>(CXXRecord)) {
544AlreadyStarted =
true;
546 switch(
D->getTagKind()) {
547 caseTagTypeKind::Interface:
548 caseTagTypeKind::Class:
549 caseTagTypeKind::Struct:
552 caseTagTypeKind::Union:
555 caseTagTypeKind::Enum:
556llvm_unreachable(
"enum partial specialization");
558VisitTemplateParameterList(PartialSpec->getTemplateParameters());
562 if(!AlreadyStarted) {
563 switch(
D->getTagKind()) {
564 caseTagTypeKind::Interface:
565 caseTagTypeKind::Class:
566 caseTagTypeKind::Struct:
569 caseTagTypeKind::Union:
572 caseTagTypeKind::Enum:
579assert(Buf.size() > 0);
580 const unsignedoff = Buf.size() - 1;
582 if(EmitDeclName(
D)) {
587 if(
D->isEmbeddedInDeclarator() && !
D->isFreeStanding()) {
591 if(
auto*ED = dyn_cast<EnumDecl>(
D)) {
594 autoenum_range = ED->enumerators();
595 if(enum_range.begin() != enum_range.end()) {
596Out <<
'@'<< **enum_range.begin();
605= dyn_cast<ClassTemplateSpecializationDecl>(
D)) {
608 for(
unsignedI = 0, N = Args.
size(); I != N; ++I) {
610VisitTemplateArgument(Args.
get(I));
615voidUSRGenerator::VisitTypedefDecl(
const TypedefDecl*
D) {
616 if(ShouldGenerateLocation(
D) && GenLoc(
D,
isLocal(
D)))
619 if(
const NamedDecl*DCN = dyn_cast<NamedDecl>(DC))
622Out <<
D->getName();
629voidUSRGenerator::GenExtSymbolContainer(
const NamedDecl*
D) {
631 if(!Container.empty())
632Out <<
"@M@"<< Container;
635boolUSRGenerator::GenLoc(
const Decl*
D,
boolIncludeOffset) {
637 returnIgnoreResults;
638generatedLoc =
true;
642IgnoreResults =
true;
653 returnIgnoreResults;
664NNS->
print(Out, PO);
667voidUSRGenerator::VisitType(
QualType T) {
684Out << ((char) (
'0'+ qVal));
690 T= Expansion->getPattern();
694 switch(BT->getKind()) {
695 caseBuiltinType::Void:
697 caseBuiltinType::Bool:
699 caseBuiltinType::UChar:
701 caseBuiltinType::Char8:
703 caseBuiltinType::Char16:
705 caseBuiltinType::Char32:
707 caseBuiltinType::UShort:
709 caseBuiltinType::UInt:
711 caseBuiltinType::ULong:
713 caseBuiltinType::ULongLong:
715 caseBuiltinType::UInt128:
717 caseBuiltinType::Char_U:
718 caseBuiltinType::Char_S:
720 caseBuiltinType::SChar:
722 caseBuiltinType::WChar_S:
723 caseBuiltinType::WChar_U:
725 caseBuiltinType::Short:
727 caseBuiltinType::Int:
729 caseBuiltinType::Long:
731 caseBuiltinType::LongLong:
733 caseBuiltinType::Int128:
735 caseBuiltinType::Float16:
736 caseBuiltinType::Half:
738 caseBuiltinType::Float:
740 caseBuiltinType::Double:
742 caseBuiltinType::LongDouble:
744 caseBuiltinType::Float128:
746 caseBuiltinType::NullPtr:
748#define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ 749 case BuiltinType::Id: \ 750 Out << "@BT@"<< #Suffix << "_" << #ImgType; break;
751#include "clang/Basic/OpenCLImageTypes.def" 752#define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \ 753 case BuiltinType::Id: \ 754 Out << "@BT@"<< #ExtType; break;
755#include "clang/Basic/OpenCLExtensionTypes.def" 756 caseBuiltinType::OCLEvent:
757Out <<
"@BT@OCLEvent";
break;
758 caseBuiltinType::OCLClkEvent:
759Out <<
"@BT@OCLClkEvent";
break;
760 caseBuiltinType::OCLQueue:
761Out <<
"@BT@OCLQueue";
break;
762 caseBuiltinType::OCLReserveID:
763Out <<
"@BT@OCLReserveID";
break;
764 caseBuiltinType::OCLSampler:
765Out <<
"@BT@OCLSampler";
break;
766#define SVE_TYPE(Name, Id, SingletonId) \ 767 case BuiltinType::Id: \ 768 Out << "@BT@"<< #Name; \
770#include "clang/Basic/AArch64SVEACLETypes.def" 771#define PPC_VECTOR_TYPE(Name, Id, Size) \ 772 case BuiltinType::Id: \ 773 Out << "@BT@"<< #Name; break;
774#include "clang/Basic/PPCTypes.def" 775#define RVV_TYPE(Name, Id, SingletonId) \ 776 case BuiltinType::Id: \ 777 Out << "@BT@"<< Name; break;
778#include "clang/Basic/RISCVVTypes.def" 779#define WASM_TYPE(Name, Id, SingletonId) case BuiltinType::Id: 780#include "clang/Basic/WebAssemblyReferenceTypes.def" 781#define AMDGPU_TYPE(Name, Id, SingletonId, Width, Align) \ 782 case BuiltinType::Id: \ 783 Out << "@BT@"<< #Name; \
785#include "clang/Basic/AMDGPUTypes.def" 786#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \ 787 case BuiltinType::Id: \ 788 Out << "@BT@"<< #Name; \
790#include "clang/Basic/HLSLIntangibleTypes.def" 791 caseBuiltinType::ShortAccum:
792Out <<
"@BT@ShortAccum";
break;
793 caseBuiltinType::Accum:
794Out <<
"@BT@Accum";
break;
795 caseBuiltinType::LongAccum:
796Out <<
"@BT@LongAccum";
break;
797 caseBuiltinType::UShortAccum:
798Out <<
"@BT@UShortAccum";
break;
799 caseBuiltinType::UAccum:
800Out <<
"@BT@UAccum";
break;
801 caseBuiltinType::ULongAccum:
802Out <<
"@BT@ULongAccum";
break;
803 caseBuiltinType::ShortFract:
804Out <<
"@BT@ShortFract";
break;
805 caseBuiltinType::Fract:
806Out <<
"@BT@Fract";
break;
807 caseBuiltinType::LongFract:
808Out <<
"@BT@LongFract";
break;
809 caseBuiltinType::UShortFract:
810Out <<
"@BT@UShortFract";
break;
811 caseBuiltinType::UFract:
812Out <<
"@BT@UFract";
break;
813 caseBuiltinType::ULongFract:
814Out <<
"@BT@ULongFract";
break;
815 caseBuiltinType::SatShortAccum:
816Out <<
"@BT@SatShortAccum";
break;
817 caseBuiltinType::SatAccum:
818Out <<
"@BT@SatAccum";
break;
819 caseBuiltinType::SatLongAccum:
820Out <<
"@BT@SatLongAccum";
break;
821 caseBuiltinType::SatUShortAccum:
822Out <<
"@BT@SatUShortAccum";
break;
823 caseBuiltinType::SatUAccum:
824Out <<
"@BT@SatUAccum";
break;
825 caseBuiltinType::SatULongAccum:
826Out <<
"@BT@SatULongAccum";
break;
827 caseBuiltinType::SatShortFract:
828Out <<
"@BT@SatShortFract";
break;
829 caseBuiltinType::SatFract:
830Out <<
"@BT@SatFract";
break;
831 caseBuiltinType::SatLongFract:
832Out <<
"@BT@SatLongFract";
break;
833 caseBuiltinType::SatUShortFract:
834Out <<
"@BT@SatUShortFract";
break;
835 caseBuiltinType::SatUFract:
836Out <<
"@BT@SatUFract";
break;
837 caseBuiltinType::SatULongFract:
838Out <<
"@BT@SatULongFract";
break;
839 caseBuiltinType::BFloat16:
840Out <<
"@BT@__bf16";
break;
841 caseBuiltinType::Ibm128:
842Out <<
"@BT@__ibm128";
break;
843 caseBuiltinType::ObjCId:
845 caseBuiltinType::ObjCClass:
847 caseBuiltinType::ObjCSel:
849#define BUILTIN_TYPE(Id, SingletonId) 850#define PLACEHOLDER_TYPE(Id, SingletonId) case BuiltinType::Id: 851#include "clang/AST/BuiltinTypes.def" 852 caseBuiltinType::Dependent:
855IgnoreResults =
true;
863llvm::DenseMap<const Type *, unsigned>::iterator Substitution
864= TypeSubstitutions.find(
T.getTypePtr());
865 if(Substitution != TypeSubstitutions.end()) {
866Out <<
'S'<< Substitution->second <<
'_';
870 unsignedNumber = TypeSubstitutions.size();
871TypeSubstitutions[
T.getTypePtr()] = Number;
896VisitType(FT->getReturnType());
898 for(
const auto&I : FT->param_types()) {
903 if(FT->isVariadic())
914 T= CT->getElementType();
919VisitTagDecl(TT->getDecl());
924VisitObjCInterfaceDecl(OIT->getDecl());
929VisitType(OIT->getBaseType());
930 for(
auto*Prot : OIT->getProtocols())
931VisitObjCProtocolDecl(Prot);
935Out <<
't'<< TTP->getDepth() <<
'.'<< TTP->getIndex();
941VisitTemplateName(Spec->getTemplateName());
942Out << Spec->template_arguments().size();
943 for(
const auto&Arg : Spec->template_arguments())
944VisitTemplateArgument(Arg);
950Out <<
':'<< DNT->getIdentifier()->getName();
954 T= InjT->getInjectedSpecializationType();
959Out << VT->getNumElements();
960 T= VT->getElementType();
963 if(
const auto*
constAT = dyn_cast<ArrayType>(
T)) {
965 switch(AT->getSizeModifier()) {
966 caseArraySizeModifier::Static:
969 caseArraySizeModifier::Star:
972 caseArraySizeModifier::Normal:
976 if(
const auto*
constCAT = dyn_cast<ConstantArrayType>(
T))
977Out << CAT->getSize();
979 T= AT->getElementType();
989voidUSRGenerator::VisitTemplateParameterList(
993Out <<
'>'<< Params->
size();
995PEnd = Params->
end();
998 if(isa<TemplateTypeParmDecl>(*
P)) {
999 if(cast<TemplateTypeParmDecl>(*P)->isParameterPack())
1006 if(NTTP->isParameterPack())
1009VisitType(NTTP->getType());
1021voidUSRGenerator::VisitTemplateName(
TemplateNameName) {
1022 if(
TemplateDecl*Template = Name.getAsTemplateDecl()) {
1024= dyn_cast<TemplateTemplateParmDecl>(Template)) {
1025Out <<
't'<< TTP->getDepth() <<
'.'<< TTP->getIndex();
1062VisitTemplateArgument(
P);
1080Out << Hash.CalculateHash();
1087 if(ShouldGenerateLocation(
D) && GenLoc(
D,
isLocal(
D)))
1096 if(ShouldGenerateLocation(
D) && GenLoc(
D,
isLocal(
D)))
1101Out <<
D->getName();
1104voidUSRGenerator::VisitConceptDecl(
const ConceptDecl*
D) {
1105 if(ShouldGenerateLocation(
D) && GenLoc(
D,
isLocal(
D)))
1112voidUSRGenerator::VisitMSGuidDecl(
const MSGuidDecl*
D) {
1115 D->NamedDecl::printName(Out);
1123StringRef CatSymDefinedIn,
1125 if(ClsSymDefinedIn.empty() && CatSymDefinedIn.empty())
1127 if(CatSymDefinedIn.empty()) {
1128OS <<
"@M@"<< ClsSymDefinedIn <<
'@';
1131OS <<
"@CM@"<< CatSymDefinedIn <<
'@';
1132 if(ClsSymDefinedIn != CatSymDefinedIn) {
1133OS << ClsSymDefinedIn <<
'@';
1138StringRef ExtSymDefinedIn,
1139StringRef CategoryContextExtSymbolDefinedIn) {
1141CategoryContextExtSymbolDefinedIn, OS);
1142OS <<
"objc(cs)"<< Cls;
1147StringRef ClsSymDefinedIn,
1148StringRef CatSymDefinedIn) {
1150OS <<
"objc(cy)"<< Cls <<
'@'<< Cat;
1158 boolIsInstanceMethod,
1160OS << (IsInstanceMethod ?
"(im)":
"(cm)") << Sel;
1165OS << (isClassProp ?
"(cpy)":
"(py)") << Prop;
1169StringRef ExtSymDefinedIn) {
1170 if(!ExtSymDefinedIn.empty())
1171OS <<
"@M@"<< ExtSymDefinedIn <<
'@';
1172OS <<
"objc(pl)"<< Prot;
1176StringRef ExtSymDefinedIn) {
1177 if(!ExtSymDefinedIn.empty())
1178OS <<
"@M@"<< ExtSymDefinedIn;
1179OS <<
"@E@"<< EnumName;
1184OS <<
'@'<< EnumConstantName;
1204 if(
auto*ExternalSymAttr = CD->
getAttr<ExternalSourceSymbolAttr>()) {
1205 if(!ExternalSymAttr->getUSR().empty()) {
1206llvm::raw_svector_ostream Out(Buf);
1207Out << ExternalSymAttr->getUSR();
1213 returnUG.ignoreResults();
1229 if(MacroName.empty())
1232llvm::raw_svector_ostream Out(Buf);
1236 boolShouldGenerateLocation =
Loc.
isValid() && !
SM.isInSystemHeader(
Loc);
1239 if(ShouldGenerateLocation)
1256 T=
T.getCanonicalType();
1258USRGenerator UG(&Ctx, Buf, LangOpts);
1260 returnUG.ignoreResults();
1285OS <<
"@M@"<< ModName;
Defines the clang::ASTContext interface.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Defines the C++ template declaration subclasses.
Defines the clang::FileManager interface and associated types.
This file contains the declaration of the ODRHash class, which calculates a hash based on AST nodes,...
static void combineClassAndCategoryExtContainers(StringRef ClsSymDefinedIn, StringRef CatSymDefinedIn, raw_ostream &OS)
static bool printLoc(llvm::raw_ostream &OS, SourceLocation Loc, const SourceManager &SM, bool IncludeOffset)
static const ObjCCategoryDecl * getCategoryContext(const NamedDecl *D)
static void printQualifier(llvm::raw_ostream &Out, const LangOptions &LangOpts, NestedNameSpecifier *NNS)
static StringRef GetExternalSourceContainer(const NamedDecl *D)
__device__ __2f16 float __ockl_bool s
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
SourceManager & getSourceManager()
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
const LangOptions & getLangOpts() const
const ObjCInterfaceDecl * getObjContainingInterface(const NamedDecl *ND) const
Returns the Objective-C interface that ND belongs to if it is an Objective-C method/property/ivar etc...
A binding in a decomposition declaration.
This class is used for builtin types like 'int'.
Represents a static or instance method of a struct/union/class.
Represents a C++ struct/union/class.
Declaration of a class template.
Represents a class template specialization, which refers to a class template with a given set of temp...
Complex values, per C99 6.2.5p11.
Declaration of a C++20 concept.
A simple visitor class that helps create declaration visitors.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
DeclContext * getParent()
getParent - Returns the containing DeclContext.
Decl - This represents one declaration (or definition), e.g.
const DeclContext * getParentFunctionOrMethod(bool LexicalParent=false) const
If this decl is defined inside a function/method/block it returns the corresponding DeclContext,...
ASTContext & getASTContext() const LLVM_READONLY
ExternalSourceSymbolAttr * getExternalSourceSymbolAttr() const
Looks on this and related declarations for an applicable external source symbol attribute.
SourceLocation getLocation() const
DeclContext * getDeclContext()
SourceLocation getBeginLoc() const LLVM_READONLY
void print(raw_ostream &Out, unsigned Indentation=0, bool PrintInstantiation=false) const
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
The name of a declaration.
bool isEmpty() const
Evaluates true when this declaration name is empty.
Represents a qualified type name for which the type name is dependent.
Represents a member of a struct/union/class.
StringRef getName() const
The name of this FileEntry.
Represents a function declaration or definition.
Represents a prototype with parameter type info, e.g.
Declaration of a template function.
StringRef getName() const
Return the actual identifier string.
The injected class name of a C++ class template or class template partial specialization.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Represents a linkage specification.
Record the location of a macro definition.
SourceLocation getLocation() const
Retrieve the location of the macro name in the definition.
const IdentifierInfo * getName() const
Retrieve the name of the macro being defined.
Describes a module or submodule.
Module * Parent
The parent of this module.
std::string Name
The name of this module.
This represents a decl that may have a name.
StringRef getName() const
Get the name of identifier for this declaration as a StringRef.
Represents a C++ namespace alias.
Represent a C++ namespace.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
void print(raw_ostream &OS, const PrintingPolicy &Policy, bool ResolveTemplateArguments=false) const
Print this nested name specifier to the given output stream.
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
void AddStructuralValue(const APValue &)
ObjCCategoryDecl - Represents a category declaration.
ObjCInterfaceDecl * getClassInterface()
bool IsClassExtension() const
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
ObjCContainerDecl - Represents a container for method declarations.
const ObjCInterfaceDecl * getClassInterface() const
Represents an ObjC class declaration.
Interfaces are the core concept in Objective-C for object oriented design.
ObjCMethodDecl - Represents an instance or class method declaration.
Represents a pointer to an Objective C object.
Represents a class type in Objective C.
Represents one property declaration in an Objective-C interface.
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Represents an Objective-C protocol declaration.
Represents a pack expansion of types.
PointerType - C99 6.7.5.1 - Pointer Declarators.
A (possibly-)qualified type.
The collection of all-type qualifiers we support.
An rvalue reference type, per C++11 [dcl.ref].
Base for LValueReferenceType and RValueReferenceType.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
This class handles loading and caching of source files into memory.
Represents the declaration of a struct/union/class/enum.
A template argument list.
unsigned size() const
Retrieve the number of template arguments in this template argument list.
const TemplateArgument & get(unsigned Idx) const
Retrieve the template argument at a given index.
Represents a template argument.
QualType getStructuralValueType() const
Get the type of a StructuralValue.
QualType getAsType() const
Retrieve the type for a type template argument.
llvm::APSInt getAsIntegral() const
Retrieve the template argument as an integral value.
unsigned pack_size() const
The number of template arguments in the given template argument pack.
QualType getIntegralType() const
Retrieve the type of the integral value.
ValueDecl * getAsDecl() const
Retrieve the declaration for a declaration non-type template argument.
ArrayRef< TemplateArgument > pack_elements() const
Iterator range referencing all of the elements of a template argument pack.
@ Declaration
The template argument is a declaration that was provided for a pointer, reference,...
@ Template
The template argument is a template name that was provided for a template template parameter.
@ StructuralValue
The template argument is a non-type template argument that can't be represented by the special-case D...
@ Pack
The template argument is actually a parameter pack.
@ TemplateExpansion
The template argument is a pack expansion of a template name that was provided for a template templat...
@ NullPtr
The template argument is a null pointer or null pointer to member that was provided for a non-type te...
@ Type
The template argument is a type.
@ Null
Represents an empty template argument, e.g., one that has not been deduced.
@ Integral
The template argument is an integral value stored in an llvm::APSInt that was provided for an integra...
@ Expression
The template argument is an expression, and we've not resolved it to one of the other forms yet,...
ArgKind getKind() const
Return the kind of stored template argument.
TemplateName getAsTemplateOrTemplatePattern() const
Retrieve the template argument as a template name; if the argument is a pack expansion,...
const APValue & getAsStructuralValue() const
Get the value of a StructuralValue.
The base class of all kinds of template declarations (e.g., class, function, etc.).
TemplateParameterList * getTemplateParameters() const
Get the list of template parameters.
Represents a C++ template name within the type system.
Stores a list of template parameters for a TemplateDecl and its derived classes.
NamedDecl *const * const_iterator
Iterates through the template parameters in this list.
Represents a type template specialization; the template must be a class template, a type alias templa...
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
bool isParameterPack() const
Whether this template template parameter is a template parameter pack.
Declaration of a template type parameter.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
bool isExtVectorType() const
const T * getAs() const
Member-template getAs<specific type>'.
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Base class for declarations which introduce a typedef-name.
Represents a dependent using declaration which was marked with typename.
Represents a dependent using declaration which was not marked with typename.
Represents a C++ using-declaration.
Represents C++ using-directive.
Represents a variable declaration or definition.
Declaration of a variable template.
Represents a variable template specialization, which refers to a variable template with a given set o...
Represents a GCC generic vector type.
const internal::VariadicAllOfMatcher< Attr > attr
Matches attributes.
bool generateFullUSRForTopLevelModuleName(StringRef ModName, raw_ostream &OS)
Generate a USR for a top-level module name, including the USR prefix.
static StringRef getUSRSpacePrefix()
void generateUSRForObjCCategory(StringRef Cls, StringRef Cat, raw_ostream &OS, StringRef ClsExtSymbolDefinedIn="", StringRef CatExtSymbolDefinedIn="")
Generate a USR fragment for an Objective-C class category.
bool generateFullUSRForModule(const Module *Mod, raw_ostream &OS)
Generate a USR for a module, including the USR prefix.
bool generateUSRFragmentForModuleName(StringRef ModName, raw_ostream &OS)
Generate a USR fragment for a module name.
bool generateUSRForMacro(const MacroDefinitionRecord *MD, const SourceManager &SM, SmallVectorImpl< char > &Buf)
Generate a USR for a macro, including the USR prefix.
void generateUSRForObjCProperty(StringRef Prop, bool isClassProp, raw_ostream &OS)
Generate a USR fragment for an Objective-C property.
void generateUSRForEnumConstant(StringRef EnumConstantName, raw_ostream &OS)
Generate a USR fragment for an enum constant.
void generateUSRForObjCIvar(StringRef Ivar, raw_ostream &OS)
Generate a USR fragment for an Objective-C instance variable.
void generateUSRForObjCMethod(StringRef Sel, bool IsInstanceMethod, raw_ostream &OS)
Generate a USR fragment for an Objective-C method.
bool generateUSRForType(QualType T, ASTContext &Ctx, SmallVectorImpl< char > &Buf)
Generates a USR for a type.
void generateUSRForObjCClass(StringRef Cls, raw_ostream &OS, StringRef ExtSymbolDefinedIn="", StringRef CategoryContextExtSymbolDefinedIn="")
Generate a USR fragment for an Objective-C class.
void generateUSRForGlobalEnum(StringRef EnumName, raw_ostream &OS, StringRef ExtSymbolDefinedIn="")
Generate USR fragment for a global (non-nested) enum.
void generateUSRForObjCProtocol(StringRef Prot, raw_ostream &OS, StringRef ExtSymbolDefinedIn="")
Generate a USR fragment for an Objective-C protocol.
bool generateUSRFragmentForModule(const Module *Mod, raw_ostream &OS)
Generate a USR fragment for a module.
bool generateUSRForDecl(const Decl *D, SmallVectorImpl< char > &Buf)
Generate a USR for a Decl, including the USR prefix.
The JSON file list parser is used to communicate input to InstallAPI.
@ RQ_None
No ref-qualifier was provided.
@ RQ_LValue
An lvalue ref-qualifier was provided (&).
@ RQ_RValue
An rvalue ref-qualifier was provided (&&).
const FunctionProtoType * T
Represents an explicit template argument list in C++, e.g., the "<int>" in "sort<int>".
Describes how types, statements, expressions, and declarations should be printed.
unsigned SuppressUnwrittenScope
Suppress printing parts of scope specifiers that are never written, e.g., for anonymous namespaces.
unsigned AnonymousTagLocations
When printing an anonymous tag name, also print the location of that entity (e.g.,...
unsigned ConstantArraySizeAsWritten
Whether we should print the sizes of constant array expressions as written in the sources.
unsigned SuppressTagKeyword
Whether type printing should skip printing the tag keyword.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4