Go to the source code of this file.
enum ShadowedDeclKind {Old
to New
, taking into account the special semantics of C11's _Alignas specifier and C++11's alignas attribute.
VD
, or an invalid source location otherwise.
OldDC
can be redeclared with an unqualified name in NewDC
(assuming name lookup found a declaration in OldDC
as a previous decl, perhaps through a using-declaration).
Definition at line 9461 of file SemaDecl.cpp.
◆ ShadowedDeclKindEnum describing the select options in diag::warn_decl_shadow.
Enumerator SDK_Local SDK_Global SDK_StaticMember SDK_Field SDK_Typedef SDK_Using SDK_StructuredBindingDefinition at line 8222 of file SemaDecl.cpp.
◆ adjustDeclContextForDeclaratorDecl() ◆ AllowOverloadingOfFunction() ◆ AreSpecialMemberFunctionsSameKind() ◆ AttrCompatibleWithMultiVersion() ◆ buildNamedType()Build a ParsedType for a simple-type-specifier with a nested-name-specifier.
Definition at line 250 of file SemaDecl.cpp.
References clang::Sema::Context, clang::Sema::CreateParsedType(), clang::Sema::getElaboratedType(), clang::ASTContext::getElaboratedType(), clang::Type::getTypeClass(), clang::CXXScopeSpec::getWithLocInContext(), clang::CXXScopeSpec::isEmpty(), clang::OpaquePtr< QualType >::make(), clang::None, clang::ElaboratedTypeLoc::setElaboratedKeywordLoc(), clang::ElaboratedTypeLoc::setQualifierLoc(), and clang::T.
Referenced by clang::Sema::ClassifyName(), and clang::Sema::getTypeName().
◆ canRedefineFunction() ◆ checkAliasAttr() ◆ CheckAnonMemberRedeclaration()We are trying to inject an anonymous member into the given scope; check if there's an existing declaration that can't be overloaded.
Definition at line 5312 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), clang::Sema::DiagPlaceholderVariableDefinition(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::LookupResult::getRepresentativeDecl(), clang::NamedDecl::getUnderlyingDecl(), clang::Sema::isDeclInScope(), clang::DeclContext::isFunctionOrMethod(), clang::NamedDecl::isPlaceholderVar(), clang::DeclContext::isRecord(), clang::Sema::LookupMemberName, clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, and clang::SC_None.
Referenced by InjectAnonymousStructOrUnionMembers().
◆ checkAttributesAfterMerging() static void checkAttributesAfterMerging ( Sema & S, NamedDecl & ND ) static ◆ CheckC23ConstexprVarType()Definition at line 8609 of file SemaDecl.cpp.
References clang::Sema::Context, clang::SemaBase::Diag(), clang::RecordDecl::fields(), clang::Type::getAsRecordDecl(), clang::ASTContext::getBaseElementType(), clang::ASTContext::getCanonicalType(), clang::Type::isAtomicType(), clang::Type::isRecordType(), clang::QualType::isRestrictQualified(), clang::Type::isVariablyModifiedType(), clang::QualType::isVolatileQualified(), and clang::T.
Referenced by clang::Sema::CheckVariableDeclarationType().
◆ CheckConstPureAttributesUsage() ◆ CheckDeclarationCausesMultiVersioning()Definition at line 11461 of file SemaDecl.cpp.
References CheckMultiVersionAdditionalRules(), CheckMultiVersionValue(), clang::SemaBase::Diag(), clang::ParsedTargetAttr::Features, clang::Sema::getASTContext(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::ASTContext::getTargetInfo(), clang::FunctionDecl::isMultiVersion(), clang::TargetInfo::parseTargetAttr(), patchDefaultTargetVersion(), Previous, PreviousDeclsHaveMultiVersionAttribute(), clang::Redeclarable< decl_type >::redecls(), clang::Decl::setInvalidDecl(), clang::FunctionDecl::setIsMultiVersion(), clang::Target, and clang::TargetVersion.
Referenced by CheckMultiVersionFunction().
◆ checkDLLAttributeRedeclaration()Definition at line 7057 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::VarDecl::DeclarationOnly, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::FOK_Declared, clang::Decl::getAttr(), clang::Decl::getLocation(), clang::ASTContext::getTargetInfo(), clang::NamedDecl::isCXXClassMember(), clang::Decl::isImplicit(), clang::Decl::isInvalidDecl(), clang::Decl::isLocalExternDecl(), clang::Decl::isUsed(), clang::Decl::setInvalidDecl(), clang::TargetInfo::shouldDLLImportComdatSymbols(), clang::FunctionDecl::TK_MemberSpecialization, and clang::FunctionDecl::TK_NonTemplate.
Referenced by clang::Sema::ActOnFunctionDeclarator(), and clang::Sema::ActOnVariableDeclarator().
◆ checkDuplicateDefaultInit() [1/2] ◆ checkDuplicateDefaultInit() [2/2] ◆ CheckExplicitObjectParameter() ◆ checkForConflictWithNonVisibleExternC()template<typename T >
static bool checkForConflictWithNonVisibleExternC ( Sema & S, const T * ND, LookupResult & Previous ) static ◆ CheckForDuplicateEnumValues() ◆ checkGlobalOrExternCConflict()Check for conflict between this global or extern "C" declaration and previous global or extern "C" declarations.
This is only used in C++.
Definition at line 8495 of file SemaDecl.cpp.
References clang::DeclContextLookupResult::begin(), clang::Sema::Context, clang::SemaBase::Diag(), E, clang::DeclContextLookupResult::end(), clang::Sema::findLocallyScopedExternCDecl(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::ASTContext::getTranslationUnitDecl(), isIncompleteDeclExternC(), clang::DeclContext::lookup(), and Previous.
Referenced by checkForConflictWithNonVisibleExternC().
◆ checkHybridPatchableAttr() static void checkHybridPatchableAttr ( Sema & S, NamedDecl & ND ) static ◆ checkInheritableAttr()Definition at line 6963 of file SemaDecl.cpp.
References clang::Sema::Context, clang::SemaBase::Diag(), clang::TargetInfo::getCXXABI(), clang::getDLLAttr(), clang::Decl::getLocation(), clang::DeclContext::getParent(), clang::ASTContext::getTargetInfo(), clang::NamespaceDecl::isAnonymousNamespace(), clang::NamedDecl::isExternallyVisible(), clang::TargetCXXABI::isMicrosoft(), and clang::Decl::setInvalidDecl().
Referenced by checkAttributesAfterMerging().
◆ checkIsValidOpenCLKernelParameter() static void checkIsValidOpenCLKernelParameter ( Sema & S, Declarator & D, ParmVarDecl * Param, llvm::SmallPtrSetImpl< const Type * > & ValidTypes ) staticDefinition at line 9598 of file SemaDecl.cpp.
References clang::Type::castAs(), D, clang::TypedefType::desugar(), clang::SemaBase::Diag(), E, clang::RecordDecl::fields(), clang::Type::getAs(), clang::TypedefType::getDecl(), clang::RecordType::getDecl(), clang::Decl::getLocation(), getOpenCLKernelParameterType(), clang::Type::getPointeeOrArrayElementType(), clang::ValueDecl::getType(), clang::QualType::getTypePtr(), InvalidAddrSpacePtrKernelParam, InvalidKernelParam, clang::Type::isArrayType(), clang::Type::isHalfType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isUnionType(), clang::SourceLocation::isValid(), Loc, PtrKernelParam, PtrPtrKernelParam, RecordKernelParam, and ValidKernelParam.
Referenced by clang::Sema::ActOnFunctionDeclarator().
◆ checkLifetimeBoundAttr() ◆ CheckMultiVersionAdditionalDecl()Check the validity of a new function declaration being added to an existing multiversioned declaration collection.
Definition at line 11588 of file SemaDecl.cpp.
References AllowOverloadingOfFunction(), CheckMultiVersionAdditionalRules(), CheckMultiVersionValue(), clang::Sema::Context, clang::CPUDispatch, clang::CPUSpecific, clang::Sema::CurContext, clang::SemaBase::Diag(), clang::ParsedTargetAttr::Features, clang::Decl::getAsFunction(), clang::Sema::getASTContext(), clang::Decl::getAttr(), clang::Decl::getFriendObjectKind(), clang::Decl::getLocation(), clang::FunctionDecl::getMultiVersionKind(), clang::ASTContext::getTargetInfo(), clang::Decl::hasAttr(), clang::Decl::isInvalidDecl(), clang::FunctionDecl::isMultiVersion(), clang::Sema::IsOverload(), clang::DeclContext::isRecord(), MultiVersionTypesCompatible(), clang::None, clang::TargetInfo::parseTargetAttr(), patchDefaultTargetVersion(), Previous, clang::Decl::setInvalidDecl(), clang::FunctionDecl::setIsMultiVersion(), clang::Target, clang::TargetClones, and clang::TargetVersion.
Referenced by CheckMultiVersionFunction().
◆ CheckMultiVersionAdditionalRules()Definition at line 11363 of file SemaDecl.cpp.
References clang::Sema::areMultiversionVariantFunctionsCompatible(), checkNonMultiVersionCompatAttributes(), clang::CPUDispatch, clang::CPUSpecific, clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::Decl::getLocation(), clang::ASTContext::getTargetInfo(), clang::Decl::isUsed(), clang::SemaBase::PDiag(), and clang::TargetInfo::supportsMultiVersioning().
Referenced by CheckDeclarationCausesMultiVersioning(), CheckMultiVersionAdditionalDecl(), and CheckMultiVersionFirstFunction().
◆ CheckMultiVersionFirstFunction() ◆ CheckMultiVersionFunction()Check the validity of a mulitversion function declaration.
Also sets the multiversion'ness' of the function itself.
This sets NewFD->isInvalidDecl() to true if there was an error.
Returns true if there was an error, false otherwise.
Definition at line 11839 of file SemaDecl.cpp.
References CheckDeclarationCausesMultiVersioning(), CheckMultiVersionAdditionalDecl(), CheckMultiVersionFirstFunction(), clang::CPUDispatch, clang::CPUSpecific, clang::SemaBase::Diag(), clang::DeclContext::Equals(), clang::Decl::getAsFunction(), clang::Sema::getASTContext(), clang::Decl::getAttr(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::FunctionDecl::getMultiVersionKind(), clang::DeclContext::getRedeclContext(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::TargetInfo::hasFeature(), clang::FunctionDecl::isMain(), clang::FunctionDecl::isMultiVersion(), clang::Decl::isUsed(), clang::None, Previous, clang::Decl::setInvalidDecl(), clang::FunctionDecl::setIsMultiVersion(), clang::Target, clang::TargetClones, and clang::TargetVersion.
Referenced by clang::Sema::CheckFunctionDeclaration().
◆ CheckMultiVersionValue()Check the target or target_version attribute of the function for MultiVersion validity.
Returns true if there was an error, false otherwise.
Definition at line 11116 of file SemaDecl.cpp.
References clang::Sema::Context, clang::ParsedTargetAttr::CPU, clang::SemaBase::Diag(), clang::ParsedTargetAttr::Features, clang::Sema::getASTContext(), clang::Decl::getAttr(), clang::TargetInfo::getFMVPriority(), clang::Decl::getLocation(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::TargetInfo::isValidFeatureName(), clang::TargetInfo::parseTargetAttr(), clang::TargetInfo::validateCpuIs(), and clang::TargetInfo::validateCpuSupports().
Referenced by CheckDeclarationCausesMultiVersioning(), CheckMultiVersionAdditionalDecl(), and CheckMultiVersionFirstFunction().
◆ checkNewAttributesAfterDef() static void checkNewAttributesAfterDef ( Sema & S, Decl * New, const Decl * Old ) staticcheckNewAttributesAfterDef - If we already have a definition, check that there are no new attributes in this declaration.
Definition at line 2918 of file SemaDecl.cpp.
References clang::Sema::CheckForFunctionRedefinition(), clang::VarDecl::Definition, Diag(), clang::SemaBase::Diag(), E, clang::Decl::getAttrs(), clang::NamedDecl::getDeclName(), getDefinition(), clang::Attr::getKind(), clang::Sema::getLangOpts(), clang::Attr::getLocation(), clang::Decl::getLocation(), clang::hasAttribute(), clang::Decl::hasAttrs(), clang::Sema::notePreviousDefinition(), clang::Decl::setInvalidDecl(), clang::SkipBodyInfo::ShouldSkip, and clang::VarDecl::TentativeDefinition.
Referenced by clang::Sema::mergeDeclAttributes().
◆ checkNonMultiVersionCompatAttributes() ◆ CheckPoppedLabel() ◆ checkSelectAnyAttr() ◆ checkUsingShadowRedecl() ◆ checkWeakAttr() ◆ checkWeakRefAttr() ◆ ComputeSelectedDestructor()[class.dtor]p4: At the end of the definition of a class, overload resolution is performed among the prospective destructors declared in that class with an empty argument list to select the destructor for the class, also known as the selected destructor.
We do the overload resolution here, then mark the selected constructor in the AST. Later CXXRecordDecl::getDestructor() will return the selected constructor.
Definition at line 18822 of file SemaDecl.cpp.
References clang::Sema::AddOverloadCandidate(), clang::OverloadCandidateSet::begin(), clang::OverloadCandidateSet::BestViableFunction(), clang::OverloadCandidateSet::CSK_Normal, Diag(), clang::OverloadCandidateSet::empty(), clang::Sema::LangOpts, Loc, clang::DeclAccessPair::make(), clang::OverloadCandidateSet::NoteCandidates(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, and clang::SemaBase::PDiag().
Referenced by clang::Sema::ActOnFields().
◆ computeShadowedDeclKind() ◆ ComputeSpecialMemberFunctionsEligiblity() static void ComputeSpecialMemberFunctionsEligiblity ( Sema & S, CXXRecordDecl * Record ) static ◆ copyAttrFromTypedefToDecl()template<typename AttrTy >
◆ createFriendTagNNSFixIt() ◆ CreateNewFunctionDecl()Definition at line 9288 of file SemaDecl.cpp.
References clang::Sema::AdjustDestructorExceptionSpec(), clang::Sema::CheckConstructorDeclarator(), clang::Sema::CheckConversionDeclarator(), clang::Sema::CheckDeductionGuideDeclarator(), clang::Sema::CheckDestructorDeclarator(), clang::Sema::CheckExplicitObjectMemberFunction(), clang::Constexpr, clang::Constinit, clang::Sema::Context, clang::CXXDestructorDecl::Create(), clang::CXXConversionDecl::Create(), clang::CXXConstructorDecl::Create(), clang::CXXMethodDecl::Create(), clang::CXXDeductionGuideDecl::Create(), clang::FunctionDecl::Create(), clang::Sema::CurContext, clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDeductionGuideName, clang::DeclarationName::CXXDestructorName, D, clang::SemaBase::Diag(), clang::Type::getAsAdjusted(), clang::Decl::getBeginLoc(), clang::Sema::getCurFPFeatures(), clang::Decl::getEndLoc(), clang::Sema::getLangOpts(), clang::DeclarationNameInfo::getName(), clang::Sema::GetNameForDeclarator(), clang::Sema::GetTypeFromParser(), clang::FPOptions::isFPConstrained(), clang::Type::isFunctionProtoType(), clang::DeclContext::isRecord(), clang::Normal, clang::LangOptions::requiresStrictPrototypes(), clang::FunctionDecl::setIneligibleOrNotSelected(), clang::Decl::setInvalidDecl(), and clang::Unspecified.
Referenced by clang::Sema::ActOnFunctionDeclarator().
◆ DeclHasAttr() ◆ diagnoseImplicitlyRetainedSelf() static void diagnoseImplicitlyRetainedSelf ( Sema & S ) static ◆ DiagnoseInvalidRedeclaration()Generate diagnostics for an invalid function redeclaration.
This routine handles generating the diagnostic messages for an invalid function redeclaration, including finding possible similar declarations or performing typo correction if there are no previous declarations with the same name.
Returns a NamedDecl iff typo correction was performed and substituting in the new declaration name does not cause new errors.
Definition at line 9095 of file SemaDecl.cpp.
References clang::Sema::ActOnFunctionDeclarator(), clang::TypoCorrection::begin(), clang::LookupResult::begin(), clang::Sema::Context, clang::Sema::CorrectTypo(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateRemoval(), clang::Sema::CTK_ErrorRecovery, clang::SemaBase::Diag(), clang::Sema::diagnoseTypo(), E, clang::LookupResult::empty(), clang::TypoCorrection::end(), clang::LookupResult::end(), clang::Func, clang::TypoCorrection::getCorrection(), clang::TypoCorrection::getCorrectionAsIdentifierInfo(), clang::TypoCorrection::getCorrectionDecl(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::SourceRange::getEnd(), clang::Decl::getFriendObjectKind(), clang::Decl::getLocation(), clang::LookupResult::getLookupKind(), clang::LookupResult::getLookupNameInfo(), clang::NamedDecl::getName(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getSourceRange(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSourceInfo(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::FunctionDecl::hasBody(), clang::Sema::SFINAETrap::hasErrorOccurred(), hasSimilarParameters(), clang::LookupResult::isAmbiguous(), clang::CXXMethodDecl::isConst(), clang::SourceLocation::isInvalid(), Loc, clang::Sema::LookupLocalFriendName, clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::Sema::MarkTypoCorrectedFunctionDefinition(), clang::SemaBase::PDiag(), Previous, clang::Result, clang::TypoCorrection::setCorrectionDecl(), and clang::Decl::setInvalidDecl().
Referenced by clang::Sema::ActOnFunctionDeclarator().
◆ diagnoseMissingConstinit() static void diagnoseMissingConstinit ( Sema & S, const VarDecl * InitDecl, const ConstInitAttr * CIAttr, bool AttrBeforeInit ) static ◆ diagnoseOpenCLTypes()Returns true if there hasn't been any invalid type diagnosed.
Definition at line 7329 of file SemaDecl.cpp.
References clang::Sema::Context, clang::SemaBase::Diag(), clang::QualType::getAddressSpace(), clang::ASTContext::getBaseElementType(), clang::DeclaratorDecl::getBeginLoc(), clang::QualType::getCanonicalType(), clang::Decl::getDeclContext(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::Sema::getOpenCLOptions(), clang::Type::getPointeeType(), clang::ValueDecl::getType(), clang::VarDecl::hasGlobalStorage(), clang::OpenCLOptions::isAvailableOption(), clang::Type::isClkEventT(), clang::QualType::isConstQualified(), clang::Type::isEventT(), clang::Type::isFunctionPointerType(), clang::Type::isFunctionReferenceType(), clang::Type::isHalfType(), clang::Type::isImageType(), clang::Decl::isInvalidDecl(), clang::Type::isMemberFunctionPointerType(), clang::Type::isPipeType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::Type::isReserveIDT(), clang::Type::isSamplerT(), clang::VarDecl::isStaticLocal(), clang::DeclContext::isTranslationUnit(), clang::opencl_constant, clang::opencl_global, clang::opencl_local, clang::opencl_private, and clang::Decl::setInvalidDecl().
Referenced by clang::Sema::CheckVariableDeclarationType().
◆ diagnoseVarDeclTypeMismatch() ◆ emitReadOnlyPlacementAttrWarning() static void emitReadOnlyPlacementAttrWarning ( Sema & S, const VarDecl * VD ) staticDefinition at line 7437 of file SemaDecl.cpp.
References clang::SemaBase::Diag(), clang::Type::getAsRecordDecl(), clang::Sema::getASTContext(), clang::Decl::getAttr(), clang::ASTContext::getBaseElementType(), clang::QualType::getCanonicalType(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::VarDecl::hasLocalStorage(), clang::Type::isArrayType(), and clang::QualType::isConstQualified().
Referenced by clang::Sema::ActOnVariableDeclarator().
◆ EquivalentArrayTypes() ◆ filterNonConflictingPreviousTypedefDecls() ◆ findDefaultInitializer() ◆ FindPossiblePrototype() ◆ findRecordWithDependentBasesOfEnclosingMethod() ◆ FixInvalidVariablyModifiedTypeLoc() static void FixInvalidVariablyModifiedTypeLoc ( TypeLoc SrcTL, TypeLoc DstTL ) staticDefinition at line 6559 of file SemaDecl.cpp.
References clang::TypeLoc::castAs(), FixInvalidVariablyModifiedTypeLoc(), clang::TypeLoc::getAs(), clang::ArrayTypeLoc::getElementLoc(), clang::ParenTypeLoc::getInnerLoc(), clang::ArrayTypeLoc::getLBracketLoc(), clang::PointerLikeTypeLoc< Derived, TypeClass, LocalData >::getPointeeLoc(), clang::ArrayTypeLoc::getRBracketLoc(), clang::ArrayTypeLoc::getSizeExpr(), clang::TypeLoc::getUnqualifiedLoc(), clang::TypeLoc::initializeFullCopy(), clang::ParenTypeLoc::setLParenLoc(), clang::ParenTypeLoc::setRParenLoc(), and clang::PointerTypeLoc::setStarLoc().
Referenced by FixInvalidVariablyModifiedTypeLoc(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().
◆ GenerateFixForUnusedDecl() ◆ getCaptureLocation() ◆ getCoreType() ◆ getDefinition() ◆ GetDiagnosticTypeSpecifierID() ◆ getFunctionStorageClass()Definition at line 9252 of file SemaDecl.cpp.
References clang::Sema::CurContext, D, clang::SemaBase::Diag(), clang::DeclContext::getRedeclContext(), clang::DeclContext::isFunctionOrMethod(), clang::SC_Extern, clang::SC_None, clang::SC_PrivateExtern, clang::SC_Static, clang::DeclSpec::SCS_auto, clang::DeclSpec::SCS_extern, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_private_extern, clang::DeclSpec::SCS_register, clang::DeclSpec::SCS_static, and clang::DeclSpec::SCS_unspecified.
Referenced by clang::Sema::ActOnFunctionDeclarator().
◆ getHeaderName() ◆ getImplicitCodeSegAttrFromClass() ◆ getMSManglingNumber() ◆ getNextLargerIntegralType()Definition at line 19554 of file SemaDecl.cpp.
References clang::ASTContext::getTypeSize(), clang::ASTContext::IntTy, clang::Type::isEnumeralType(), clang::Type::isIntegralType(), clang::Type::isSignedIntegerOrEnumerationType(), clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, clang::ASTContext::ShortTy, clang::T, clang::ASTContext::UnsignedIntTy, clang::ASTContext::UnsignedLongLongTy, clang::ASTContext::UnsignedLongTy, and clang::ASTContext::UnsignedShortTy.
Referenced by clang::Sema::CheckEnumConstant().
◆ getNonCLikeKindForAnonymousStruct() static NonCLikeKind getNonCLikeKindForAnonymousStruct ( const CXXRecordDecl * RD ) staticDetermine whether a class is C-like, according to the rules of C++ [dcl.typedef] for anonymous classes with typedef names for linkage.
Definition at line 4892 of file SemaDecl.cpp.
References clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), D, clang::DeclContext::decls(), clang::CXXBaseSpecifier::getBeginLoc(), clang::CXXBaseSpecifier::getEndLoc(), getNonCLikeKindForAnonymousStruct(), clang::CXXRecordDecl::getNumBases(), clang::Decl::getSourceRange(), clang::Init, clang::Invalid, clang::Decl::isImplicit(), and clang::Decl::isInvalidDecl().
Referenced by getNonCLikeKindForAnonymousStruct(), and clang::Sema::setTagNameForLinkagePurposes().
◆ getNoteDiagForInvalidRedeclaration() ◆ getOpenCLKernelParameterType()Definition at line 9492 of file SemaDecl.cpp.
References clang::Sema::Context, clang::Default, clang::QualType::getAddressSpace(), clang::Type::getAsCXXRecordDecl(), clang::Sema::getASTContext(), clang::QualType::getCanonicalType(), clang::Sema::getLangOpts(), clang::LangOptions::getOpenCLCompatibleVersion(), getOpenCLKernelParameterType(), clang::Sema::getOpenCLOptions(), clang::Type::getPointeeOrArrayElementType(), clang::Type::getPointeeType(), clang::CXXRecordDecl::getTemplateInstantiationPattern(), InvalidAddrSpacePtrKernelParam, InvalidKernelParam, clang::Type::isArrayType(), clang::Type::isAtomicType(), clang::OpenCLOptions::isAvailableOption(), clang::Type::isBooleanType(), clang::Type::isDependentType(), clang::Type::isEventT(), clang::Type::isHalfType(), clang::Type::isImageType(), isOpenCLSizeDependentType(), clang::Type::isOpenCLSpecificType(), clang::QualType::isPODType(), clang::Type::isPointerOrReferenceType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isReserveIDT(), clang::Type::isVoidType(), clang::opencl_generic, clang::opencl_private, PtrKernelParam, PtrPtrKernelParam, RecordKernelParam, and ValidKernelParam.
Referenced by checkIsValidOpenCLKernelParameter(), and getOpenCLKernelParameterType().
◆ getRedeclDiagFromTagKind() ◆ getTagInjectionContext() ◆ getTagInjectionScope() ◆ hasAttribute() ◆ hasDeducedAuto() ◆ hasIdenticalPassObjectSizeAttrs() ◆ hasParsedAttr() ◆ hasSimilarParameters() ◆ haveIncompatibleLanguageLinkages()template<typename T >
static bool haveIncompatibleLanguageLinkages ( const T * Old, const T * New ) static ◆ InjectAnonymousStructOrUnionMembers()InjectAnonymousStructOrUnionMembers - Inject the members of the anonymous struct or union AnonRecord into the owning context Owner and scope S.
This routine will be invoked just after we realize that an unnamed union or struct is actually an anonymous union or struct, e.g.,
union {
int i;
float f;
};
This routine is recursive, injecting the names of nested anonymous structs/unions into the owning context and scope as well.
Definition at line 5388 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::AS_none, clang::Decl::attrs(), CheckAnonMemberRedeclaration(), clang::Attr::clone(), clang::Sema::Context, clang::IndirectFieldDecl::Create(), D, clang::DeclContext::decls(), clang::NamedDecl::getDeclName(), clang::NamedDecl::getIdentifier(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::Invalid, clang::TagDecl::isUnion(), clang::Sema::PushOnScopeChains(), clang::Decl::setAccess(), and clang::Decl::setImplicit().
Referenced by clang::Sema::BuildAnonymousStructOrUnion(), and clang::Sema::BuildMicrosoftCAnonymousStruct().
◆ isAcceptableTagRedeclContext() ◆ isAttributeTargetADefinition() static bool isAttributeTargetADefinition ( Decl * D ) static ◆ isClassCompatTagKind() ◆ isDeclExternC() static bool isDeclExternC ( const Decl * D ) staticReturns true if given declaration has external C language linkage.
Definition at line 7319 of file SemaDecl.cpp.
References D.
◆ isDefaultStdCall() ◆ IsDisallowedCopyOrAssign() ◆ isExternC() [1/3] ◆ isExternC() [2/3]template<typename T >
static bool isExternC ( T * D ) static ◆ isExternC() [3/3] ◆ isFromSystemHeader() ◆ isFunctionDefinitionDiscarded() ◆ isIncompleteDeclExternC()template<typename T >
static bool isIncompleteDeclExternC ( Sema & S, const T * D ) static ◆ isMainFileLoc() ◆ isMainVar() ◆ isOpenCLSizeDependentType() ◆ isOutOfScopePreviousDeclaration() ◆ isRepresentableIntegerValue() ◆ isResultTypeOrTemplate() ◆ isStdBuiltin() ◆ isTagTypeWithMissingTag()Definition at line 813 of file SemaDecl.cpp.
References clang::Class, clang::FixItHint::CreateInsertion(), clang::SemaBase::Diag(), clang::Enum, clang::LookupResult::getAsSingle(), clang::Sema::getLangOpts(), clang::Interface, clang::Sema::LookupParsedName(), clang::Sema::LookupTagName, clang::Result, clang::Struct, and clang::Union.
Referenced by clang::Sema::ClassifyName().
◆ isUsingDeclNotAtClassScope() ◆ lookupUnqualifiedTypeNameInBase() ◆ mergeAlignedAttrs()Merge alignment attributes from Old
to New
, taking into account the special semantics of C11's _Alignas specifier and C++11's alignas attribute.
true
if any attributes were added to New
.
Definition at line 2675 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::CharUnits::getQuantity(), clang::ASTContext::getTagDeclType(), clang::ASTContext::getTypeAlign(), isAttributeTargetADefinition(), clang::Decl::specific_attrs(), and clang::ASTContext::toCharUnitsFromBits().
Referenced by clang::Sema::mergeDeclAttributes().
◆ mergeDeclAttribute()Definition at line 2786 of file SemaDecl.cpp.
References clang::Decl::addAttr(), clang::Sema::AMK_OptionalProtocolImplementation, clang::Sema::AMK_Override, clang::Sema::AMK_ProtocolImplementation, clang::ASTConsumer::AssignInheritanceModel(), clang::Attr::clone(), clang::Sema::Consumer, clang::Sema::Context, D, DeclHasAttr(), clang::IdentifierTable::get(), clang::Sema::getLangOpts(), clang::Sema::HLSL(), clang::ASTContext::Idents, clang::Decl::isImplicit(), clang::Sema::mergeAlwaysInlineAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Sema::mergeBTFDeclTagAttr(), clang::Sema::mergeCodeSegAttr(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeDLLImportAttr(), clang::Sema::mergeEnforceTCBAttr(), clang::Sema::mergeEnforceTCBLeafAttr(), clang::Sema::mergeErrorAttr(), clang::Sema::mergeFormatAttr(), clang::SemaWasm::mergeImportModuleAttr(), clang::SemaWasm::mergeImportNameAttr(), clang::Sema::mergeInternalLinkageAttr(), clang::Sema::mergeMinSizeAttr(), clang::Sema::mergeMSInheritanceAttr(), clang::SemaSwift::mergeNameAttr(), clang::SemaHLSL::mergeNumThreadsAttr(), clang::Sema::mergeOptimizeNoneAttr(), clang::Sema::mergeSectionAttr(), clang::SemaHLSL::mergeShaderAttr(), clang::Sema::mergeTypeVisibilityAttr(), clang::Sema::mergeUuidAttr(), clang::Sema::mergeVisibilityAttr(), clang::SemaHLSL::mergeWaveSizeAttr(), clang::InheritableAttr::setInherited(), clang::Sema::Swift(), and clang::Sema::Wasm().
Referenced by clang::Sema::mergeDeclAttributes().
◆ mergeParamDeclAttributes() ◆ mergeParamDeclTypes()Definition at line 3353 of file SemaDecl.cpp.
References clang::Sema::Context, clang::SemaBase::Diag(), EquivalentArrayTypes(), clang::Sema::getASTContext(), clang::ASTContext::getAttributedType(), clang::Decl::getLocation(), clang::Type::getNullability(), clang::ParmVarDecl::getObjCDeclQualifier(), clang::ValueDecl::getType(), clang::Decl::OBJC_TQ_CSNullability, and clang::ValueDecl::setType().
Referenced by clang::Sema::MergeCompatibleFunctionDecls().
◆ mergeTypeWithPrevious() ◆ methodHasName() ◆ MultiVersionTypesCompatible() ◆ patchDefaultTargetVersion() ◆ PreviousDeclsHaveMultiVersionAttribute() ◆ propagateAttribute() ◆ propagateAttributes() ◆ RebuildDeclaratorInCurrentInstantiation()RebuildDeclaratorInCurrentInstantiation - Checks whether the given declarator needs to be rebuilt in the current instantiation.
Any bits of declarator which appear before the name are valid for consideration here. That's specifically the type in the decl spec and the base type in any member-pointer chunks.
Definition at line 5996 of file SemaDecl.cpp.
References clang::Sema::Context, clang::Sema::CreateParsedType(), D, E, clang::DeclSpec::getRepAsExpr(), clang::DeclSpec::getRepAsType(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::TypeSourceInfo::getType(), clang::Sema::GetTypeFromParser(), clang::DeclSpec::getTypeSpecType(), clang::DeclSpec::getTypeSpecTypeLoc(), clang::Type::isInstantiationDependentType(), clang::DeclaratorChunk::Kind, clang::DeclaratorChunk::Mem, clang::DeclaratorChunk::MemberPointer, clang::Sema::RebuildExprInCurrentInstantiation(), clang::Sema::RebuildNestedNameSpecifierInCurrentInstantiation(), clang::Sema::RebuildTypeInCurrentInstantiation(), clang::Result, clang::DeclaratorChunk::MemberPointerTypeInfo::Scope(), clang::T, clang::DeclSpec::TST_atomic, clang::DeclSpec::TST_decltype, clang::DeclSpec::TST_typename, clang::DeclSpec::TST_typeof_unqualExpr, clang::DeclSpec::TST_typeof_unqualType, clang::DeclSpec::TST_typeofExpr, clang::DeclSpec::TST_typeofType, clang::DeclSpec::UpdateExprRep(), and clang::DeclSpec::UpdateTypeRep().
Referenced by clang::Sema::HandleDeclarator().
◆ recoverFromTypeInKnownDependentBase()Definition at line 208 of file SemaDecl.cpp.
References clang::Sema::Context, clang::NestedNameSpecifier::Create(), clang::Sema::CreateParsedType(), clang::Sema::CurContext, clang::SemaBase::Diag(), clang::ASTContext::getDependentNameType(), clang::CXXRecordDecl::getDescribedClassTemplate(), clang::DeclContext::getParent(), clang::ASTContext::getRecordType(), clang::CXXScopeSpec::getWithLocInContext(), lookupUnqualifiedTypeNameInBase(), clang::CXXScopeSpec::MakeTrivial(), clang::DependentNameTypeLoc::setElaboratedKeywordLoc(), clang::DependentNameTypeLoc::setNameLoc(), clang::DependentNameTypeLoc::setQualifierLoc(), clang::T, and clang::Typename.
Referenced by clang::Sema::ClassifyName(), and clang::Sema::getTypeName().
◆ RemoveUsingDecls() ◆ SetEligibleMethods()[class.mem.special]p6: An eligible special member function is a special member function for which:
Definition at line 18915 of file SemaDecl.cpp.
References AreSpecialMemberFunctionsSameKind(), clang::Sema::CheckFunctionConstraints(), clang::Sema::Context, clang::FunctionDecl::getInstantiatedFromMemberFunction(), clang::DeclaratorDecl::getTrailingRequiresClause(), clang::Sema::IsAtLeastAsConstrained(), clang::ConstraintSatisfaction::IsSatisfied, and clang::FunctionDecl::setIneligibleOrNotSelected().
Referenced by ComputeSpecialMemberFunctionsEligiblity().
◆ SetNestedNameSpecifier() ◆ shouldConsiderLinkage() [1/2] ◆ shouldConsiderLinkage() [2/2] static bool shouldConsiderLinkage ( const VarDecl * VD ) static ◆ ShouldDiagnoseUnusedDecl() ◆ ShouldWarnAboutMissingPrototype()Definition at line 15399 of file SemaDecl.cpp.
References FindPossiblePrototype(), clang::Decl::getDeclContext(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::NamedDecl::getIdentifier(), clang::DeclContext::getRedeclContext(), clang::Decl::hasAttr(), clang::FunctionDecl::isDeleted(), clang::NamedDecl::isExternallyVisible(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::FunctionDecl::isGlobal(), clang::FunctionDecl::isInlined(), clang::Decl::isInvalidDecl(), and clang::FunctionDecl::isMSVCRTEntryPoint().
Referenced by clang::Sema::ActOnFinishFunctionBody().
◆ shouldWarnIfShadowedDecl() ◆ StorageClassSpecToVarDeclStorageClass()StorageClassSpecToVarDeclStorageClass - Maps a DeclSpec::SCS to a VarDecl::StorageClass.
Any error reporting is up to the caller: illegal input values are mapped to SC_None.
Definition at line 5451 of file SemaDecl.cpp.
References clang::DeclSpec::getStorageClassSpec(), clang::DeclSpec::isExternInLinkageSpec(), clang::SC_Auto, clang::SC_Extern, clang::SC_None, clang::SC_PrivateExtern, clang::SC_Register, clang::SC_Static, clang::DeclSpec::SCS_auto, clang::DeclSpec::SCS_extern, clang::DeclSpec::SCS_mutable, clang::DeclSpec::SCS_private_extern, clang::DeclSpec::SCS_register, clang::DeclSpec::SCS_static, clang::DeclSpec::SCS_typedef, and clang::DeclSpec::SCS_unspecified.
Referenced by clang::Sema::ActOnVariableDeclarator(), clang::Sema::BuildAnonymousStructOrUnion(), and clang::Sema::BuildMicrosoftCAnonymousStruct().
◆ synthesizeCurrentNestedNameSpecifier() ◆ TryToFixInvalidVariablyModifiedType()Helper method to turn variable array types into constant array types in certain situations which would otherwise be errors (for GCC compatibility).
Definition at line 6481 of file SemaDecl.cpp.
References clang::QualifierCollector::apply(), clang::Expr::EvaluateAsInt(), clang::ASTContext::getConstantArrayType(), clang::ArrayType::getElementType(), clang::ConstantArrayType::getMaxSizeBits(), clang::ConstantArrayType::getNumAddressingBits(), clang::ASTContext::getParenType(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::VariableArrayType::getSizeExpr(), clang::Type::isDependentType(), clang::Type::isIncompleteType(), clang::QualType::isNull(), clang::Type::isUndeducedType(), clang::Type::isVariablyModifiedType(), clang::Normal, clang::Result, clang::QualifierCollector::strip(), clang::T, and TryToFixInvalidVariablyModifiedType().
Referenced by clang::Sema::CheckVariableDeclarationType(), TryToFixInvalidVariablyModifiedType(), and TryToFixInvalidVariablyModifiedTypeSourceInfo().
◆ TryToFixInvalidVariablyModifiedTypeSourceInfo() ◆ ValidDuplicateEnum()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