clang API Documentation
#include <Decl.h>


Classes | |
| class | LinkageInfo |
Public Member Functions | |
| IdentifierInfo * | getIdentifier () const |
| StringRef | getName () const |
| std::string | getNameAsString () const |
| void | printName (raw_ostream &os) const |
| DeclarationName | getDeclName () const |
| void | setDeclName (DeclarationName N) |
| Set the name of this declaration. | |
| std::string | getQualifiedNameAsString () const |
| std::string | getQualifiedNameAsString (const PrintingPolicy &Policy) const |
| virtual void | getNameForDiagnostic (std::string &S, const PrintingPolicy &Policy, bool Qualified) const |
| bool | declarationReplaces (NamedDecl *OldD) const |
| bool | hasLinkage () const |
| Determine whether this declaration has linkage. | |
| bool | isHidden () const |
| Determine whether this declaration is hidden from name lookup. | |
| bool | isCXXClassMember () const |
| Determine whether this declaration is a C++ class member. | |
| bool | isCXXInstanceMember () const |
| Given that this declaration is a C++ class member, determine whether it's an instance member of its class. | |
| Linkage | getLinkage () const |
| Determine what kind of linkage this entity has. | |
| Visibility | getVisibility () const |
| Determines the visibility of this entity. | |
| LinkageInfo | getLinkageAndVisibility () const |
| Determines the linkage and visibility of this entity. | |
| llvm::Optional< Visibility > | getExplicitVisibility () const |
| If visibility was explicitly specified for this declaration, return that visibility. | |
| void | ClearLinkageCache () |
| Clear the linkage cache in response to a change to the declaration. | |
| NamedDecl * | getUnderlyingDecl () |
| Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl. | |
| const NamedDecl * | getUnderlyingDecl () const |
Static Public Member Functions | |
| static bool | classof (const Decl *D) |
| static bool | classof (const NamedDecl *D) |
| static bool | classofKind (Kind K) |
Protected Member Functions | |
| NamedDecl (Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N) | |
| clang::NamedDecl::NamedDecl | ( | Kind | DK, |
| DeclContext * | DC, | ||
| SourceLocation | L, | ||
| DeclarationName | N | ||
| ) | [inline, protected] |
| static bool clang::NamedDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::Decl.
Reimplemented in clang::RecordDecl, clang::EnumDecl, clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::UsingShadowDecl, clang::NamespaceAliasDecl, clang::TypeAliasDecl, clang::TypedefDecl, clang::TypedefNameDecl, clang::UsingDirectiveDecl, clang::TypeDecl, clang::IndirectFieldDecl, clang::EnumConstantDecl, clang::CXXConversionDecl, clang::FieldDecl, clang::CXXDestructorDecl, clang::TypeAliasTemplateDecl, clang::FunctionDecl, clang::CXXConstructorDecl, clang::ObjCPropertyDecl, clang::ClassTemplateDecl, clang::ObjCCompatibleAliasDecl, clang::ObjCImplementationDecl, clang::ClassTemplatePartialSpecializationDecl, clang::CXXMethodDecl, clang::ObjCCategoryImplDecl, clang::ClassTemplateSpecializationDecl, clang::ObjCImplDecl, clang::CXXRecordDecl, clang::ObjCCategoryDecl, clang::ParmVarDecl, clang::ObjCProtocolDecl, clang::TemplateTemplateParmDecl, clang::ImplicitParamDecl, clang::VarDecl, clang::NonTypeTemplateParmDecl, clang::ObjCAtDefsFieldDecl, clang::ObjCIvarDecl, clang::ObjCInterfaceDecl, clang::TemplateTypeParmDecl, clang::FunctionTemplateDecl, clang::RedeclarableTemplateDecl, clang::DeclaratorDecl, clang::ObjCContainerDecl, clang::ValueDecl, clang::NamespaceDecl, clang::ObjCMethodDecl, clang::LabelDecl, and clang::TemplateDecl.
Definition at line 306 of file Decl.h.
References classofKind(), and clang::Decl::getKind().
| static bool clang::NamedDecl::classof | ( | const NamedDecl * | D | ) | [inline, static] |
| static bool clang::NamedDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::Decl.
Reimplemented in clang::RecordDecl, clang::EnumDecl, clang::UnresolvedUsingTypenameDecl, clang::UnresolvedUsingValueDecl, clang::UsingDecl, clang::TagDecl, clang::UsingShadowDecl, clang::NamespaceAliasDecl, clang::TypeAliasDecl, clang::TypedefDecl, clang::TypedefNameDecl, clang::UsingDirectiveDecl, clang::TypeDecl, clang::IndirectFieldDecl, clang::EnumConstantDecl, clang::CXXConversionDecl, clang::FieldDecl, clang::CXXDestructorDecl, clang::TypeAliasTemplateDecl, clang::FunctionDecl, clang::CXXConstructorDecl, clang::ObjCPropertyDecl, clang::ClassTemplateDecl, clang::ObjCCompatibleAliasDecl, clang::ObjCImplementationDecl, clang::ClassTemplatePartialSpecializationDecl, clang::CXXMethodDecl, clang::ObjCCategoryImplDecl, clang::ClassTemplateSpecializationDecl, clang::ObjCImplDecl, clang::CXXRecordDecl, clang::ObjCCategoryDecl, clang::ParmVarDecl, clang::ObjCProtocolDecl, clang::TemplateTemplateParmDecl, clang::ImplicitParamDecl, clang::VarDecl, clang::NonTypeTemplateParmDecl, clang::ObjCAtDefsFieldDecl, clang::ObjCIvarDecl, clang::ObjCInterfaceDecl, clang::TemplateTypeParmDecl, clang::FunctionTemplateDecl, clang::RedeclarableTemplateDecl, clang::DeclaratorDecl, clang::ObjCContainerDecl, clang::ValueDecl, clang::NamespaceDecl, clang::ObjCMethodDecl, clang::LabelDecl, and clang::TemplateDecl.
Definition at line 308 of file Decl.h.
Referenced by classof().
| void NamedDecl::ClearLinkageCache | ( | ) |
Clear the linkage cache in response to a change to the declaration.
Definition at line 625 of file Decl.cpp.
References clearLinkageForClass(), and clang::Decl::HasCachedLinkage.
Referenced by clang::VarDecl::setStorageClass(), clang::FunctionDecl::setStorageClass(), and clang::TagDecl::setTypedefNameForAnonDecl().
| bool NamedDecl::declarationReplaces | ( | NamedDecl * | OldD | ) | const |
declarationReplaces - Determine whether this declaration, if known to be well-formed within its context, will replace the declaration OldD if introduced into scope. A declaration will replace another declaration if, for example, it is a redeclaration of the same variable or function, but not if it is a declaration of a different kind (function vs. class) or an overloaded function.
Definition at line 895 of file Decl.cpp.
References declarationReplaces(), clang::Decl::getASTContext(), clang::ASTContext::getCanonicalNestedNameSpecifier(), getDeclName(), and clang::Decl::getKind().
Referenced by declarationReplaces(), clang::StoredDeclsList::HandleRedeclaration(), and clang::Sema::PushOnScopeChains().
| DeclarationName clang::NamedDecl::getDeclName | ( | ) | const [inline] |
getDeclName - Get the actual, stored name of the declaration, which may be a special name.
Definition at line 144 of file Decl.h.
Referenced by clang::Sema::ActOnAtEnd(), clang::Sema::ActOnClassTemplateSpecialization(), clang::Sema::ActOnCXXForRangeDecl(), clang::Sema::ActOnDelayedCXXMethodParameter(), clang::Sema::ActOnEndOfTranslationUnit(), clang::Sema::ActOnExplicitInstantiation(), clang::Sema::ActOnFields(), clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnLabelStmt(), clang::Sema::ActOnMethodDeclaration(), clang::Sema::ActOnParamDeclarator(), clang::Sema::ActOnPopScope(), clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnReenterDeclaratorTemplateScope(), clang::Sema::ActOnReenterTemplateScope(), clang::Sema::ActOnReturnStmt(), clang::Sema::ActOnStartClassImplementation(), clang::Sema::ActOnStartClassInterface(), clang::Sema::ActOnSuperMessage(), clang::Sema::ActOnTag(), clang::Sema::ActOnVariableDeclarator(), addAssociatedClassesAndNamespaces(), clang::TypoCorrection::addCorrectionDecl(), clang::Sema::AddCXXDirectInitializerToDecl(), clang::IdentifierResolver::AddDecl(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildAnonymousStructUnionMemberReference(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildClassMessage(), clang::Sema::BuildDeclaratorGroup(), clang::Sema::BuildDeclRefExpr(), BuildImplicitMemberInitializer(), CalculateHiddenNames(), CheckAddressOfOperand(), checkARCPropertyDecl(), checkARCPropertyImpl(), clang::Sema::CheckBaseSpecifier(), clang::Sema::CheckCallReturnType(), clang::Sema::CheckCompletedCXXClass(), CheckDeclInExpr(), clang::Sema::CheckEquivalentExceptionSpec(), clang::Sema::CheckFieldDecl(), clang::Sema::CheckForFunctionRedefinition(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal(), clang::Sema::CheckLiteralOperatorDeclaration(), CheckMethodOverrideParam(), CheckMethodOverrideReturn(), clang::Sema::CheckNontrivialField(), CheckOperatorNewDeclaration(), CheckOperatorNewDeleteDeclarationScope(), CheckOperatorNewDeleteTypes(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckOverridingFunctionReturnType(), CheckPoppedLabel(), clang::Sema::CheckProtocolMethodDefs(), clang::Sema::CheckPureMethod(), clang::Sema::CheckShadow(), clang::Sema::CheckTemplateIdType(), clang::Sema::CheckVariableDeclaration(), CmpProtocolNames(), computeDeclRefDependence(), clang::CodeGen::CodeGenTypes::ComputeRecordLayout(), clang::DeclRefExpr::Create(), declarationReplaces(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DiagnoseAbstractType(), clang::Sema::DiagnoseAutoDeductionFailure(), clang::Sema::DiagnoseAvailabilityOfDecl(), DiagnoseBadAccess(), DiagnoseBaseOrMemInitializerOrder(), clang::Sema::DiagnoseClassExtensionDupMethods(), clang::Sema::DiagnoseHiddenVirtualMethods(), DiagnoseInvalidRedeclaration(), clang::Sema::DiagnosePropertyMismatch(), clang::Sema::DiagnoseSentinelCalls(), clang::Sema::DiagnoseSizeOfParametersAndReturnValue(), clang::Sema::DiagnoseUnimplementedProperties(), DiagnoseUninitializedUse(), clang::Sema::DiagnoseUnusedDecl(), clang::Sema::DiagnoseUseOfDecl(), clang::Sema::EmitDeprecationWarning(), EmitNullConstant(), clang::Sema::FinalizeVarWithDestructor(), clang::Sema::FindInstantiatedDecl(), FindOverriddenMethod(), clang::Sema::FindProtocolDeclaration(), clang::FunctionDecl::getLiteralIdentifier(), getLVForClassMember(), clang::MemberExpr::getMemberNameInfo(), clang::InitializedEntity::getName(), clang::ASTContext::getNameForTemplate(), clang::FunctionDecl::getNameInfo(), clang::UsingDecl::getNameInfo(), clang::UnresolvedUsingValueDecl::getNameInfo(), clang::Sema::getObjCInterfaceDecl(), getOrderedName(), clang::FunctionDecl::getOverloadedOperator(), getQualifiedNameAsString(), clang::ObjCMethodDecl::getSelector(), clang::Sema::HandleDeclarator(), clang::Sema::HandleDelayedDeprecationCheck(), clang::Sema::HandleExprPropertyRefExpr(), clang::Sema::HandlePropertyInClassExtension(), clang::Sema::HideUsingShadowDecl(), clang::ASTNodeImporter::ImportDeclParts(), clang::ASTNodeImporter::ImportDefinition(), clang::IdentifierResolver::iterator::incrementSlowCase(), clang::TemplateDeclInstantiator::InitFunctionInstantiation(), InjectAnonymousStructOrUnionMembers(), clang::IdentifierResolver::InsertDeclAfter(), clang::Sema::InstantiateFunctionDefinition(), clang::Sema::InstantiateMemInitializers(), clang::Sema::InstantiateStaticDataMemberDefinition(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::FieldDecl::isAnonymousStructOrUnion(), clang::RecordDecl::isInjectedClassName(), isInstantiationOf(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), isSameEntity(), IsStructurallyEquivalent(), clang::FieldDecl::isUnnamedBitfield(), clang::CXXMethodDecl::isUsualDeallocationFunction(), clang::Sema::LookupInObjCMethod(), clang::Sema::LookupMemberExpr(), clang::Sema::MarkBaseAndMemberDestructorsReferenced(), MatchesFriend(), clang::MemberExpr::MemberExpr(), clang::Sema::MergeCXXFunctionDecl(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::MergeVarDeclTypes(), MightInstantiateTo(), clang::Sema::ParsedFreeStandingDeclSpec(), clang::Sema::ParseTypedefDecl(), clang::Sema::ProcessPropertyDecl(), clang::Sema::PushOnScopeChains(), clang::TreeTransform< Derived >::RebuildMemberExpr(), clang::TreeTransform< Derived >::RebuildObjCIvarRefExpr(), clang::TreeTransform< Derived >::RebuildObjCPropertyRefExpr(), clang::Sema::RebuildTemplateParamsInCurrentInstantiation(), clang::Sema::RegisterLocallyScopedExternCDecl(), clang::IdentifierResolver::RemoveDecl(), clang::DeclContext::removeDecl(), clang::IdentifierResolver::ReplaceDecl(), clang::Sema::RequireNonAbstractType(), clang::ASTContext::setInstantiatedFromUnnamedFieldDecl(), SubstDefaultTemplateArgument(), clang::TemplateDeclInstantiator::SubstFunctionType(), clang::Sema::SubstituteExplicitTemplateArguments(), clang::Sema::SubstParmVarDecl(), SuggestInitializationFixit(), clang::Sema::TryCaptureVar(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitClassTemplatePartialSpecializationDecl(), clang::ASTDeclWriter::VisitEnumDecl(), clang::ASTNodeImporter::VisitEnumDecl(), clang::ASTDeclWriter::VisitFieldDecl(), clang::ASTDeclReader::VisitFieldDecl(), clang::TemplateDeclInstantiator::VisitFieldDecl(), clang::ASTDeclWriter::VisitFunctionDecl(), clang::ASTDeclReader::VisitFunctionDecl(), clang::TemplateDeclInstantiator::VisitFunctionDecl(), clang::ASTNodeImporter::VisitImplicitParamDecl(), clang::idx::EntityGetter::VisitNamedDecl(), clang::ASTDeclWriter::VisitNamedDecl(), clang::ASTNodeImporter::VisitNonTypeTemplateParmDecl(), clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitObjCImplementationDecl(), clang::ASTDeclWriter::VisitObjCIvarDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::ASTNodeImporter::VisitParmVarDecl(), clang::ASTDeclWriter::VisitRecordDecl(), clang::ASTNodeImporter::VisitRecordDecl(), clang::ASTNodeImporter::VisitTemplateTemplateParmDecl(), clang::ento::ConditionBRVisitor::VisitTrueTest(), clang::TemplateDeclInstantiator::VisitTypeAliasTemplateDecl(), clang::ASTDeclWriter::VisitTypedefDecl(), clang::TemplateDeclInstantiator::VisitUnresolvedUsingTypenameDecl(), clang::ASTDeclWriter::VisitUnresolvedUsingValueDecl(), clang::ASTDeclReader::VisitUnresolvedUsingValueDecl(), clang::ASTDeclWriter::VisitUsingDecl(), clang::ASTDeclReader::VisitUsingDecl(), clang::ASTDeclWriter::VisitVarDecl(), clang::TemplateDeclInstantiator::VisitVarDecl(), and clang::Sema::WarnUndefinedMethod().
| llvm::Optional< Visibility > NamedDecl::getExplicitVisibility | ( | ) | const |
If visibility was explicitly specified for this declaration, return that visibility.
Definition at line 682 of file Decl.cpp.
References getVisibilityOf().
Referenced by getLVForClassMember(), getLVForNamespaceScopeDecl(), setThunkVisibility(), and clang::CodeGen::CodeGenModule::setTypeVisibility().
| IdentifierInfo* clang::NamedDecl::getIdentifier | ( | ) | const [inline] |
getIdentifier - Get the identifier that names this declaration, if there is one. This will return NULL if this declaration has no name (e.g., for an unnamed class) or if the name is a special name (C++ constructor, Objective-C selector, etc.).
Reimplemented in clang::ObjCImplementationDecl, and clang::ObjCCategoryImplDecl.
Definition at line 118 of file Decl.h.
References clang::DeclarationName::getAsIdentifierInfo().
Referenced by clang::Sema::ActOnAtEnd(), clang::Sema::ActOnBlockArguments(), clang::Sema::ActOnDefs(), clang::Sema::ActOnFields(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnReenterFunctionContext(), clang::Sema::ActOnStartCategoryInterface(), clang::Sema::ActOnStartCXXMemberDeclarations(), clang::Sema::ActOnStartOfFunctionDef(), clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::ActOnSuperMessage(), clang::Sema::ActOnTag(), clang::Sema::ActOnTagTemplateIdType(), clang::Sema::ActOnTypedefNameDecl(), clang::Sema::AddKnownFunctionAttributes(), AddObjCKeyValueCompletions(), clang::CodeGen::CodeGenTypes::addRecordTypeName(), AddTemplateParameterChunks(), clang::Sema::AtomicPropertySetterGetterRules(), clang::Sema::BuildDeclRefExpr(), clang::ASTContext::canAssignObjCInterfaces(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckConstructor(), clang::Sema::CheckCXXDefaultArguments(), checkEnumComparison(), checkObjCDealloc(), clang::Sema::CheckParameterPacksForExpansion(), clang::Sema::CheckParmsForFunctionDef(), clang::Sema::CodeCompleteObjCMethodDeclSelector(), CollectClassPropertyImplementations(), clang::Sema::CollectImmediateProperties(), clang::Sema::ComparePropertiesInBaseAndSuper(), computeCachedProperties(), clang::Sema::DeclApplyPragmaWeak(), clang::Sema::DefaultSynthesizeProperties(), clang::Sema::DiagnoseDuplicateIvars(), diagnoseUncapturableValueReference(), clang::Sema::DiagnoseUnknownTypeName(), FindFirstNamedDataMember(), clang::ObjCImplDecl::FindPropertyImplDecl(), clang::ObjCImplDecl::FindPropertyImplIvarDecl(), FormatFunctionParameter(), clang::CodeGen::CodeGenVTables::GenerateClassData(), clang::QualType::getBaseTypeIdentifier(), clang::FunctionDecl::getBuiltinID(), getCalleeName(), getDefaultSynthIvarName(), clang::OffsetOfExpr::OffsetOfNode::getFieldName(), clang::DesignatedInitExpr::Designator::getFieldName(), clang::ObjCImplementationDecl::getIdentifier(), clang::TemplateTypeParmType::getIdentifier(), getIvarAccessString(), clang::CodeGen::CodeGenModule::getMangledName(), clang::FunctionDecl::getMemoryFunctionKind(), getName(), clang::LabelStmt::getName(), clang::Sema::GetNameFromUnqualifiedId(), clang::Sema::getObjCInterfaceDecl(), clang::Sema::getTemplateArgumentBindingsText(), InheritsFromClassNamed(), InjectAnonymousStructOrUnionMembers(), InNamespace(), clang::TemplateDeclInstantiator::InstantiateTypedefNameDecl(), clang::NamespaceDecl::isAnonymousNamespace(), clang::CallExpr::isBuiltinCall(), IsCFError(), isCFStringType(), isCharSpecialization(), clang::ObjCCategoryDecl::IsClassExtension(), clang::ento::CheckerContext::isCLibraryFunction(), clang::Sema::isCurrentClassName(), clang::FunctionDecl::isMain(), IsNSError(), isNSStringType(), clang::Sema::isPropertyReadonly(), isReceiverClassOrSuperclass(), isStd(), clang::Sema::isStdInitializerList(), isStreamCharSpecialization(), clang::LayoutOverrideSource::layoutRecordType(), clang::ObjCInterfaceDecl::lookupInheritedClass(), clang::Sema::LookupPropertyDecl(), clang::ObjCProtocolDecl::lookupProtocolNamed(), MakeObjCStringLiteralFixItHint(), clang::MangleContext::mangleBlock(), clang::Sema::MatchOneProtocolPropertiesInClass(), clang::Sema::MergeFunctionDecl(), clang::Sema::MergeTypedefNameDecl(), clang::Sema::MergeVarDecl(), clang::Sema::ParseTypedefDecl(), printTypeSpec(), clang::Sema::ProcessPropertyDecl(), clang::TreeTransform< Derived >::RebuildObjCExceptionDecl(), clang::ObjCImplDecl::setClassInterface(), shouldRunOnFunctionOrMethod(), clang::Sema::SubstParmVarDecl(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), clang::TemplateDeclInstantiator::VisitClassTemplateDecl(), clang::TemplateDeclInstantiator::VisitCXXRecordDecl(), clang::TemplateDeclInstantiator::VisitEnumDecl(), clang::TemplateDeclInstantiator::VisitIndirectFieldDecl(), clang::TemplateDeclInstantiator::VisitLabelDecl(), clang::TemplateDeclInstantiator::VisitNamespaceAliasDecl(), clang::TemplateDeclInstantiator::VisitNonTypeTemplateParmDecl(), clang::ASTNodeImporter::VisitObjCPropertyImplDecl(), clang::TemplateDeclInstantiator::VisitTemplateTemplateParmDecl(), clang::ASTNodeImporter::VisitTemplateTypeParmDecl(), clang::TemplateDeclInstantiator::VisitTemplateTypeParmDecl(), and clang::TemplateDeclInstantiator::VisitVarDecl().
| Linkage NamedDecl::getLinkage | ( | ) | const |
Determine what kind of linkage this entity has.
Definition at line 661 of file Decl.cpp.
References clang::Decl::CachedLinkage, getLVForDecl(), clang::Decl::HasCachedLinkage, and clang::NamedDecl::LinkageInfo::linkage().
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::DefineUsedVTables(), clang::ASTContext::GetGVALinkageForFunction(), clang::ASTContext::GetGVALinkageForVariable(), clang::CodeGen::CodeGenModule::getVTableLinkage(), hasEffectivelyInternalLinkage(), hasLinkage(), clang::VarDecl::isExternC(), clang::FunctionDecl::isExternC(), isSameEntity(), clang::Sema::MarkFunctionReferenced(), MarkVarDeclODRUsed(), clang::Sema::MergeVarDecl(), clang::Sema::ShouldWarnIfUnusedFileScopedDecl(), clang::ASTNodeImporter::VisitFunctionDecl(), and clang::ASTNodeImporter::VisitVarDecl().
| LinkageInfo NamedDecl::getLinkageAndVisibility | ( | ) | const |
Determines the linkage and visibility of this entity.
Definition at line 674 of file Decl.cpp.
References clang::Decl::CachedLinkage, getLVForDecl(), clang::Decl::HasCachedLinkage, and clang::NamedDecl::LinkageInfo::linkage().
Referenced by computeCachedProperties(), getLVForNamespaceScopeDecl(), getVisibility(), and clang::CodeGen::CodeGenModule::setGlobalVisibility().
| StringRef clang::NamedDecl::getName | ( | ) | const [inline] |
getName - Get the name of identifier for this declaration as a StringRef. This requires that the declaration have a name and that it be a simple identifier.
Reimplemented in clang::ObjCImplementationDecl, and clang::ObjCCategoryImplDecl.
Definition at line 123 of file Decl.h.
References getIdentifier(), clang::IdentifierInfo::getName(), and clang::DeclarationName::isIdentifier().
Referenced by clang::Sema::ActOnPropertyImplDecl(), clang::Sema::ActOnStartOfFunctionDef(), AddObjCKeyValueCompletions(), clang::Sema::BuildResolvedCallExpr(), BuildUniqueMethodName(), clang::arcmt::trans::canApplyWeak(), DumpBasePath(), DumpCXXRecordLayout(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAutoVarAlloca(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockDeclRefVariable(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), clang::CodeGen::CodeGenFunction::EmitLabel(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::EmitParmDecl(), getIvarAccessString(), clang::CodeGen::CodeGenFunction::getJumpDestForLabel(), clang::AnalysisDeclContext::getSelfDecl(), getTemplateKind(), clang::ento::MemRegionManager::getVarRegion(), IsClangAttr(), IsClangDecl(), IsClangStmt(), IsClangType(), isClassInWeakBlacklist(), IsSmallVector(), IsStdString(), IsStdVector(), clang::LayoutOverrideSource::layoutRecordType(), clang::MangleContext::mangleBlock(), clang::MangleContext::mangleObjCMethodName(), clang::NestedNameSpecifier::print(), print_elem(), and clang::Sema::PrintInstantiationStack().
| std::string clang::NamedDecl::getNameAsString | ( | ) | const [inline] |
getNameAsString - Get a human-readable name for the declaration, even if it is one of the special kinds of names (C++ constructor, Objective-C selector, etc). Creating this name requires expensive string manipulation, so it should be called only when performance doesn't matter. For simple declarations, getNameAsCString() should suffice.
Reimplemented in clang::ObjCImplementationDecl, and clang::ObjCCategoryImplDecl.
Definition at line 138 of file Decl.h.
References clang::DeclarationName::getAsString().
Referenced by clang::CodeGen::CodeGenFunction::BuildBlockByrefAddress(), clang::CodeGen::CodeGenFunction::BuildByRefType(), clang::CodeCompletionResult::CreateCodeCompletionString(), clang::CodeCompleteConsumer::OverloadCandidate::CreateSignatureString(), clang::CodeGen::CodeGenFunction::GetAddrOfBlockDecl(), getNameForDiagnostic(), clang::ASTContext::getObjCEncodingForPropertyDecl(), clang::Sema::getObjCInterfaceDecl(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), getQualifiedNameAsString(), GetStaticDeclName(), handleWeakRefAttr(), clang::Sema::LookupMemberExpr(), clang::Sema::PrintInstantiationStack(), and RewriteOneForwardClassDecl().
| virtual void clang::NamedDecl::getNameForDiagnostic | ( | std::string & | S, |
| const PrintingPolicy & | Policy, | ||
| bool | Qualified | ||
| ) | const [inline, virtual] |
getNameForDiagnostic - Appends a human-readable name for this declaration into the given string.
This is the method invoked by Sema when displaying a NamedDecl in a diagnostic. It does not necessarily produce the same result as getNameAsString(); for example, class template specializations are printed with their template arguments.
TODO: use an API that doesn't require so many temporary strings
Reimplemented in clang::FunctionDecl, and clang::ClassTemplateSpecializationDecl.
Definition at line 167 of file Decl.h.
References getNameAsString(), and getQualifiedNameAsString().
Referenced by clang::FormatASTNodeDiagnosticArgument().
| std::string NamedDecl::getQualifiedNameAsString | ( | ) | const |
getQualifiedNameAsString - Returns human-readable qualified name for declaration, like A::B::i, for i being member of namespace A::B. If declaration is not member of context which can be named (record, namespace), it will return same result as getNameAsString(). Creating this name is expensive, so it should be called only when performance doesn't matter.
Definition at line 815 of file Decl.cpp.
References clang::Decl::getASTContext().
Referenced by clang::CodeGen::CodeGenTypes::addRecordTypeName(), getNameForDiagnostic(), and IsMicrosoftUsingDeclarationAccessBug().
| std::string NamedDecl::getQualifiedNameAsString | ( | const PrintingPolicy & | Policy | ) | const |
Definition at line 819 of file Decl.cpp.
References clang::TemplateArgumentList::data(), clang::Decl::getDeclContext(), getDeclName(), getNameAsString(), clang::DeclContext::getParent(), clang::DeclContext::isFunctionOrMethod(), clang::FunctionType::isVariadic(), Param, clang::TemplateSpecializationType::PrintTemplateArgumentList(), and clang::TemplateArgumentList::size().
| NamedDecl * NamedDecl::getUnderlyingDecl | ( | ) |
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
Definition at line 954 of file Decl.cpp.
Referenced by clang::Sema::AddFunctionCandidates(), CalculateHiddenNames(), CheckAnonMemberRedeclaration(), clang::Sema::CheckDependentFunctionTemplateSpecialization(), clang::Sema::CheckFunctionTemplateSpecialization(), clang::Sema::CheckMemberSpecialization(), clang::Sema::CheckUsingShadowDecl(), clang::Sema::ClassifyName(), doesUsualArrayDeleteWantSize(), clang::Sema::FindAllocationOverload(), clang::Sema::FindAssociatedClassesAndNamespaces(), clang::Sema::FindDeallocationFunction(), getDeclShowContexts(), clang::getDeclUsageType(), clang::ASTContext::getOverloadedTemplateName(), getUnderlyingDecl(), isAcceptableTemplateName(), clang::Sema::LookupOverloadedOperatorName(), noteOverloads(), clang::LookupResult::resolveKind(), and ResolveOverloadForDeduction().
| const NamedDecl* clang::NamedDecl::getUnderlyingDecl | ( | ) | const [inline] |
Definition at line 302 of file Decl.h.
References getUnderlyingDecl().
| Visibility clang::NamedDecl::getVisibility | ( | ) | const [inline] |
Determines the visibility of this entity.
Definition at line 284 of file Decl.h.
References getLinkageAndVisibility(), and clang::NamedDecl::LinkageInfo::visibility().
| bool NamedDecl::hasLinkage | ( | ) | const |
Determine whether this declaration has linkage.
Definition at line 950 of file Decl.cpp.
References getLinkage(), and clang::NoLinkage.
Referenced by clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnVariableDeclarator(), clang::Sema::CheckVariableDeclaration(), isOutOfScopePreviousDeclaration(), and clang::Sema::MergeVarDecl().
| bool clang::NamedDecl::isCXXClassMember | ( | ) | const [inline] |
Determine whether this declaration is a C++ class member.
Definition at line 195 of file Decl.h.
References clang::Decl::getDeclContext(), clang::DeclContext::getParent(), and clang::DeclContext::isRecord().
Referenced by isCXXInstanceMember(), isQualifiedMemberAccess(), clang::Sema::IsSimplyAccessible(), clang::Sema::MergeFunctionDecl(), and clang::Sema::UseArgumentDependentLookup().
| bool NamedDecl::isCXXInstanceMember | ( | ) | const |
Given that this declaration is a C++ class member, determine whether it's an instance member of its class.
Definition at line 967 of file Decl.cpp.
References isCXXClassMember().
Referenced by clang::Sema::BuildMemberReferenceExpr(), and ClassifyImplicitMemberAccess().
| bool clang::NamedDecl::isHidden | ( | ) | const [inline] |
Determine whether this declaration is hidden from name lookup.
Definition at line 192 of file Decl.h.
References clang::Decl::Hidden.
Referenced by clang::LookupResult::isVisible().
| void clang::NamedDecl::printName | ( | raw_ostream & | os | ) | const [inline] |
Definition at line 140 of file Decl.h.
References clang::DeclarationName::printName().
Referenced by clang::CodeGen::CodeGenTypes::addRecordTypeName(), and clang::operator<<().
| void clang::NamedDecl::setDeclName | ( | DeclarationName | N | ) | [inline] |
Set the name of this declaration.
Definition at line 147 of file Decl.h.
Referenced by clang::Sema::InstantiateFunctionDefinition(), and clang::ASTDeclReader::VisitNamedDecl().