clang  14.0.0git
Namespaces | Enumerations | Functions
SemaDeclAttr.cpp File Reference
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Type.h"
#include "clang/Basic/CharInfo.h"
#include "clang/Basic/DarwinSDKInfo.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetBuiltins.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/DeclSpec.h"
#include "clang/Sema/DelayedDiagnostic.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/ParsedAttr.h"
#include "clang/Sema/Scope.h"
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/SemaInternal.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Assumptions.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "clang/Basic/arm_mve_builtin_aliases.inc"
#include "clang/Basic/arm_cde_builtin_aliases.inc"
Include dependency graph for SemaDeclAttr.cpp:

Go to the source code of this file.

Namespaces

 AttributeLangSupport
 

Enumerations

enum  AttributeLangSupport::LANG { AttributeLangSupport::C, AttributeLangSupport::Cpp, AttributeLangSupport::ObjC }
 
enum  FormatAttrKind {
  CFStringFormat, NSStringFormat, StrftimeFormat, SupportedFormat,
  IgnoredFormat, InvalidFormat
}
 

Functions

static bool isFunctionOrMethod (const Decl *D)
 isFunctionOrMethod - Return true if the given decl has function type (function or function-typed variable) or an Objective-C method. More...
 
static bool isFunctionOrMethodOrBlock (const Decl *D)
 Return true if the given decl has function type (function or function-typed variable) or an Objective-C method or a block. More...
 
static bool hasDeclarator (const Decl *D)
 Return true if the given decl has a declarator that should have been processed by Sema::GetTypeForDeclarator. More...
 
static bool hasFunctionProto (const Decl *D)
 hasFunctionProto - Return true if the given decl has a argument information. More...
 
static unsigned getFunctionOrMethodNumParams (const Decl *D)
 getFunctionOrMethodNumParams - Return number of function or method parameters. More...
 
static const ParmVarDeclgetFunctionOrMethodParam (const Decl *D, unsigned Idx)
 
static QualType getFunctionOrMethodParamType (const Decl *D, unsigned Idx)
 
static SourceRange getFunctionOrMethodParamRange (const Decl *D, unsigned Idx)
 
static QualType getFunctionOrMethodResultType (const Decl *D)
 
static SourceRange getFunctionOrMethodResultSourceRange (const Decl *D)
 
static bool isFunctionOrMethodVariadic (const Decl *D)
 
static bool isInstanceMethod (const Decl *D)
 
static bool isNSStringType (QualType T, ASTContext &Ctx, bool AllowNSAttributedString=false)
 
static bool isCFStringType (QualType T, ASTContext &Ctx)
 
static unsigned getNumAttributeArgs (const ParsedAttr &AL)
 
template<typename AttrInfo >
static std::enable_if_t< std::is_base_of< Attr, AttrInfo >::value, SourceLocationgetAttrLoc (const AttrInfo &AL)
 A helper function to provide Attribute Location for the Attr types AND the ParsedAttr. More...
 
static SourceLocation getAttrLoc (const ParsedAttr &AL)
 
template<typename AttrInfo >
static bool checkUInt32Argument (Sema &S, const AttrInfo &AI, const Expr *Expr, uint32_t &Val, unsigned Idx=UINT_MAX, bool StrictlyUnsigned=false)
 If Expr is a valid integer constant, get the value of the integer expression and return success or failure. More...
 
template<typename AttrInfo >
static bool checkPositiveIntArgument (Sema &S, const AttrInfo &AI, const Expr *Expr, int &Val, unsigned Idx=UINT_MAX)
 Wrapper around checkUInt32Argument, with an extra check to be sure that the result will fit into a regular (signed) int. More...
 
template<typename AttrTy >
static bool checkAttrMutualExclusion (Sema &S, Decl *D, const ParsedAttr &AL)
 Diagnose mutually exclusive attributes when present on a given declaration. More...
 
template<typename AttrTy >
static bool checkAttrMutualExclusion (Sema &S, Decl *D, const Attr &AL)
 
template<typename AttrInfo >
static bool checkFunctionOrMethodParameterIndex (Sema &S, const Decl *D, const AttrInfo &AI, unsigned AttrArgNum, const Expr *IdxExpr, ParamIdx &Idx, bool CanIndexImplicitThis=false)
 Check if IdxExpr is a valid parameter index for a function or instance method D. More...
 
template<typename AttrType >
static void handleSimpleAttribute (Sema &S, Decl *D, const AttributeCommonInfo &CI)
 Applies the given attribute to the Decl without performing any additional semantic checking. More...
 
template<typename... DiagnosticArgs>
static const Sema::SemaDiagnosticBuilderappendDiagnostics (const Sema::SemaDiagnosticBuilder &Bldr)
 
template<typename T , typename... DiagnosticArgs>
static const Sema::SemaDiagnosticBuilderappendDiagnostics (const Sema::SemaDiagnosticBuilder &Bldr, T &&ExtraArg, DiagnosticArgs &&... ExtraArgs)
 
template<typename AttrType , typename... DiagnosticArgs>
static void handleSimpleAttributeOrDiagnose (Sema &S, Decl *D, const AttributeCommonInfo &CI, bool PassesCheck, unsigned DiagID, DiagnosticArgs &&... ExtraArgs)
 Add an attribute AttrType to declaration D, provided that PassesCheck is true. More...
 
static bool isIntOrBool (Expr *Exp)
 Check if the passed-in expression is of type int or bool. More...
 
static bool threadSafetyCheckIsSmartPointer (Sema &S, const RecordType *RT)
 
static bool threadSafetyCheckIsPointer (Sema &S, const Decl *D, const ParsedAttr &AL)
 Check if passed in Decl is a pointer type. More...
 
static const RecordTypegetRecordType (QualType QT)
 Checks that the passed in QualType either is of RecordType or points to RecordType. More...
 
template<typename AttrType >
static bool checkRecordDeclForAttr (const RecordDecl *RD)
 
static bool checkRecordTypeForCapability (Sema &S, QualType Ty)
 
static bool checkTypedefTypeForCapability (QualType Ty)
 
static bool typeHasCapability (Sema &S, QualType Ty)
 
static bool isCapabilityExpr (Sema &S, const Expr *Ex)
 
static void checkAttrArgsAreCapabilityObjs (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args, unsigned Sidx=0, bool ParamIdxOk=false)
 Checks that all attribute arguments, starting from Sidx, resolve to a capability object. More...
 
static void handlePtGuardedVarAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkGuardedByAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, Expr *&Arg)
 
static void handleGuardedByAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handlePtGuardedByAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkAcquireOrderAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args)
 
static void handleAcquiredAfterAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAcquiredBeforeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkLockFunAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args)
 
static void handleAssertSharedLockAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAssertExclusiveLockAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
template<typename AttrInfo >
static bool checkParamIsIntegerType (Sema &S, const Decl *D, const AttrInfo &AI, unsigned AttrArgNo)
 Checks to be sure that the given parameter number is in bounds, and is an integral type. More...
 
static void handleAllocSizeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkTryLockFunAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args)
 
static void handleSharedTrylockFunctionAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleExclusiveTrylockFunctionAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleLockReturnedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleLocksExcludedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkFunctionConditionAttr (Sema &S, Decl *D, const ParsedAttr &AL, Expr *&Cond, StringRef &Msg)
 
static void handleEnableIfAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleErrorAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleDiagnoseIfAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleNoBuiltinAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handlePassObjectSizeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleConsumableAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkForConsumableClass (Sema &S, const CXXMethodDecl *MD, const ParsedAttr &AL)
 
static void handleCallableWhenAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleParamTypestateAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleReturnTypestateAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSetTypestateAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleTestTypestateAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleExtVectorTypeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handlePackedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handlePreferredName (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkIBOutletCommon (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleIBOutlet (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleIBOutletCollection (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool attrNonNullArgCheck (Sema &S, QualType T, const ParsedAttr &AL, SourceRange AttrParmRange, SourceRange TypeRange, bool isReturnValue=false)
 
static void handleNonNullAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleNonNullAttrParameter (Sema &S, ParmVarDecl *D, const ParsedAttr &AL)
 
static void handleReturnsNonNullAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleNoEscapeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAssumeAlignedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAllocAlignAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void checkAssumptionAttr (Sema &S, SourceLocation Loc, StringRef AssumptionStr)
 Check if AssumptionStr is a known assumption and warn if not. More...
 
static void handleAssumumptionAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool normalizeName (StringRef &AttrName)
 Normalize the attribute, foo becomes foo. More...
 
static void handleOwnershipAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleWeakRefAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleIFuncAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAliasAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleTLSModelAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleRestrictAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleCPUSpecificAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleCommonAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleCmseNSEntryAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleNakedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleNoReturnAttr (Sema &S, Decl *D, const ParsedAttr &Attrs)
 
static void handleNoCfCheckAttr (Sema &S, Decl *D, const ParsedAttr &Attrs)
 
static void handleAnalyzerNoReturnAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleVecReturnAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleDependencyAttr (Sema &S, Scope *Scope, Decl *D, const ParsedAttr &AL)
 
static void handleUnusedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleConstructorAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleDestructorAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
template<typename AttrTy >
static void handleAttrWithMessage (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCSuppresProtocolAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkAvailabilityAttr (Sema &S, SourceRange Range, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted)
 
static bool versionsMatch (const VersionTuple &X, const VersionTuple &Y, bool BeforeIsOkay)
 Check whether the two versions match. More...
 
static void handleAvailabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleExternalSourceSymbolAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
template<class T >
static T * mergeVisibilityAttr (Sema &S, Decl *D, const AttributeCommonInfo &CI, typename T::VisibilityType value)
 
static void handleVisibilityAttr (Sema &S, Decl *D, const ParsedAttr &AL, bool isTypeVisibility)
 
static void handleObjCDirectAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCDirectMembersAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCMethodFamilyAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCNSObject (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCIndependentClass (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleBlocksAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSentinelAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleWarnUnusedResult (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleWeakImportAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
template<typename WorkGroupAttr >
static void handleWorkGroupSize (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSubGroupSize (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleVecTypeHint (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSectionAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkCodeSegName (Sema &S, SourceLocation LiteralLoc, StringRef CodeSegName)
 
static void handleCodeSegAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleTargetAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleMinVectorWidthAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleCleanupAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleEnumExtensibilityAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleFormatArgAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 Handle attribute((format_arg((idx)))) attribute based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html. More...
 
static FormatAttrKind getFormatAttrKind (StringRef Format)
 getFormatAttrKind - Map from format attribute names to supported format types. More...
 
static void handleInitPriorityAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 Handle attribute((init_priority(priority))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html. More...
 
static void handleFormatAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 Handle attribute((format(type,idx,firstarg))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html. More...
 
static void handleCallbackAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes. More...
 
static bool isFunctionLike (const Type &T)
 
static void handleCalledOnceAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 Handle 'called_once' attribute. More...
 
static void handleTransparentUnionAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAnnotateAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAlignValueAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAlignedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void parseModeAttrArg (Sema &S, StringRef Str, unsigned &DestWidth, bool &IntegerMode, bool &ComplexMode, bool &ExplicitIEEE)
 parseModeAttrArg - Parses attribute mode string and returns parsed type attribute. More...
 
static void handleModeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 handleModeAttr - This attribute modifies the width of a decl with primitive type. More...
 
static void handleNoDebugAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAlwaysInlineAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleMinSizeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleOptimizeNoneAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleConstantAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSharedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleGlobalAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleDeviceAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleManagedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleGNUInlineAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleCallConvAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSuppressAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleLifetimeCategoryAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool isValidSwiftContextType (QualType Ty)
 Pointer-like types in the default address space. More...
 
static bool isValidSwiftIndirectResultType (QualType Ty)
 Pointers and references in the default address space. More...
 
static bool isValidSwiftErrorResultType (QualType Ty)
 Pointers and references to pointers in the default address space. More...
 
static ExprmakeLaunchBoundsArgExpr (Sema &S, Expr *E, const CUDALaunchBoundsAttr &AL, const unsigned Idx)
 
static void handleLaunchBoundsAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleArgumentWithTypeTagAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleTypeTagForDatatypeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleXRayLogArgsAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handlePatchableFunctionEntryAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool ArmBuiltinAliasValid (unsigned BuiltinID, StringRef AliasName, ArrayRef< IntrinToName > Map, const char *IntrinNames)
 
static bool ArmMveAliasValid (unsigned BuiltinID, StringRef AliasName)
 
static bool ArmCdeAliasValid (unsigned BuiltinID, StringRef AliasName)
 
static bool ArmSveAliasValid (ASTContext &Context, unsigned BuiltinID, StringRef AliasName)
 
static void handleArmBuiltinAliasAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool RISCVAliasValid (unsigned BuiltinID, StringRef AliasName)
 
static void handleBuiltinAliasAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool isValidSubjectOfNSReturnsRetainedAttribute (QualType QT)
 
static bool isValidSubjectOfNSAttribute (QualType QT)
 
static bool isValidSubjectOfCFAttribute (QualType QT)
 
static bool isValidSubjectOfOSAttribute (QualType QT)
 
static Sema::RetainOwnershipKind parsedAttrToRetainOwnershipKind (const ParsedAttr &AL)
 
static bool isValidOSObjectOutParameter (const Decl *D)
 
static void handleXReturnsXRetainedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCReturnsInnerPointerAttr (Sema &S, Decl *D, const ParsedAttr &Attrs)
 
static void handleObjCRequiresSuperAttr (Sema &S, Decl *D, const ParsedAttr &Attrs)
 
static void handleNSErrorDomain (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCBridgeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCBridgeMutableAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCBridgeRelatedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCDesignatedInitializer (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCRuntimeName (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCBoxable (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCOwnershipAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleObjCPreciseLifetimeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSwiftAttrAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSwiftBridge (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool isErrorParameter (Sema &S, QualType QT)
 
static void handleSwiftError (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void checkSwiftAsyncErrorBlock (Sema &S, Decl *D, const SwiftAsyncErrorAttr *ErrorAttr, const SwiftAsyncAttr *AsyncAttr)
 
static void handleSwiftAsyncError (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool validateSwiftFunctionName (Sema &S, const ParsedAttr &AL, SourceLocation Loc, StringRef Name, unsigned &SwiftParamCount, bool &IsSingleParamInit)
 
static void handleSwiftName (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSwiftAsyncName (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSwiftNewType (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSwiftAsyncAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleUuidAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleMSInheritanceAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleDeclspecThreadAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAbiTagAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleARMInterruptAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleMSP430InterruptAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleMipsInterruptAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleM68kInterruptAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAnyX86InterruptAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAVRInterruptAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAVRSignalAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleBPFPreserveAIRecord (Sema &S, RecordDecl *RD)
 
static void handleBPFPreserveAccessIndexAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool hasBTFTagAttr (Decl *D, StringRef Tag)
 
static void handleBTFTagAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleWebAssemblyExportNameAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleWebAssemblyImportModuleAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleWebAssemblyImportNameAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleRISCVInterruptAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleInterruptAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkAMDGPUFlatWorkGroupSizeArguments (Sema &S, Expr *MinExpr, Expr *MaxExpr, const AMDGPUFlatWorkGroupSizeAttr &Attr)
 
static void handleAMDGPUFlatWorkGroupSizeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool checkAMDGPUWavesPerEUArguments (Sema &S, Expr *MinExpr, Expr *MaxExpr, const AMDGPUWavesPerEUAttr &Attr)
 
static void handleAMDGPUWavesPerEUAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAMDGPUNumSGPRAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAMDGPUNumVGPRAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleX86ForceAlignArgPointerAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleLayoutVersion (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleDLLAttr (Sema &S, Decl *D, const ParsedAttr &A)
 
static void handleCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAssertCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAcquireCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleTryAcquireCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleReleaseCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleRequiresCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleDeprecatedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool isGlobalVar (const Decl *D)
 
static void handleNoSanitizeAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleNoSanitizeSpecificAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleInternalLinkageAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleOpenCLNoSVMAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleOpenCLAccessAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleSYCLKernelAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleDestroyAttr (Sema &S, Decl *D, const ParsedAttr &A)
 
static void handleUninitializedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static bool tryMakeVariablePseudoStrong (Sema &S, VarDecl *VD, bool DiagnoseFailure)
 
static void handleObjCExternallyRetainedAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleMIGServerRoutineAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleMSAllocatorAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleAcquireHandleAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
template<typename Attr >
static void handleHandleAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
static void handleCFGuardAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
template<typename AttrTy >
static const AttrTy * findEnforceTCBAttrByName (Decl *D, StringRef Name)
 
template<typename AttrTy , typename ConflictingAttrTy >
static void handleEnforceTCBAttr (Sema &S, Decl *D, const ParsedAttr &AL)
 
template<typename AttrTy , typename ConflictingAttrTy >
static AttrTy * mergeEnforceTCBAttrImpl (Sema &S, Decl *D, const AttrTy &AL)
 
static void ProcessDeclAttribute (Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, bool IncludeCXX11Attributes)
 ProcessDeclAttribute - Apply the specific attribute to the specified decl if the attribute applies to decls. More...
 
static void checkUnusedDeclAttributes (Sema &S, const ParsedAttributesView &A)
 checkUnusedDeclAttributes - Check a list of attributes to see if it contains any decl attributes that we should warn about. More...
 
static bool isForbiddenTypeAllowed (Sema &S, Decl *D, const DelayedDiagnostic &diag, UnavailableAttr::ImplicitReason &reason)
 Is the given declaration allowed to use a forbidden type? If so, it'll still be annotated with an attribute that makes it illegal to actually use. More...
 
static void handleDelayedForbiddenType (Sema &S, DelayedDiagnostic &DD, Decl *D)
 Handle a delayed forbidden-type diagnostic. More...
 

Enumeration Type Documentation

◆ FormatAttrKind

Enumerator
CFStringFormat 
NSStringFormat 
StrftimeFormat 
SupportedFormat 
IgnoredFormat 
InvalidFormat 

Definition at line 3397 of file SemaDeclAttr.cpp.

Function Documentation

◆ appendDiagnostics() [1/2]

template<typename... DiagnosticArgs>
static const Sema::SemaDiagnosticBuilder& appendDiagnostics ( const Sema::SemaDiagnosticBuilder Bldr)
static

Definition at line 383 of file SemaDeclAttr.cpp.

Referenced by appendDiagnostics().

◆ appendDiagnostics() [2/2]

template<typename T , typename... DiagnosticArgs>
static const Sema::SemaDiagnosticBuilder& appendDiagnostics ( const Sema::SemaDiagnosticBuilder Bldr,
T &&  ExtraArg,
DiagnosticArgs &&...  ExtraArgs 
)
static

Definition at line 389 of file SemaDeclAttr.cpp.

References appendDiagnostics().

◆ ArmBuiltinAliasValid()

static bool ArmBuiltinAliasValid ( unsigned  BuiltinID,
StringRef  AliasName,
ArrayRef< IntrinToName >  Map,
const char *  IntrinNames 
)
static

Definition at line 5266 of file SemaDeclAttr.cpp.

References Id.

Referenced by ArmCdeAliasValid(), and ArmMveAliasValid().

◆ ArmCdeAliasValid()

static bool ArmCdeAliasValid ( unsigned  BuiltinID,
StringRef  AliasName 
)
static

Definition at line 5293 of file SemaDeclAttr.cpp.

References ArmBuiltinAliasValid().

◆ ArmMveAliasValid()

static bool ArmMveAliasValid ( unsigned  BuiltinID,
StringRef  AliasName 
)
static

Definition at line 5285 of file SemaDeclAttr.cpp.

References ArmBuiltinAliasValid().

◆ ArmSveAliasValid()

static bool ArmSveAliasValid ( ASTContext Context,
unsigned  BuiltinID,
StringRef  AliasName 
)
static

◆ attrNonNullArgCheck()

static bool attrNonNullArgCheck ( Sema S,
QualType  T,
const ParsedAttr AL,
SourceRange  AttrParmRange,
SourceRange  TypeRange,
bool  isReturnValue = false 
)
static

Definition at line 1475 of file SemaDeclAttr.cpp.

◆ checkAcquireOrderAttrCommon()

static bool checkAcquireOrderAttrCommon ( Sema S,
Decl D,
const ParsedAttr AL,
SmallVectorImpl< Expr * > &  Args 
)
static

Definition at line 715 of file SemaDeclAttr.cpp.

◆ checkAMDGPUFlatWorkGroupSizeArguments()

static bool checkAMDGPUFlatWorkGroupSizeArguments ( Sema S,
Expr MinExpr,
Expr MaxExpr,
const AMDGPUFlatWorkGroupSizeAttr &  Attr 
)
static

Definition at line 7084 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::addAMDGPUFlatWorkGroupSizeAttr().

◆ checkAMDGPUWavesPerEUArguments()

static bool checkAMDGPUWavesPerEUArguments ( Sema S,
Expr MinExpr,
Expr MaxExpr,
const AMDGPUWavesPerEUAttr &  Attr 
)
static

Definition at line 7133 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::addAMDGPUWavesPerEUAttr().

◆ checkAssumptionAttr()

static void checkAssumptionAttr ( Sema S,
SourceLocation  Loc,
StringRef  AssumptionStr 
)
static

Check if AssumptionStr is a known assumption and warn if not.

Definition at line 1671 of file SemaDeclAttr.cpp.

◆ checkAttrArgsAreCapabilityObjs()

static void checkAttrArgsAreCapabilityObjs ( Sema S,
Decl D,
const ParsedAttr AL,
SmallVectorImpl< Expr * > &  Args,
unsigned  Sidx = 0,
bool  ParamIdxOk = false 
)
static

Checks that all attribute arguments, starting from Sidx, resolve to a capability object.

Parameters
SidxThe attribute argument index to start checking with.
ParamIdxOkWhether an argument can be indexing into a function parameter list.

Definition at line 578 of file SemaDeclAttr.cpp.

◆ checkAttrMutualExclusion() [1/2]

template<typename AttrTy >
static bool checkAttrMutualExclusion ( Sema S,
Decl D,
const Attr AL 
)
static

Definition at line 282 of file SemaDeclAttr.cpp.

◆ checkAttrMutualExclusion() [2/2]

template<typename AttrTy >
static bool checkAttrMutualExclusion ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Diagnose mutually exclusive attributes when present on a given declaration.

Returns true if diagnosed.

Definition at line 272 of file SemaDeclAttr.cpp.

◆ checkAvailabilityAttr()

static bool checkAvailabilityAttr ( Sema S,
SourceRange  Range,
IdentifierInfo Platform,
VersionTuple  Introduced,
VersionTuple  Deprecated,
VersionTuple  Obsoleted 
)
static

Definition at line 2236 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::mergeAvailabilityAttr().

◆ checkCodeSegName()

static bool checkCodeSegName ( Sema S,
SourceLocation  LiteralLoc,
StringRef  CodeSegName 
)
static

Definition at line 3151 of file SemaDeclAttr.cpp.

◆ checkForConsumableClass()

static bool checkForConsumableClass ( Sema S,
const CXXMethodDecl MD,
const ParsedAttr AL 
)
static

Definition at line 1132 of file SemaDeclAttr.cpp.

◆ checkFunctionConditionAttr()

static bool checkFunctionConditionAttr ( Sema S,
Decl D,
const ParsedAttr AL,
Expr *&  Cond,
StringRef &  Msg 
)
static

Definition at line 913 of file SemaDeclAttr.cpp.

◆ checkFunctionOrMethodParameterIndex()

template<typename AttrInfo >
static bool checkFunctionOrMethodParameterIndex ( Sema S,
const Decl D,
const AttrInfo &  AI,
unsigned  AttrArgNum,
const Expr IdxExpr,
ParamIdx Idx,
bool  CanIndexImplicitThis = false 
)
static

Check if IdxExpr is a valid parameter index for a function or instance method D.

May output an error.

Returns
true if IdxExpr is a valid index.

Definition at line 297 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::AddAllocAlignAttr().

◆ checkGuardedByAttrCommon()

static bool checkGuardedByAttrCommon ( Sema S,
Decl D,
const ParsedAttr AL,
Expr *&  Arg 
)
static

Definition at line 682 of file SemaDeclAttr.cpp.

◆ checkIBOutletCommon()

static bool checkIBOutletCommon ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1375 of file SemaDeclAttr.cpp.

◆ checkLockFunAttrCommon()

static bool checkLockFunAttrCommon ( Sema S,
Decl D,
const ParsedAttr AL,
SmallVectorImpl< Expr * > &  Args 
)
static

Definition at line 755 of file SemaDeclAttr.cpp.

◆ checkParamIsIntegerType()

template<typename AttrInfo >
static bool checkParamIsIntegerType ( Sema S,
const Decl D,
const AttrInfo &  AI,
unsigned  AttrArgNo 
)
static

Checks to be sure that the given parameter number is in bounds, and is an integral type.

Will emit appropriate diagnostics if this returns false.

AttrArgNo is used to actually retrieve the argument, so it's base-0.

Definition at line 793 of file SemaDeclAttr.cpp.

◆ checkPositiveIntArgument()

template<typename AttrInfo >
static bool checkPositiveIntArgument ( Sema S,
const AttrInfo &  AI,
const Expr Expr,
int Val,
unsigned  Idx = UINT_MAX 
)
static

Wrapper around checkUInt32Argument, with an extra check to be sure that the result will fit into a regular (signed) int.

All args have the same purpose as they do in checkUInt32Argument.

Definition at line 251 of file SemaDeclAttr.cpp.

◆ checkRecordDeclForAttr()

template<typename AttrType >
static bool checkRecordDeclForAttr ( const RecordDecl RD)
static

Definition at line 493 of file SemaDeclAttr.cpp.

References clang::Decl::hasAttr().

◆ checkRecordTypeForCapability()

static bool checkRecordTypeForCapability ( Sema S,
QualType  Ty 
)
static

Definition at line 508 of file SemaDeclAttr.cpp.

◆ checkSwiftAsyncErrorBlock()

static void checkSwiftAsyncErrorBlock ( Sema S,
Decl D,
const SwiftAsyncErrorAttr *  ErrorAttr,
const SwiftAsyncAttr *  AsyncAttr 
)
static

Definition at line 5948 of file SemaDeclAttr.cpp.

◆ checkTryLockFunAttrCommon()

static bool checkTryLockFunAttrCommon ( Sema S,
Decl D,
const ParsedAttr AL,
SmallVectorImpl< Expr * > &  Args 
)
static

Definition at line 849 of file SemaDeclAttr.cpp.

◆ checkTypedefTypeForCapability()

static bool checkTypedefTypeForCapability ( QualType  Ty)
static

Definition at line 526 of file SemaDeclAttr.cpp.

References clang::Type::getAs(), and clang::Decl::hasAttr().

◆ checkUInt32Argument()

template<typename AttrInfo >
static bool checkUInt32Argument ( Sema S,
const AttrInfo &  AI,
const Expr Expr,
uint32_t &  Val,
unsigned  Idx = UINT_MAX,
bool  StrictlyUnsigned = false 
)
static

If Expr is a valid integer constant, get the value of the integer expression and return success or failure.

May output an error.

Negative argument is implicitly converted to unsigned, unless StrictlyUnsigned is true.

Definition at line 215 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::CheckRegparmAttr().

◆ checkUnusedDeclAttributes()

static void checkUnusedDeclAttributes ( Sema S,
const ParsedAttributesView A 
)
static

checkUnusedDeclAttributes - Check a list of attributes to see if it contains any decl attributes that we should warn about.

Definition at line 8623 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::checkUnusedDeclAttributes().

◆ findEnforceTCBAttrByName()

template<typename AttrTy >
static const AttrTy* findEnforceTCBAttrByName ( Decl D,
StringRef  Name 
)
static

Definition at line 7792 of file SemaDeclAttr.cpp.

◆ getAttrLoc() [1/2]

template<typename AttrInfo >
static std::enable_if_t<std::is_base_of<Attr, AttrInfo>::value, SourceLocation> getAttrLoc ( const AttrInfo &  AL)
static

A helper function to provide Attribute Location for the Attr types AND the ParsedAttr.

Definition at line 204 of file SemaDeclAttr.cpp.

◆ getAttrLoc() [2/2]

static SourceLocation getAttrLoc ( const ParsedAttr AL)
static

Definition at line 207 of file SemaDeclAttr.cpp.

References clang::AttributeCommonInfo::getLoc().

◆ getFormatAttrKind()

static FormatAttrKind getFormatAttrKind ( StringRef  Format)
static

getFormatAttrKind - Map from format attribute names to supported format types.

Definition at line 3408 of file SemaDeclAttr.cpp.

References CFStringFormat, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.

◆ getFunctionOrMethodNumParams()

static unsigned getFunctionOrMethodNumParams ( const Decl D)
static

getFunctionOrMethodNumParams - Return number of function or method parameters.

It is an error to call this on a K&R function (use hasFunctionProto first).

Definition at line 97 of file SemaDeclAttr.cpp.

References clang::Decl::getFunctionType().

◆ getFunctionOrMethodParam()

static const ParmVarDecl* getFunctionOrMethodParam ( const Decl D,
unsigned  Idx 
)
static

Definition at line 105 of file SemaDeclAttr.cpp.

Referenced by getFunctionOrMethodParamRange().

◆ getFunctionOrMethodParamRange()

static SourceRange getFunctionOrMethodParamRange ( const Decl D,
unsigned  Idx 
)
static

Definition at line 125 of file SemaDeclAttr.cpp.

References getFunctionOrMethodParam().

◆ getFunctionOrMethodParamType()

static QualType getFunctionOrMethodParamType ( const Decl D,
unsigned  Idx 
)
static

Definition at line 116 of file SemaDeclAttr.cpp.

References clang::Decl::getFunctionType().

Referenced by clang::Sema::AddAllocAlignAttr().

◆ getFunctionOrMethodResultSourceRange()

static SourceRange getFunctionOrMethodResultSourceRange ( const Decl D)
static

◆ getFunctionOrMethodResultType()

static QualType getFunctionOrMethodResultType ( const Decl D)
static

◆ getNumAttributeArgs()

static unsigned getNumAttributeArgs ( const ParsedAttr AL)
static

◆ getRecordType()

static const RecordType* getRecordType ( QualType  QT)
static

◆ handleAbiTagAttr()

static void handleAbiTagAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6569 of file SemaDeclAttr.cpp.

◆ handleAcquireCapabilityAttr()

static void handleAcquireCapabilityAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7370 of file SemaDeclAttr.cpp.

◆ handleAcquiredAfterAttr()

static void handleAcquiredAfterAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 735 of file SemaDeclAttr.cpp.

◆ handleAcquiredBeforeAttr()

static void handleAcquiredBeforeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 745 of file SemaDeclAttr.cpp.

◆ handleAcquireHandleAttr()

static void handleAcquireHandleAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7746 of file SemaDeclAttr.cpp.

◆ handleAliasAttr()

static void handleAliasAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1892 of file SemaDeclAttr.cpp.

◆ handleAlignedAttr()

static void handleAlignedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3971 of file SemaDeclAttr.cpp.

◆ handleAlignValueAttr()

static void handleAlignValueAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3927 of file SemaDeclAttr.cpp.

◆ handleAllocAlignAttr()

static void handleAllocAlignAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1585 of file SemaDeclAttr.cpp.

◆ handleAllocSizeAttr()

static void handleAllocSizeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 812 of file SemaDeclAttr.cpp.

◆ handleAlwaysInlineAttr()

static void handleAlwaysInlineAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4533 of file SemaDeclAttr.cpp.

◆ handleAMDGPUFlatWorkGroupSizeAttr()

static void handleAMDGPUFlatWorkGroupSizeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7125 of file SemaDeclAttr.cpp.

◆ handleAMDGPUNumSGPRAttr()

static void handleAMDGPUNumSGPRAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7188 of file SemaDeclAttr.cpp.

◆ handleAMDGPUNumVGPRAttr()

static void handleAMDGPUNumVGPRAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7197 of file SemaDeclAttr.cpp.

◆ handleAMDGPUWavesPerEUAttr()

static void handleAMDGPUWavesPerEUAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7178 of file SemaDeclAttr.cpp.

◆ handleAnalyzerNoReturnAttr()

static void handleAnalyzerNoReturnAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2097 of file SemaDeclAttr.cpp.

◆ handleAnnotateAttr()

static void handleAnnotateAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3910 of file SemaDeclAttr.cpp.

◆ handleAnyX86InterruptAttr()

static void handleAnyX86InterruptAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6767 of file SemaDeclAttr.cpp.

◆ handleArgumentWithTypeTagAttr()

static void handleArgumentWithTypeTagAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5167 of file SemaDeclAttr.cpp.

◆ handleArmBuiltinAliasAttr()

static void handleArmBuiltinAliasAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5306 of file SemaDeclAttr.cpp.

◆ handleARMInterruptAttr()

static void handleARMInterruptAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6600 of file SemaDeclAttr.cpp.

◆ handleAssertCapabilityAttr()

static void handleAssertCapabilityAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7361 of file SemaDeclAttr.cpp.

◆ handleAssertExclusiveLockAttr()

static void handleAssertExclusiveLockAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 775 of file SemaDeclAttr.cpp.

◆ handleAssertSharedLockAttr()

static void handleAssertSharedLockAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 764 of file SemaDeclAttr.cpp.

◆ handleAssumeAlignedAttr()

static void handleAssumeAlignedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1579 of file SemaDeclAttr.cpp.

◆ handleAssumumptionAttr()

static void handleAssumumptionAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1694 of file SemaDeclAttr.cpp.

◆ handleAttrWithMessage()

template<typename AttrTy >
static void handleAttrWithMessage ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2216 of file SemaDeclAttr.cpp.

◆ handleAvailabilityAttr()

static void handleAvailabilityAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2457 of file SemaDeclAttr.cpp.

◆ handleAVRInterruptAttr()

static void handleAVRInterruptAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6831 of file SemaDeclAttr.cpp.

◆ handleAVRSignalAttr()

static void handleAVRSignalAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6844 of file SemaDeclAttr.cpp.

◆ handleBlocksAttr()

static void handleBlocksAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2832 of file SemaDeclAttr.cpp.

◆ handleBPFPreserveAccessIndexAttr()

static void handleBPFPreserveAccessIndexAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6869 of file SemaDeclAttr.cpp.

◆ handleBPFPreserveAIRecord()

static void handleBPFPreserveAIRecord ( Sema S,
RecordDecl RD 
)
static

Definition at line 6857 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::ProcessDeclAttributeDelayed().

◆ handleBTFTagAttr()

static void handleBTFTagAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6884 of file SemaDeclAttr.cpp.

◆ handleBuiltinAliasAttr()

static void handleBuiltinAliasAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5333 of file SemaDeclAttr.cpp.

◆ handleCallableWhenAttr()

static void handleCallableWhenAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1147 of file SemaDeclAttr.cpp.

◆ handleCallbackAttr()

static void handleCallbackAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes.

Definition at line 3634 of file SemaDeclAttr.cpp.

◆ handleCallConvAttr()

static void handleCallConvAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4656 of file SemaDeclAttr.cpp.

◆ handleCalledOnceAttr()

static void handleCalledOnceAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Handle 'called_once' attribute.

Definition at line 3780 of file SemaDeclAttr.cpp.

◆ handleCapabilityAttr()

static void handleCapabilityAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7343 of file SemaDeclAttr.cpp.

◆ handleCFGuardAttr()

static void handleCFGuardAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7771 of file SemaDeclAttr.cpp.

◆ handleCleanupAttr()

static void handleCleanupAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3287 of file SemaDeclAttr.cpp.

◆ handleCmseNSEntryAttr()

static void handleCmseNSEntryAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2027 of file SemaDeclAttr.cpp.

◆ handleCodeSegAttr()

static void handleCodeSegAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3181 of file SemaDeclAttr.cpp.

◆ handleCommonAttr()

static void handleCommonAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2017 of file SemaDeclAttr.cpp.

◆ handleConstantAttr()

static void handleConstantAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4549 of file SemaDeclAttr.cpp.

◆ handleConstructorAttr()

static void handleConstructorAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2197 of file SemaDeclAttr.cpp.

◆ handleConsumableAttr()

static void handleConsumableAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1112 of file SemaDeclAttr.cpp.

◆ handleCPUSpecificAttr()

static void handleCPUSpecificAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1967 of file SemaDeclAttr.cpp.

◆ handleDeclspecThreadAttr()

static void handleDeclspecThreadAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6552 of file SemaDeclAttr.cpp.

◆ handleDelayedForbiddenType()

static void handleDelayedForbiddenType ( Sema S,
DelayedDiagnostic DD,
Decl D 
)
static

Handle a delayed forbidden-type diagnostic.

Definition at line 8810 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::PopParsingDeclaration().

◆ handleDependencyAttr()

static void handleDependencyAttr ( Sema S,
Scope Scope,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2171 of file SemaDeclAttr.cpp.

◆ handleDeprecatedAttr()

static void handleDeprecatedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7417 of file SemaDeclAttr.cpp.

◆ handleDestroyAttr()

static void handleDestroyAttr ( Sema S,
Decl D,
const ParsedAttr A 
)
static

Definition at line 7616 of file SemaDeclAttr.cpp.

◆ handleDestructorAttr()

static void handleDestructorAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2206 of file SemaDeclAttr.cpp.

◆ handleDeviceAttr()

static void handleDeviceAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4614 of file SemaDeclAttr.cpp.

◆ handleDiagnoseIfAttr()

static void handleDiagnoseIfAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1004 of file SemaDeclAttr.cpp.

◆ handleDLLAttr()

static void handleDLLAttr ( Sema S,
Decl D,
const ParsedAttr A 
)
static

Definition at line 7276 of file SemaDeclAttr.cpp.

◆ handleEnableIfAttr()

static void handleEnableIfAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 941 of file SemaDeclAttr.cpp.

◆ handleEnforceTCBAttr()

template<typename AttrTy , typename ConflictingAttrTy >
static void handleEnforceTCBAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7802 of file SemaDeclAttr.cpp.

◆ handleEnumExtensibilityAttr()

static void handleEnumExtensibilityAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3342 of file SemaDeclAttr.cpp.

◆ handleErrorAttr()

static void handleErrorAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 950 of file SemaDeclAttr.cpp.

◆ handleExclusiveTrylockFunctionAttr()

static void handleExclusiveTrylockFunctionAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 876 of file SemaDeclAttr.cpp.

◆ handleExternalSourceSymbolAttr()

static void handleExternalSourceSymbolAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2648 of file SemaDeclAttr.cpp.

◆ handleExtVectorTypeAttr()

static void handleExtVectorTypeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1305 of file SemaDeclAttr.cpp.

◆ handleFormatArgAttr()

static void handleFormatArgAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Handle attribute((format_arg((idx)))) attribute based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html.

Definition at line 3364 of file SemaDeclAttr.cpp.

◆ handleFormatAttr()

static void handleFormatAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Handle attribute((format(type,idx,firstarg))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html.

Definition at line 3513 of file SemaDeclAttr.cpp.

◆ handleGlobalAttr()

static void handleGlobalAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4581 of file SemaDeclAttr.cpp.

◆ handleGNUInlineAttr()

static void handleGNUInlineAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4643 of file SemaDeclAttr.cpp.

◆ handleGuardedByAttr()

static void handleGuardedByAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 696 of file SemaDeclAttr.cpp.

◆ handleHandleAttr()

template<typename Attr >
static void handleHandleAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7764 of file SemaDeclAttr.cpp.

◆ handleIBOutlet()

static void handleIBOutlet ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1401 of file SemaDeclAttr.cpp.

◆ handleIBOutletCollection()

static void handleIBOutletCollection ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1408 of file SemaDeclAttr.cpp.

◆ handleIFuncAttr()

static void handleIFuncAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1877 of file SemaDeclAttr.cpp.

◆ handleInitPriorityAttr()

static void handleInitPriorityAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Handle attribute((init_priority(priority))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html.

Definition at line 3429 of file SemaDeclAttr.cpp.

◆ handleInternalLinkageAttr()

static void handleInternalLinkageAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7516 of file SemaDeclAttr.cpp.

◆ handleInterruptAttr()

static void handleInterruptAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7053 of file SemaDeclAttr.cpp.

◆ handleLaunchBoundsAttr()

static void handleLaunchBoundsAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5159 of file SemaDeclAttr.cpp.

◆ handleLayoutVersion()

static void handleLayoutVersion ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7229 of file SemaDeclAttr.cpp.

◆ handleLifetimeCategoryAttr()

static void handleLifetimeCategoryAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4758 of file SemaDeclAttr.cpp.

◆ handleLockReturnedAttr()

static void handleLockReturnedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 886 of file SemaDeclAttr.cpp.

◆ handleLocksExcludedAttr()

static void handleLocksExcludedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 897 of file SemaDeclAttr.cpp.

◆ handleM68kInterruptAttr()

static void handleM68kInterruptAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6734 of file SemaDeclAttr.cpp.

◆ handleManagedAttr()

static void handleManagedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4630 of file SemaDeclAttr.cpp.

◆ handleMIGServerRoutineAttr()

static void handleMIGServerRoutineAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7710 of file SemaDeclAttr.cpp.

◆ handleMinSizeAttr()

static void handleMinSizeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4539 of file SemaDeclAttr.cpp.

◆ handleMinVectorWidthAttr()

static void handleMinVectorWidthAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3270 of file SemaDeclAttr.cpp.

◆ handleMipsInterruptAttr()

static void handleMipsInterruptAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6677 of file SemaDeclAttr.cpp.

◆ handleModeAttr()

static void handleModeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

handleModeAttr - This attribute modifies the width of a decl with primitive type.

Despite what would be logical, the mode attribute is a decl attribute, not a type attribute: 'int ** __attribute((mode(HI))) *G;' tries to make 'G' be HImode, not an intermediate pointer.

Definition at line 4270 of file SemaDeclAttr.cpp.

◆ handleMSAllocatorAttr()

static void handleMSAllocatorAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7732 of file SemaDeclAttr.cpp.

◆ handleMSInheritanceAttr()

static void handleMSInheritanceAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6538 of file SemaDeclAttr.cpp.

◆ handleMSP430InterruptAttr()

static void handleMSP430InterruptAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6625 of file SemaDeclAttr.cpp.

◆ handleNakedAttr()

static void handleNakedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2042 of file SemaDeclAttr.cpp.

◆ handleNoBuiltinAttr()

static void handleNoBuiltinAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1030 of file SemaDeclAttr.cpp.

◆ handleNoCfCheckAttr()

static void handleNoCfCheckAttr ( Sema S,
Decl D,
const ParsedAttr Attrs 
)
static

Definition at line 2069 of file SemaDeclAttr.cpp.

◆ handleNoDebugAttr()

static void handleNoDebugAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4427 of file SemaDeclAttr.cpp.

◆ handleNoEscapeAttr()

static void handleNoEscapeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1564 of file SemaDeclAttr.cpp.

◆ handleNonNullAttr()

static void handleNonNullAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1491 of file SemaDeclAttr.cpp.

◆ handleNonNullAttrParameter()

static void handleNonNullAttrParameter ( Sema S,
ParmVarDecl D,
const ParsedAttr AL 
)
static

Definition at line 1534 of file SemaDeclAttr.cpp.

◆ handleNoReturnAttr()

static void handleNoReturnAttr ( Sema S,
Decl D,
const ParsedAttr Attrs 
)
static

Definition at line 2057 of file SemaDeclAttr.cpp.

◆ handleNoSanitizeAttr()

static void handleNoSanitizeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7458 of file SemaDeclAttr.cpp.

◆ handleNoSanitizeSpecificAttr()

static void handleNoSanitizeSpecificAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7485 of file SemaDeclAttr.cpp.

◆ handleNSErrorDomain()

static void handleNSErrorDomain ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5638 of file SemaDeclAttr.cpp.

◆ handleObjCBoxable()

static void handleObjCBoxable ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5756 of file SemaDeclAttr.cpp.

◆ handleObjCBridgeAttr()

static void handleObjCBridgeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5663 of file SemaDeclAttr.cpp.

◆ handleObjCBridgeMutableAttr()

static void handleObjCBridgeMutableAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5689 of file SemaDeclAttr.cpp.

◆ handleObjCBridgeRelatedAttr()

static void handleObjCBridgeRelatedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5702 of file SemaDeclAttr.cpp.

◆ handleObjCDesignatedInitializer()

static void handleObjCDesignatedInitializer ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5718 of file SemaDeclAttr.cpp.

◆ handleObjCDirectAttr()

static void handleObjCDirectAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2742 of file SemaDeclAttr.cpp.

◆ handleObjCDirectMembersAttr()

static void handleObjCDirectMembersAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2756 of file SemaDeclAttr.cpp.

◆ handleObjCExternallyRetainedAttr()

static void handleObjCExternallyRetainedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7672 of file SemaDeclAttr.cpp.

◆ handleObjCIndependentClass()

static void handleObjCIndependentClass ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2818 of file SemaDeclAttr.cpp.

◆ handleObjCMethodFamilyAttr()

static void handleObjCMethodFamilyAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2765 of file SemaDeclAttr.cpp.

◆ handleObjCNSObject()

static void handleObjCNSObject ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2791 of file SemaDeclAttr.cpp.

◆ handleObjCOwnershipAttr()

static void handleObjCOwnershipAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5778 of file SemaDeclAttr.cpp.

◆ handleObjCPreciseLifetimeAttr()

static void handleObjCPreciseLifetimeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5785 of file SemaDeclAttr.cpp.

◆ handleObjCRequiresSuperAttr()

static void handleObjCRequiresSuperAttr ( Sema S,
Decl D,
const ParsedAttr Attrs 
)
static

Definition at line 5618 of file SemaDeclAttr.cpp.

◆ handleObjCReturnsInnerPointerAttr()

static void handleObjCReturnsInnerPointerAttr ( Sema S,
Decl D,
const ParsedAttr Attrs 
)
static

Definition at line 5592 of file SemaDeclAttr.cpp.

◆ handleObjCRuntimeName()

static void handleObjCRuntimeName ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5744 of file SemaDeclAttr.cpp.

◆ handleObjCSuppresProtocolAttr()

static void handleObjCSuppresProtocolAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2225 of file SemaDeclAttr.cpp.

◆ handleOpenCLAccessAttr()

static void handleOpenCLAccessAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7530 of file SemaDeclAttr.cpp.

◆ handleOpenCLNoSVMAttr()

static void handleOpenCLNoSVMAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7521 of file SemaDeclAttr.cpp.

◆ handleOptimizeNoneAttr()

static void handleOptimizeNoneAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4544 of file SemaDeclAttr.cpp.

◆ handleOwnershipAttr()

static void handleOwnershipAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1717 of file SemaDeclAttr.cpp.

◆ handlePackedAttr()

static void handlePackedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1310 of file SemaDeclAttr.cpp.

◆ handleParamTypestateAttr()

static void handleParamTypestateAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1182 of file SemaDeclAttr.cpp.

◆ handlePassObjectSizeAttr()

static void handlePassObjectSizeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1080 of file SemaDeclAttr.cpp.

◆ handlePatchableFunctionEntryAttr()

static void handlePatchableFunctionEntryAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5239 of file SemaDeclAttr.cpp.

◆ handlePreferredName()

static void handlePreferredName ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1338 of file SemaDeclAttr.cpp.

◆ handlePtGuardedByAttr()

static void handlePtGuardedByAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 704 of file SemaDeclAttr.cpp.

◆ handlePtGuardedVarAttr()

static void handlePtGuardedVarAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 675 of file SemaDeclAttr.cpp.

◆ handleReleaseCapabilityAttr()

static void handleReleaseCapabilityAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7390 of file SemaDeclAttr.cpp.

◆ handleRequiresCapabilityAttr()

static void handleRequiresCapabilityAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7400 of file SemaDeclAttr.cpp.

◆ handleRestrictAttr()

static void handleRestrictAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1956 of file SemaDeclAttr.cpp.

◆ handleReturnsNonNullAttr()

static void handleReturnsNonNullAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1554 of file SemaDeclAttr.cpp.

◆ handleReturnTypestateAttr()

static void handleReturnTypestateAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1216 of file SemaDeclAttr.cpp.

◆ handleRISCVInterruptAttr()

static void handleRISCVInterruptAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6995 of file SemaDeclAttr.cpp.

◆ handleSectionAttr()

static void handleSectionAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3127 of file SemaDeclAttr.cpp.

◆ handleSentinelAttr()

static void handleSentinelAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2849 of file SemaDeclAttr.cpp.

◆ handleSetTypestateAttr()

static void handleSetTypestateAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1261 of file SemaDeclAttr.cpp.

◆ handleSharedAttr()

static void handleSharedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4565 of file SemaDeclAttr.cpp.

◆ handleSharedTrylockFunctionAttr()

static void handleSharedTrylockFunctionAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 866 of file SemaDeclAttr.cpp.

◆ handleSimpleAttribute()

template<typename AttrType >
static void handleSimpleAttribute ( Sema S,
Decl D,
const AttributeCommonInfo CI 
)
static

Applies the given attribute to the Decl without performing any additional semantic checking.

Definition at line 376 of file SemaDeclAttr.cpp.

◆ handleSimpleAttributeOrDiagnose()

template<typename AttrType , typename... DiagnosticArgs>
static void handleSimpleAttributeOrDiagnose ( Sema S,
Decl D,
const AttributeCommonInfo CI,
bool  PassesCheck,
unsigned  DiagID,
DiagnosticArgs &&...  ExtraArgs 
)
static

Add an attribute AttrType to declaration D, provided that PassesCheck is true.

Otherwise, emit diagnostic DiagID, passing in all parameters specified in ExtraArgs.

Definition at line 400 of file SemaDeclAttr.cpp.

◆ handleSubGroupSize()

static void handleSubGroupSize ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3030 of file SemaDeclAttr.cpp.

◆ handleSuppressAttr()

static void handleSuppressAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 4738 of file SemaDeclAttr.cpp.

◆ handleSwiftAsyncAttr()

static void handleSwiftAsyncAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6404 of file SemaDeclAttr.cpp.

◆ handleSwiftAsyncError()

static void handleSwiftAsyncError ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6029 of file SemaDeclAttr.cpp.

◆ handleSwiftAsyncName()

static void handleSwiftAsyncName ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6365 of file SemaDeclAttr.cpp.

◆ handleSwiftAttrAttr()

static void handleSwiftAttrAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5824 of file SemaDeclAttr.cpp.

◆ handleSwiftBridge()

static void handleSwiftBridge ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5834 of file SemaDeclAttr.cpp.

◆ handleSwiftError()

static void handleSwiftError ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5874 of file SemaDeclAttr.cpp.

◆ handleSwiftName()

static void handleSwiftName ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6353 of file SemaDeclAttr.cpp.

◆ handleSwiftNewType()

static void handleSwiftNewType ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6377 of file SemaDeclAttr.cpp.

◆ handleSYCLKernelAttr()

static void handleSYCLKernelAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7577 of file SemaDeclAttr.cpp.

◆ handleTargetAttr()

static void handleTargetAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3259 of file SemaDeclAttr.cpp.

◆ handleTestTypestateAttr()

static void handleTestTypestateAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1283 of file SemaDeclAttr.cpp.

◆ handleTLSModelAttr()

static void handleTLSModelAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1933 of file SemaDeclAttr.cpp.

◆ handleTransparentUnionAttr()

static void handleTransparentUnionAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3792 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::ProcessDeclAttributeDelayed().

◆ handleTryAcquireCapabilityAttr()

static void handleTryAcquireCapabilityAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7380 of file SemaDeclAttr.cpp.

◆ handleTypeTagForDatatypeAttr()

static void handleTypeTagForDatatypeAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5199 of file SemaDeclAttr.cpp.

◆ handleUninitializedAttr()

static void handleUninitializedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7629 of file SemaDeclAttr.cpp.

◆ handleUnusedAttr()

static void handleUnusedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2186 of file SemaDeclAttr.cpp.

◆ handleUuidAttr()

static void handleUuidAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6478 of file SemaDeclAttr.cpp.

◆ handleVecReturnAttr()

static void handleVecReturnAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2117 of file SemaDeclAttr.cpp.

◆ handleVecTypeHint()

static void handleVecTypeHint ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3050 of file SemaDeclAttr.cpp.

◆ handleVisibilityAttr()

static void handleVisibilityAttr ( Sema S,
Decl D,
const ParsedAttr AL,
bool  isTypeVisibility 
)
static

Definition at line 2692 of file SemaDeclAttr.cpp.

◆ handleWarnUnusedResult()

static void handleWarnUnusedResult ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2938 of file SemaDeclAttr.cpp.

◆ handleWeakImportAttr()

static void handleWeakImportAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 2982 of file SemaDeclAttr.cpp.

◆ handleWeakRefAttr()

static void handleWeakRefAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 1819 of file SemaDeclAttr.cpp.

◆ handleWebAssemblyExportNameAttr()

static void handleWebAssemblyExportNameAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6900 of file SemaDeclAttr.cpp.

◆ handleWebAssemblyImportModuleAttr()

static void handleWebAssemblyImportModuleAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6963 of file SemaDeclAttr.cpp.

◆ handleWebAssemblyImportNameAttr()

static void handleWebAssemblyImportNameAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 6980 of file SemaDeclAttr.cpp.

◆ handleWorkGroupSize()

template<typename WorkGroupAttr >
static void handleWorkGroupSize ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 3005 of file SemaDeclAttr.cpp.

◆ handleX86ForceAlignArgPointerAttr()

static void handleX86ForceAlignArgPointerAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 7206 of file SemaDeclAttr.cpp.

◆ handleXRayLogArgsAttr()

static void handleXRayLogArgsAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5226 of file SemaDeclAttr.cpp.

◆ handleXReturnsXRetainedAttr()

static void handleXReturnsXRetainedAttr ( Sema S,
Decl D,
const ParsedAttr AL 
)
static

Definition at line 5461 of file SemaDeclAttr.cpp.

◆ hasBTFTagAttr()

static bool hasBTFTagAttr ( Decl D,
StringRef  Tag 
)
static

Definition at line 6876 of file SemaDeclAttr.cpp.

References clang::Decl::specific_attrs().

Referenced by clang::Sema::mergeBTFTagAttr().

◆ hasDeclarator()

static bool hasDeclarator ( const Decl D)
static

Return true if the given decl has a declarator that should have been processed by Sema::GetTypeForDeclarator.

Definition at line 79 of file SemaDeclAttr.cpp.

◆ hasFunctionProto()

static bool hasFunctionProto ( const Decl D)
static

hasFunctionProto - Return true if the given decl has a argument information.

This decl should have already passed isFunctionOrMethod or isFunctionOrMethodOrBlock.

Definition at line 88 of file SemaDeclAttr.cpp.

References clang::Decl::getFunctionType().

◆ isCapabilityExpr()

static bool isCapabilityExpr ( Sema S,
const Expr Ex 
)
static

Definition at line 548 of file SemaDeclAttr.cpp.

◆ isCFStringType()

static bool isCFStringType ( QualType  T,
ASTContext Ctx 
)
inlinestatic

◆ isErrorParameter()

static bool isErrorParameter ( Sema S,
QualType  QT 
)
static

Definition at line 5852 of file SemaDeclAttr.cpp.

◆ isForbiddenTypeAllowed()

static bool isForbiddenTypeAllowed ( Sema S,
Decl D,
const DelayedDiagnostic diag,
UnavailableAttr::ImplicitReason &  reason 
)
static

Is the given declaration allowed to use a forbidden type? If so, it'll still be annotated with an attribute that makes it illegal to actually use.

Definition at line 8775 of file SemaDeclAttr.cpp.

◆ isFunctionLike()

static bool isFunctionLike ( const Type T)
static

◆ isFunctionOrMethod()

static bool isFunctionOrMethod ( const Decl D)
static

isFunctionOrMethod - Return true if the given decl has function type (function or function-typed variable) or an Objective-C method.

Definition at line 67 of file SemaDeclAttr.cpp.

References clang::Decl::getFunctionType().

Referenced by isFunctionOrMethodOrBlock(), and clang::NamedDecl::printQualifiedName().

◆ isFunctionOrMethodOrBlock()

static bool isFunctionOrMethodOrBlock ( const Decl D)
static

Return true if the given decl has function type (function or function-typed variable) or an Objective-C method or a block.

Definition at line 73 of file SemaDeclAttr.cpp.

References isFunctionOrMethod().

◆ isFunctionOrMethodVariadic()

static bool isFunctionOrMethodVariadic ( const Decl D)
static

Definition at line 145 of file SemaDeclAttr.cpp.

References clang::Decl::getFunctionType().

◆ isGlobalVar()

static bool isGlobalVar ( const Decl D)
static

Definition at line 7452 of file SemaDeclAttr.cpp.

◆ isInstanceMethod()

static bool isInstanceMethod ( const Decl D)
static

Definition at line 153 of file SemaDeclAttr.cpp.

◆ isIntOrBool()

static bool isIntOrBool ( Expr Exp)
static

Check if the passed-in expression is of type int or bool.

Definition at line 413 of file SemaDeclAttr.cpp.

References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().

◆ isNSStringType()

static bool isNSStringType ( QualType  T,
ASTContext Ctx,
bool  AllowNSAttributedString = false 
)
inlinestatic

◆ isValidOSObjectOutParameter()

static bool isValidOSObjectOutParameter ( const Decl D)
static
Returns
whether the parameter is a pointer to OSObject pointer.

Definition at line 5452 of file SemaDeclAttr.cpp.

References clang::Type::getPointeeType(), clang::QualType::isNull(), and isValidSubjectOfOSAttribute().

◆ isValidSubjectOfCFAttribute()

static bool isValidSubjectOfCFAttribute ( QualType  QT)
static

◆ isValidSubjectOfNSAttribute()

static bool isValidSubjectOfNSAttribute ( QualType  QT)
static

◆ isValidSubjectOfNSReturnsRetainedAttribute()

static bool isValidSubjectOfNSReturnsRetainedAttribute ( QualType  QT)
static

◆ isValidSubjectOfOSAttribute()

static bool isValidSubjectOfOSAttribute ( QualType  QT)
static

◆ isValidSwiftContextType()

static bool isValidSwiftContextType ( QualType  Ty)
static

◆ isValidSwiftErrorResultType()

static bool isValidSwiftErrorResultType ( QualType  Ty)
static

◆ isValidSwiftIndirectResultType()

static bool isValidSwiftIndirectResultType ( QualType  Ty)
static

Pointers and references in the default address space.

Definition at line 4987 of file SemaDeclAttr.cpp.

References clang::Default, clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Type::getPointeeType(), and clang::Type::isDependentType().

Referenced by clang::Sema::AddParameterABIAttr().

◆ makeLaunchBoundsArgExpr()

static Expr* makeLaunchBoundsArgExpr ( Sema S,
Expr E,
const CUDALaunchBoundsAttr &  AL,
const unsigned  Idx 
)
static

Definition at line 5105 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::AddLaunchBoundsAttr().

◆ mergeEnforceTCBAttrImpl()

template<typename AttrTy , typename ConflictingAttrTy >
static AttrTy* mergeEnforceTCBAttrImpl ( Sema S,
Decl D,
const AttrTy &  AL 
)
static

Definition at line 7827 of file SemaDeclAttr.cpp.

◆ mergeVisibilityAttr()

template<class T >
static T* mergeVisibilityAttr ( Sema S,
Decl D,
const AttributeCommonInfo CI,
typename T::VisibilityType  value 
)
static

Definition at line 2666 of file SemaDeclAttr.cpp.

◆ normalizeName()

static bool normalizeName ( StringRef &  AttrName)
static

Normalize the attribute, foo becomes foo.

Returns true if normalization was applied.

Definition at line 1708 of file SemaDeclAttr.cpp.

◆ parsedAttrToRetainOwnershipKind()

static Sema::RetainOwnershipKind parsedAttrToRetainOwnershipKind ( const ParsedAttr AL)
static

◆ parseModeAttrArg()

static void parseModeAttrArg ( Sema S,
StringRef  Str,
unsigned DestWidth,
bool IntegerMode,
bool ComplexMode,
bool ExplicitIEEE 
)
static

parseModeAttrArg - Parses attribute mode string and returns parsed type attribute.

Definition at line 4204 of file SemaDeclAttr.cpp.

◆ ProcessDeclAttribute()

static void ProcessDeclAttribute ( Sema S,
Scope scope,
Decl D,
const ParsedAttr AL,
bool  IncludeCXX11Attributes 
)
static

ProcessDeclAttribute - Apply the specific attribute to the specified decl if the attribute applies to decls.

If the attribute is a type attribute, just silently ignore it if a GNU attribute.

Definition at line 7866 of file SemaDeclAttr.cpp.

Referenced by clang::Sema::ProcessAccessDeclAttributeList().

◆ RISCVAliasValid()

static bool RISCVAliasValid ( unsigned  BuiltinID,
StringRef  AliasName 
)
static

◆ threadSafetyCheckIsPointer()

static bool threadSafetyCheckIsPointer ( Sema S,
const Decl D,
const ParsedAttr AL 
)
static

Check if passed in Decl is a pointer type.

Note that this function may produce an error message.

Returns
true if the Decl is a pointer type; false otherwise

Definition at line 457 of file SemaDeclAttr.cpp.

◆ threadSafetyCheckIsSmartPointer()

static bool threadSafetyCheckIsSmartPointer ( Sema S,
const RecordType RT 
)
static

Definition at line 421 of file SemaDeclAttr.cpp.

◆ tryMakeVariablePseudoStrong()

static bool tryMakeVariablePseudoStrong ( Sema S,
VarDecl VD,
bool  DiagnoseFailure 
)
static

Definition at line 7635 of file SemaDeclAttr.cpp.

◆ typeHasCapability()

static bool typeHasCapability ( Sema S,
QualType  Ty 
)
static

Definition at line 538 of file SemaDeclAttr.cpp.

◆ validateSwiftFunctionName()

static bool validateSwiftFunctionName ( Sema S,
const ParsedAttr AL,
SourceLocation  Loc,
StringRef  Name,
unsigned SwiftParamCount,
bool IsSingleParamInit 
)
static

Definition at line 6076 of file SemaDeclAttr.cpp.

◆ versionsMatch()

static bool versionsMatch ( const VersionTuple &  X,
const VersionTuple &  Y,
bool  BeforeIsOkay 
)
static

Check whether the two versions match.

If either version tuple is empty, then they are assumed to match. If BeforeIsOkay is true, then X can be less than or equal to Y.

Definition at line 2279 of file SemaDeclAttr.cpp.

References clang::tooling::X().

Referenced by clang::Sema::mergeAvailabilityAttr().