clang 19.0.0git
|
#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/Cuda.h"
#include "clang/Basic/DarwinSDKInfo.h"
#include "clang/Basic/HLSLRuntime.h"
#include "clang/Basic/LangOptions.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/SemaCUDA.h"
#include "clang/Sema/SemaHLSL.h"
#include "clang/Sema/SemaInternal.h"
#include "clang/Sema/SemaObjC.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Demangle/Demangle.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 <optional>
#include "clang/Basic/arm_mve_builtin_aliases.inc"
#include "clang/Basic/arm_cde_builtin_aliases.inc"
Go to the source code of this file.
Namespaces | |
namespace | AttributeLangSupport |
Enumerations | |
enum | AttributeLangSupport::LANG { AttributeLangSupport::C , AttributeLangSupport::Cpp , AttributeLangSupport::ObjC } |
enum | FormatAttrKind { CFStringFormat , NSStringFormat , StrftimeFormat , SupportedFormat , IgnoredFormat , InvalidFormat } |
enum class | CountedByInvalidPointeeTypeKind { INCOMPLETE , SIZELESS , FUNCTION , FLEXIBLE_ARRAY_MEMBER , VALID } |
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. | |
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. | |
static bool | hasDeclarator (const Decl *D) |
Return true if the given decl has a declarator that should have been processed by Sema::GetTypeForDeclarator. | |
static bool | hasFunctionProto (const Decl *D) |
hasFunctionProto - Return true if the given decl has a argument information. | |
static unsigned | getFunctionOrMethodNumParams (const Decl *D) |
getFunctionOrMethodNumParams - Return number of function or method parameters. | |
static const ParmVarDecl * | getFunctionOrMethodParam (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_v< Attr, AttrInfo >, SourceLocation > | getAttrLoc (const AttrInfo &AL) |
A helper function to provide Attribute Location for the Attr types AND the ParsedAttr. | |
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. | |
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. | |
template<typename AttrTy > | |
static bool | checkAttrMutualExclusion (Sema &S, Decl *D, const ParsedAttr &AL) |
Diagnose mutually exclusive attributes when present on a given declaration. | |
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. | |
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. | |
template<typename... DiagnosticArgs> | |
static const Sema::SemaDiagnosticBuilder & | appendDiagnostics (const Sema::SemaDiagnosticBuilder &Bldr) |
template<typename T , typename... DiagnosticArgs> | |
static const Sema::SemaDiagnosticBuilder & | appendDiagnostics (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. | |
static bool | isIntOrBool (Expr *Exp) |
Check if the passed-in expression is of type int or bool. | |
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. | |
static const RecordType * | getRecordType (QualType QT) |
Checks that the passed in QualType either is of RecordType or points to RecordType. | |
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. | |
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. | |
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 | handleExcludeFromExplicitInstantiationAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleDiagnoseAsBuiltinAttr (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 | checkOMPAssumeAttr (Sema &S, SourceLocation Loc, StringRef AssumptionStr) |
Check if AssumptionStr is a known assumption and warn if not. | |
static void | handleOMPAssumeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | normalizeName (StringRef &AttrName) |
Normalize the attribute, foo becomes foo. | |
static void | handleOwnershipAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleWeakRefAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | markUsedForAliasOrIfunc (Sema &S, Decl *D, const ParsedAttr &AL, StringRef Str) |
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 | handleStandardNoReturnAttr (Sema &S, Decl *D, const ParsedAttr &A) |
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. | |
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 void | handleCodeModelAttr (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 | handleTargetVersionAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleTargetAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleTargetClonesAttr (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. | |
static FormatAttrKind | getFormatAttrKind (StringRef Format) |
getFormatAttrKind - Map from format attribute names to supported format types. | |
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. | |
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. | |
static void | handleCallbackAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes. | |
static bool | isFunctionLike (const Type &T) |
static void | handleCalledOnceAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
Handle 'called_once' attribute. | |
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 bool | validateAlignasAppliedType (Sema &S, Decl *D, const AlignedAttr &Attr, SourceLocation AttrLoc) |
Perform checking of type validity. | |
static void | parseModeAttrArg (Sema &S, StringRef Str, unsigned &DestWidth, bool &IntegerMode, bool &ComplexMode, FloatModeKind &ExplicitType) |
parseModeAttrArg - Parses attribute mode string and returns parsed type attribute. | |
static void | handleModeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
handleModeAttr - This attribute modifies the width of a decl with primitive type. | |
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 void | handleRandomizeLayoutAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleNoRandomizeLayoutAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | isValidSwiftContextType (QualType Ty) |
Pointer-like types in the default address space. | |
static bool | isValidSwiftIndirectResultType (QualType Ty) |
Pointers and references in the default address space. | |
static bool | isValidSwiftErrorResultType (QualType Ty) |
Pointers and references to pointers in the default address space. | |
static CudaArch | getCudaArch (const TargetInfo &TI) |
static Expr * | makeLaunchBoundsArgExpr (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 bool | ArmSmeAliasValid (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 void | handleNullableTypeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handlePreferredTypeAttr (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 &Attr) |
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 | handleHLSLNumThreadsAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | isLegalTypeForHLSLSV_DispatchThreadID (QualType T) |
static void | handleHLSLSV_DispatchThreadIDAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleHLSLPackOffsetAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleHLSLShaderAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleHLSLResourceBindingAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleHLSLParamModifierAttr (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 | handleMSConstexprAttr (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 | hasBTFDeclTagAttr (Decl *D, StringRef Tag) |
static void | handleBTFDeclTagAttr (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 bool | checkAMDGPUMaxNumWorkGroupsArguments (Sema &S, Expr *XExpr, Expr *YExpr, Expr *ZExpr, const AMDGPUMaxNumWorkGroupsAttr &Attr) |
static void | handleAMDGPUMaxNumWorkGroupsAttr (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 bool | isSanitizerAttributeAllowedOnGlobals (StringRef Sanitizer) |
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 | handleZeroCallUsedRegsAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static const RecordDecl * | GetEnclosingNamedOrTopAnonRecord (const FieldDecl *FD) |
static bool | CheckCountedByAttrOnField (Sema &S, FieldDecl *FD, Expr *E, llvm::SmallVectorImpl< TypeCoupledDeclRefInfo > &Decls) |
static void | handleCountedByAttrField (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleFunctionReturnThunksAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleAvailableOnlyInDefaultEvalMethod (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleNoMergeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleNoUniqueAddressAttr (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) |
template<typename Attr > | |
static void | handleUnsafeBufferUsage (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 bool | MustDelayAttributeArguments (const ParsedAttr &AL) |
static bool | checkArmNewAttrMutualExclusion (Sema &S, const ParsedAttr &AL, const FunctionProtoType *FPT, FunctionType::ArmStateValue CurrentState, StringRef StateName) |
static void | handleArmNewAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | ProcessDeclAttribute (Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) |
ProcessDeclAttribute - Apply the specific attribute to the specified decl if the attribute applies to decls. | |
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. | |
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. | |
static void | handleDelayedForbiddenType (Sema &S, DelayedDiagnostic &DD, Decl *D) |
Handle a delayed forbidden-type diagnostic. | |
|
strong |
Enumerator | |
---|---|
INCOMPLETE | |
SIZELESS | |
FUNCTION | |
FLEXIBLE_ARRAY_MEMBER | |
VALID |
Definition at line 8636 of file SemaDeclAttr.cpp.
enum FormatAttrKind |
Enumerator | |
---|---|
CFStringFormat | |
NSStringFormat | |
StrftimeFormat | |
SupportedFormat | |
IgnoredFormat | |
InvalidFormat |
Definition at line 3917 of file SemaDeclAttr.cpp.
|
static |
Definition at line 413 of file SemaDeclAttr.cpp.
Referenced by appendDiagnostics(), and handleSimpleAttributeOrDiagnose().
|
static |
Definition at line 419 of file SemaDeclAttr.cpp.
References appendDiagnostics().
|
static |
Definition at line 5920 of file SemaDeclAttr.cpp.
References Id.
Referenced by ArmCdeAliasValid(), and ArmMveAliasValid().
Definition at line 5947 of file SemaDeclAttr.cpp.
References ArmBuiltinAliasValid().
Referenced by handleArmBuiltinAliasAttr(), and handleBuiltinAliasAttr().
Definition at line 5939 of file SemaDeclAttr.cpp.
References ArmBuiltinAliasValid().
Referenced by handleArmBuiltinAliasAttr(), and handleBuiltinAliasAttr().
|
static |
Definition at line 5960 of file SemaDeclAttr.cpp.
References clang::ASTContext::BuiltinInfo, clang::AArch64::FirstSMEBuiltin, clang::Builtin::Context::getAuxBuiltinID(), clang::Builtin::Context::isAuxBuiltinID(), and clang::AArch64::LastSMEBuiltin.
Referenced by handleArmBuiltinAliasAttr().
|
static |
Definition at line 5952 of file SemaDeclAttr.cpp.
References clang::ASTContext::BuiltinInfo, clang::AArch64::FirstSVEBuiltin, clang::Builtin::Context::getAuxBuiltinID(), clang::Builtin::Context::isAuxBuiltinID(), and clang::AArch64::LastSVEBuiltin.
Referenced by handleArmBuiltinAliasAttr(), and handleBuiltinAliasAttr().
|
static |
Definition at line 1598 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Sema::isValidPointerAttrType(), and clang::T.
Referenced by handleNonNullAttr(), handleNonNullAttrParameter(), and handleReturnsNonNullAttr().
|
static |
Definition at line 745 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Type::isDependentType(), and typeHasCapability().
Referenced by handleAcquiredAfterAttr(), and handleAcquiredBeforeAttr().
|
static |
Definition at line 8033 of file SemaDeclAttr.cpp.
References checkUInt32Argument(), clang::SemaBase::Diag(), clang::Attr::getLocation(), clang::Expr::isValueDependent(), clang::Max, and clang::Min.
Referenced by clang::Sema::CreateAMDGPUFlatWorkGroupSizeAttr().
|
static |
Definition at line 8168 of file SemaDeclAttr.cpp.
References checkUInt32Argument(), clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), and clang::Expr::isValueDependent().
Referenced by clang::Sema::CreateAMDGPUMaxNumWorkGroupsAttr().
|
static |
Definition at line 8088 of file SemaDeclAttr.cpp.
References checkUInt32Argument(), clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Attr::getLocation(), clang::Expr::isValueDependent(), clang::Max, and clang::Min.
Referenced by clang::Sema::CreateAMDGPUWavesPerEUAttr().
|
static |
Definition at line 9144 of file SemaDeclAttr.cpp.
References clang::FunctionType::ARM_In, clang::FunctionType::ARM_InOut, clang::FunctionType::ARM_Out, clang::FunctionType::ARM_Preserves, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::isInvalid(), and clang::ParsedAttr::setInvalid().
Referenced by handleArmNewAttr().
|
static |
Checks that all attribute arguments, starting from Sidx, resolve to a capability object.
Sidx | The attribute argument index to start checking with. |
ParamIdxOk | Whether an argument can be indexing into a function parameter list. |
Definition at line 608 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::DeclContext::getParent(), getRecordType(), clang::Expr::getType(), isCapabilityExpr(), clang::Expr::isTypeDependent(), and typeHasCapability().
Referenced by checkAcquireOrderAttrCommon(), checkGuardedByAttrCommon(), checkLockFunAttrCommon(), checkTryLockFunAttrCommon(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleReleaseCapabilityAttr(), and handleRequiresCapabilityAttr().
|
static |
Definition at line 292 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::Attr::getLocation(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
|
static |
Diagnose mutually exclusive attributes when present on a given declaration.
Returns true if diagnosed.
Definition at line 280 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
|
static |
Definition at line 2436 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::IdentifierInfo::getName(), and Range.
Referenced by clang::Sema::mergeAvailabilityAttr().
|
static |
Definition at line 3428 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::isValidSectionSpecifier(), and toString().
Referenced by handleCodeSegAttr().
|
static |
Definition at line 8644 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::ASTContext::getAsArrayType(), clang::Sema::getASTContext(), clang::DeclaratorDecl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::DeclRefExpr::getDecl(), clang::ArrayType::getElementType(), GetEnclosingNamedOrTopAnonRecord(), clang::Decl::getLocation(), clang::FieldDecl::getParent(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::FieldDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::LangOptionsBase::IncompleteOnly, int, clang::Type::isBooleanType(), clang::Decl::isFlexibleArrayMemberLike(), clang::Type::isFunctionType(), clang::Type::isIncompleteType(), clang::Type::isIntegerType(), clang::Type::isSizelessType(), clang::Type::isStructureTypeWithFlexibleArrayMember(), and clang::TagDecl::isUnion().
Referenced by handleCountedByAttrField().
|
static |
Definition at line 1255 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Type::getAsCXXRecordDecl(), clang::CXXMethodDecl::getFunctionObjectParameterType(), and clang::AttributeCommonInfo::getLoc().
Referenced by handleCallableWhenAttr(), handleSetTypestateAttr(), and handleTestTypestateAttr().
|
static |
Definition at line 943 of file SemaDeclAttr.cpp.
References clang::Sema::checkStringLiteralArgumentAttr(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPotentialConstantExprUnevaluated(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Sema::PerformContextuallyConvertToBool().
Referenced by handleDiagnoseIfAttr(), and handleEnableIfAttr().
|
static |
Check if IdxExpr is a valid parameter index for a function or instance method D.
May output an error.
Definition at line 308 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::SemaBase::Diag(), getAttrLoc(), getFunctionOrMethodNumParams(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), hasFunctionProto(), isFunctionOrMethodOrBlock(), isFunctionOrMethodVariadic(), isInstanceMethod(), clang::Expr::isTypeDependent(), and UINT_MAX.
Referenced by clang::Sema::AddAllocAlignAttr(), checkParamIsIntegerType(), handleArgumentWithTypeTagAttr(), handleFormatArgAttr(), handleNonNullAttr(), handleOwnershipAttr(), handleSwiftAsyncAttr(), and handleXRayLogArgsAttr().
|
static |
Definition at line 712 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleGuardedByAttr(), and handlePtGuardedByAttr().
|
static |
Definition at line 1498 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by handleIBOutlet(), and handleIBOutletCollection().
|
static |
Definition at line 785 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleAcquireCapabilityAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), and handleAssertSharedLockAttr().
|
static |
Check if AssumptionStr
is a known assumption and warn if not.
Definition at line 1794 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), and Loc.
Referenced by handleOMPAssumeAttr().
|
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 823 of file SemaDeclAttr.cpp.
References checkFunctionOrMethodParameterIndex(), clang::SemaBase::Diag(), clang::ParamIdx::getASTIndex(), clang::Stmt::getBeginLoc(), getFunctionOrMethodParamRange(), getFunctionOrMethodParamType(), clang::Type::isCharType(), and clang::Type::isIntegerType().
Referenced by handleAllocSizeAttr().
|
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 259 of file SemaDeclAttr.cpp.
References checkUInt32Argument(), clang::SemaBase::Diag(), clang::Expr::getExprLoc(), and toString().
Referenced by handleAllocSizeAttr().
|
static |
Definition at line 523 of file SemaDeclAttr.cpp.
References clang::Decl::hasAttr().
Definition at line 538 of file SemaDeclAttr.cpp.
References clang::RecordType::getDecl(), getRecordType(), clang::Type::isIncompleteType(), and threadSafetyCheckIsSmartPointer().
Referenced by typeHasCapability().
|
static |
Definition at line 6650 of file SemaDeclAttr.cpp.
References clang::Type::castAs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Type::getAs(), getFunctionOrMethodParam(), clang::SemaObjC::getNSErrorIdent(), clang::ValueDecl::getType(), clang::SemaObjC::isCFError(), clang::Type::isIntegralType(), and clang::Sema::ObjC().
Referenced by handleSwiftAsyncAttr(), and handleSwiftAsyncError().
|
static |
Definition at line 879 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntOrBool, clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), and isIntOrBool().
Referenced by handleExclusiveTrylockFunctionAttr(), handleSharedTrylockFunctionAttr(), and handleTryAcquireCapabilityAttr().
Definition at line 556 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Decl::hasAttr().
Referenced by typeHasCapability().
|
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 223 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::SemaBase::Diag(), getAttrLoc(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::Expr::isTypeDependent(), toString(), and UINT_MAX.
Referenced by checkAMDGPUFlatWorkGroupSizeArguments(), checkAMDGPUMaxNumWorkGroupsArguments(), checkAMDGPUWavesPerEUArguments(), checkPositiveIntArgument(), clang::Sema::CheckRegparmAttr(), handleAMDGPUNumSGPRAttr(), handleAMDGPUNumVGPRAttr(), handleCallbackAttr(), handleConstructorAttr(), handleDestructorAttr(), handleDiagnoseAsBuiltinAttr(), handleFormatAttr(), handleHLSLNumThreadsAttr(), handleHLSLPackOffsetAttr(), handleInitPriorityAttr(), handleLayoutVersion(), handleMinVectorWidthAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handleSubGroupSize(), handleSwiftAsyncError(), and handleWorkGroupSize().
|
static |
checkUnusedDeclAttributes - Check a list of attributes to see if it contains any decl attributes that we should warn about.
Definition at line 10165 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::IgnoredAttribute, and clang::AttributeCommonInfo::UnknownAttribute.
|
static |
Definition at line 9042 of file SemaDeclAttr.cpp.
References clang::Decl::specific_attrs().
|
static |
A helper function to provide Attribute Location for the Attr types AND the ParsedAttr.
Definition at line 212 of file SemaDeclAttr.cpp.
Referenced by checkFunctionOrMethodParameterIndex(), checkUInt32Argument(), and handlePatchableFunctionEntryAttr().
|
static |
Definition at line 215 of file SemaDeclAttr.cpp.
References clang::AttributeCommonInfo::getLoc().
|
static |
Definition at line 5724 of file SemaDeclAttr.cpp.
References clang::TargetInfo::getTargetOpts(), clang::TargetInfo::getTriple(), and clang::StringToCudaArch().
|
static |
Definition at line 8620 of file SemaDeclAttr.cpp.
References clang::FieldDecl::getParent(), and Parent.
Referenced by CheckCountedByAttrOnField().
|
static |
getFormatAttrKind - Map from format attribute names to supported format types.
Definition at line 3928 of file SemaDeclAttr.cpp.
References CFStringFormat, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.
Referenced by handleFormatAttr().
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 105 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), handleCallbackAttr(), handleFormatAttr(), handleMipsInterruptAttr(), handleMSP430InterruptAttr(), handleNonNullAttr(), handleObjCExternallyRetainedAttr(), handleRISCVInterruptAttr(), handleSwiftError(), and handleSYCLKernelAttr().
|
static |
Definition at line 113 of file SemaDeclAttr.cpp.
Referenced by checkSwiftAsyncErrorBlock(), getFunctionOrMethodParamRange(), handleObjCExternallyRetainedAttr(), and handleSwiftAsyncAttr().
|
static |
Definition at line 133 of file SemaDeclAttr.cpp.
References getFunctionOrMethodParam().
Referenced by checkParamIsIntegerType(), handleAnyX86InterruptAttr(), handleFormatArgAttr(), handleFormatAttr(), and handleNonNullAttr().
Definition at line 124 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by clang::Sema::AddAllocAlignAttr(), checkParamIsIntegerType(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), handleCallbackAttr(), handleFormatArgAttr(), handleFormatAttr(), handleNonNullAttr(), handleOwnershipAttr(), and handleSwiftError().
|
static |
Definition at line 145 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), handleAnyX86InterruptAttr(), handleRestrictAttr(), and handleReturnsNonNullAttr().
Definition at line 139 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), handleAllocSizeAttr(), handleAnyX86InterruptAttr(), handleFormatArgAttr(), handleMIGServerRoutineAttr(), handleMipsInterruptAttr(), handleMSP430InterruptAttr(), handleRestrictAttr(), handleReturnsNonNullAttr(), handleRISCVInterruptAttr(), handleSwiftError(), and handleSYCLKernelAttr().
|
static |
Definition at line 203 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::hasParsedType().
|
static |
Checks that the passed in QualType either is of RecordType or points to RecordType.
Returns the relevant RecordType, null if it does not exit.
Definition at line 511 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Type::getPointeeType().
Referenced by checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), and clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
|
static |
Definition at line 7516 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8390 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 765 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 775 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8991 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), and clang::ParsedAttr::isUsedAsTypeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2051 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::CUDA_100, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::TargetInfo::getSDKVersion(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::FunctionDecl::isThisDeclarationADefinition(), markUsedForAliasOrIfunc(), clang::ToCudaVersion(), and clang::UNKNOWN.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4454 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignedAttr(), clang::Decl::addAttr(), clang::Expr::containsUnexpandedParameterPack(), clang::Type::containsUnexpandedParameterPack(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ParsedAttr::getArgAsExpr(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::TypeLoc::getBeginLoc(), clang::ParsedAttr::getEllipsisLoc(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::TypeSourceInfo::getType(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::ParsedAttr::hasParsedType(), clang::ParsedAttr::isPackExpansion(), and clang::Sema::UPPC_Expression.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4410 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignValueAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1708 of file SemaDeclAttr.cpp.
References clang::Sema::AddAllocAlignAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 842 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), checkParamIsIntegerType(), checkPositiveIntArgument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), hasFunctionProto(), isFunctionOrMethod(), and clang::Type::isPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5096 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::AttributeCommonInfo::getAttrName(), and clang::Sema::mergeAlwaysInlineAttr().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 8080 of file SemaDeclAttr.cpp.
References clang::Sema::addAMDGPUFlatWorkGroupSizeAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8219 of file SemaDeclAttr.cpp.
References clang::Sema::addAMDGPUMaxNumWorkGroupsAttr(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8149 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8158 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8139 of file SemaDeclAttr.cpp.
References clang::Sema::addAMDGPUWavesPerEUAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2292 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionMethodOrBlock, clang::AttributeCommonInfo::getLoc(), clang::ValueDecl::getType(), clang::Type::isBlockPointerType(), isFunctionOrMethodOrBlock(), clang::Type::isFunctionPointerType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::AttributeCommonInfo::isStandardAttributeSyntax().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4393 of file SemaDeclAttr.cpp.
References clang::Sema::AddAnnotationAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7714 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionWithProtoType, clang::SourceRange::getBegin(), clang::Decl::getBeginLoc(), getFunctionOrMethodNumParams(), getFunctionOrMethodParamRange(), getFunctionOrMethodParamType(), getFunctionOrMethodResultSourceRange(), getFunctionOrMethodResultType(), clang::ASTContext::getIntTypeForBitwidth(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ASTContext::getTypeSize(), hasFunctionProto(), isFunctionOrMethod(), isInstanceMethod(), clang::Type::isPointerType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::CXXMethodDecl::isStaticOverloadedOperator().
Referenced by handleInterruptAttr().
|
static |
Definition at line 5821 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::ParamIdx::getASTIndex(), clang::AttributeCommonInfo::getAttrName(), getFunctionOrMethodNumParams(), getFunctionOrMethodParamType(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5968 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), ArmCdeAliasValid(), ArmMveAliasValid(), ArmSmeAliasValid(), ArmSveAliasValid(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierInfo::getBuiltinID(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7547 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by handleInterruptAttr().
|
static |
Definition at line 9167 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::FunctionType::ARM_None, checkArmNewAttrMutualExclusion(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::FunctionType::getArmZAState(), clang::FunctionType::getArmZT0State(), clang::Decl::getAttr(), clang::Decl::getFunctionType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8381 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 805 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 794 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1702 of file SemaDeclAttr.cpp.
References clang::Sema::AddAssumeAlignedAttr(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2416 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::ParsedAttr::getNumArgs().
|
static |
Definition at line 2657 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::AMK_None, clang::Sema::AP_Explicit, clang::Sema::AP_InferredFromOtherPlatform, clang::Sema::AP_PragmaClangAttribute, clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::IdentifierTable::get(), clang::ParsedAttr::getArgAsIdent(), clang::ParsedAttr::getAvailabilityDeprecated(), clang::ParsedAttr::getAvailabilityIntroduced(), clang::ParsedAttr::getAvailabilityObsoleted(), clang::SourceRange::getBegin(), clang::Sema::getDarwinSDKInfoForAvailabilityChecking(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getMessageExpr(), clang::IdentifierInfo::getName(), clang::AttributeCommonInfo::getRange(), clang::ParsedAttr::getReplacementExpr(), clang::ParsedAttr::getStrictLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ParsedAttr::getUnavailableLoc(), clang::DarwinSDKInfo::getVersionMapping(), clang::IdentifierLoc::Ident, clang::ASTContext::Idents, clang::DarwinSDKInfo::OSEnvPair::iOStoTvOSPair(), clang::DarwinSDKInfo::OSEnvPair::iOStoWatchOSPair(), clang::ParsedAttr::isPragmaClangAttribute(), clang::IdentifierInfo::isStr(), clang::SourceLocation::isValid(), clang::AvailabilityChange::isValid(), clang::IdentifierLoc::Loc, clang::DarwinSDKInfo::OSEnvPair::macOStoMacCatalystPair(), clang::Sema::mergeAvailabilityAttr(), clang::Min, V, and clang::AvailabilityChange::Version.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8802 of file SemaDeclAttr.cpp.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7779 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkExactlyNumArgs(), clang::SemaBase::Diag(), clang::ExpectedFunction, clang::Decl::getLocation(), isFunctionOrMethod(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by handleInterruptAttr().
|
static |
Definition at line 7792 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkExactlyNumArgs(), clang::SemaBase::Diag(), clang::ExpectedFunction, clang::Decl::getLocation(), isFunctionOrMethod(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3084 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::ast_matchers::type.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7817 of file SemaDeclAttr.cpp.
References clang::Sema::Context, and handleBPFPreserveAIRecord().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7805 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::DeclContext::decls(), and handleBPFPreserveAIRecord().
Referenced by handleBPFPreserveAccessIndexAttr(), handleBPFPreserveAIRecord(), and clang::Sema::ProcessDeclAttributeDelayed().
|
static |
Definition at line 7832 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and hasBTFDeclTagAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5996 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), ArmCdeAliasValid(), ArmMveAliasValid(), ArmSveAliasValid(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierInfo::getBuiltinID(), clang::ASTContext::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and RISCVAliasValid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1270 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkForConsumableClass(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::IdentifierLoc::Loc, and Loc.
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes.
Definition at line 4155 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAsFunction(), getFunctionOrMethodNumParams(), getFunctionOrMethodParamType(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), clang::Type::getPointeeType(), clang::AttributeCommonInfo::getRange(), clang::Stmt::getSourceRange(), clang::QualType::getTypePtr(), clang::Type::getUnqualifiedDesugaredType(), clang::Decl::hasAttr(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgExpr(), clang::ParsedAttr::isArgIdent(), clang::Type::isFunctionPointerType(), isInstanceMethod(), clang::IdentifierLoc::Loc, and clang::FunctionDecl::parameters().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5222 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::Sema::CheckCallingConvAttr(), clang::Sema::Context, clang::Sema::CUDA(), clang::SemaBase::Diag(), clang::ExpectedFunctionOrMethod, clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), hasDeclarator(), clang::SemaCUDA::IdentifyTarget(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Handle 'called_once' attribute.
Definition at line 4301 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), isFunctionLike(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8363 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::ParsedAttr::getKind().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 9021 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3777 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckFunctionCall(), clang::Sema::Compatible, clang::Sema::Context, clang::UnaryOperator::Create(), clang::DeclRefExpr::Create(), clang::CallExpr::Create(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::DeclRefExpr::getNameInfo(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getPointerType(), clang::ValueDecl::getType(), clang::DeclRefExpr::hasQualifier(), Loc, clang::Sema::NoteAllOverloadCandidates(), clang::OK_Ordinary, clang::ASTContext::OverloadTy, clang::Sema::ResolveSingleFunctionTemplateSpecialization(), clang::VK_LValue, clang::VK_PRValue, and clang::ASTContext::VoidTy.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2196 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), clang::NamedDecl::isExternallyVisible(), clang::DeclContext::isExternCContext(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3410 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::SemaBase::Diag().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3458 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkCodeSegName(), clang::Sema::checkStringLiteralArgumentAttr(), clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::mergeCodeSegAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2186 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, AttributeLangSupport::Cpp, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5112 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2393 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1235 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8765 of file SemaDeclAttr.cpp.
References clang::Sema::BuildCountAttributedArrayOrPointerType(), CheckCountedByAttrOnField(), clang::ParsedAttr::getArgAsExpr(), clang::ValueDecl::getType(), and clang::ValueDecl::setType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2114 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAttr(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), getNumAttributeArgs(), clang::AttributeCommonInfo::getParsedKind(), clang::ASTContext::getTargetInfo(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::IdentifierLoc::Loc, clang::Other, clang::FunctionDecl::setIsMultiVersion(), and clang::TargetInfo::validateCPUSpecificCPUDispatch().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7477 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::isTLSSupported(), and clang::TSCS_unspecified.
Referenced by ProcessDeclAttribute().
|
static |
Handle a delayed forbidden-type diagnostic.
Definition at line 10380 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::sema::DelayedDiagnostic::getForbiddenTypeArgument(), clang::sema::DelayedDiagnostic::getForbiddenTypeDiagnostic(), clang::sema::DelayedDiagnostic::getForbiddenTypeOperand(), clang::Sema::getLangOpts(), clang::Decl::hasAttr(), isForbiddenTypeAllowed(), clang::sema::DelayedDiagnostic::Loc, and clang::sema::DelayedDiagnostic::Triggered.
Referenced by clang::Sema::PopParsingDeclaration().
|
static |
Definition at line 2367 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Scope::FunctionDeclarationScope, clang::Scope::getFlags(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8437 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtMostNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::SourceRange::getBegin(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::isa(), clang::ParsedAttr::isArgExpr(), clang::AttributeCommonInfo::isCXX11Attribute(), clang::AttributeCommonInfo::isDeclspecAttribute(), clang::AttributeCommonInfo::isGNUScope(), and clang::AttributeCommonInfo::isStandardAttributeSyntax().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8861 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::ParsedAttr::getKind(), and clang::Decl::getLocation().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2406 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5180 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1049 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentBuiltinFunction, clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArg(), clang::ParsedAttr::getArgAsExpr(), clang::Stmt::getBeginLoc(), clang::FunctionDecl::getBuiltinID(), clang::QualType::getCanonicalType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ParsedAttr::isArgExpr(), Loc, clang::T, and clang::Union.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1127 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Stmt::getBeginLoc(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8296 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), clang::FunctionDecl::isInlined(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeDLLImportAttr(), and clang::TargetInfo::shouldDLLImportComdatSymbols().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 971 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Sema::Context, clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 9052 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::AttributeCommonInfo::getAttrName(), clang::AttributeCommonInfo::getLoc(), and clang::IdentifierInfo::getName().
|
static |
Definition at line 3856 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 980 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::mergeErrorAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 988 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), and clang::DeclContext::getRedeclContext().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 906 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2899 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), clang::Sema::Context, clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getArgAsIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1428 of file SemaDeclAttr.cpp.
References clang::Sema::ExtVectorDecls, and clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::push_back().
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((format_arg((idx)))) attribute based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html.
Definition at line 3878 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Type::castAs(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), clang::ParamIdx::getASTIndex(), getFunctionOrMethodParamRange(), getFunctionOrMethodParamType(), getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getObjCInstanceTypeDecl(), clang::ASTContext::getObjCObjectPointerType(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::TypeDecl::getTypeForDecl(), clang::Interface, isCFStringType(), clang::Type::isCharType(), isNSStringType(), and clang::Type::isPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((format(type,idx,firstarg))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html.
Definition at line 4040 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Type::castAs(), checkUInt32Argument(), clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::IdentifierTable::get(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), getFormatAttrKind(), getFunctionOrMethodNumParams(), getFunctionOrMethodParamRange(), getFunctionOrMethodParamType(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::IdentifierLoc::Ident, clang::ASTContext::Idents, IgnoredFormat, InvalidFormat, clang::ParsedAttr::isArgIdent(), isCFStringType(), clang::Type::isCharType(), isFunctionOrMethodVariadic(), isInstanceMethod(), isNSStringType(), clang::Type::isPointerType(), clang::Sema::mergeFormatAttr(), normalizeName(), and StrftimeFormat.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8782 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), and clang::Decl::dropAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5144 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::DeclaratorDecl::getBeginLoc(), clang::ParsedAttr::getKind(), clang::Sema::getLangOpts(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::FunctionDecl::isInlineSpecified(), clang::Type::isInstantiationDependentType(), clang::SourceRange::isValid(), clang::Type::isVoidType(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5209 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Sema::LangOpts, and clang::SC_Extern.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 726 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 9009 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
|
static |
Definition at line 7237 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Expr::getExprLoc(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::Sema::HLSL(), clang::SemaHLSL::mergeNumThreadsAttr(), and X.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7313 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), clang::Sema::getASTContext(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTypeAlign(), clang::ASTContext::getTypeSize(), clang::Type::isArrayType(), clang::Type::isStructureType(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7454 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::getSemanticSpelling(), clang::Sema::HLSL(), and clang::SemaHLSL::mergeParamModifierAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7382 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Sema::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParsedAttr::isArgIdent(), and Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7362 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Sema::HLSL(), and clang::SemaHLSL::mergeShaderAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7293 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and isLegalTypeForHLSLSV_DispatchThreadID().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1524 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkIBOutletCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1531 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkIBOutletCommon(), clang::Sema::Context, clang::SemaBase::Diag(), clang::IdentifierTable::get(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::DeclContext::getParent(), clang::Sema::getScopeForContext(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::Sema::getTypeName(), clang::ParsedAttr::hasParsedType(), clang::ASTContext::Idents, clang::Type::isBuiltinType(), clang::Type::isObjCIdType(), and clang::Type::isObjCObjectType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2035 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::FunctionDecl::isThisDeclarationADefinition(), and markUsedForAliasOrIfunc().
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((init_priority(priority))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html.
Definition at line 3949 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getBaseElementType(), clang::Sema::getCurFunctionOrMethodDecl(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::Sema::getSourceManager(), clang::Stmt::getSourceRange(), clang::SourceManager::isInSystemHeader(), clang::ParsedAttr::setInvalid(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8541 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Internal, and clang::Sema::mergeInternalLinkageAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8002 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), handleAnyX86InterruptAttr(), handleARMInterruptAttr(), handleAVRInterruptAttr(), handleM68kInterruptAttr(), handleMipsInterruptAttr(), handleMSP430InterruptAttr(), and handleRISCVInterruptAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5812 of file SemaDeclAttr.cpp.
References clang::Sema::AddLaunchBoundsAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8249 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), and clang::LangOptionsBase::MSVC2015.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5342 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::Decl::getCanonicalDecl(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::QualType::getTypePtrOrNull(), clang::ParsedAttr::hasParsedType(), clang::Type::isArrayType(), clang::Type::isReferenceType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::Decl::redecls().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 916 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 927 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7681 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Expr::getIntegerConstantExpr(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), and clang::ParsedAttr::isArgExpr().
Referenced by handleInterruptAttr().
|
static |
Definition at line 5196 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8955 of file SemaDeclAttr.cpp.
References clang::FunctionProtoType::desugar(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::Sema::getASTContext(), clang::Decl::getBeginLoc(), getFunctionOrMethodResultType(), clang::ASTContext::IntTy, and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5102 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeMinSizeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3760 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7624 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionOrMethod, getFunctionOrMethodNumParams(), getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), hasFunctionProto(), isFunctionOrMethod(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by handleInterruptAttr().
|
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 4827 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Sema::AddModeAttr(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8977 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::FunctionDecl::getReturnType(), clang::Type::isPointerType(), and clang::Type::isReferenceType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7494 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::LangOptions::isCompatibleWithMSVC(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexprSpecified(), and clang::LangOptionsBase::MSVC2022_3.
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 7463 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ASTConsumer::AssignInheritanceModel(), AttributeLangSupport::C, clang::Sema::Consumer, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getSemanticSpelling(), clang::Sema::LangOpts, and clang::Sema::mergeMSInheritanceAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7572 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionOrMethod, clang::ParsedAttr::getArgAsExpr(), getFunctionOrMethodNumParams(), getFunctionOrMethodResultType(), clang::Expr::getIntegerConstantExpr(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), hasFunctionProto(), int, clang::ParsedAttr::isArgExpr(), isFunctionOrMethod(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by handleInterruptAttr().
|
static |
Definition at line 2211 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::AttributeCommonInfo::isDeclspecAttribute(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1153 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), clang::Decl::hasAttr(), and clang::Builtin::Context::isBuiltinFunc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2262 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4986 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1687 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::Decl::isInvalidDecl(), clang::Sema::isValidPointerAttrType(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8808 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 1614 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParamIdx::getASTIndex(), getFunctionOrMethodNumParams(), getFunctionOrMethodParamRange(), getFunctionOrMethodParamType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::Stmt::getSourceRange(), clang::Sema::inTemplateInstantiation(), clang::Type::isDependentType(), clang::SourceLocation::isFileID(), isFunctionOrMethodVariadic(), clang::Sema::isValidPointerAttrType(), and clang::T.
Referenced by handleNonNullAttrParameter(), and ProcessDeclAttribute().
|
static |
Definition at line 1657 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getFunctionType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), and handleNonNullAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5416 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2234 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeCommonInfo::getLoc(), hasDeclarator(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8483 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), isGlobalVar(), isSanitizerAttributeAllowedOnGlobals(), and clang::parseSanitizerValue().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8510 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunction, clang::AttributeCommonInfo::getAttrName(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), isGlobalVar(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::AttributeCommonInfo::isStandardAttributeSyntax(), normalizeName(), and clang::AttributeCommonInfo::setAttributeSpellingListIndex().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8818 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6332 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, clang::IdentifierLoc::Loc, Loc, clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::Result, and clang::Sema::TUScope.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6024 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::AttributeCommonInfo::getRange(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::ParsedAttr::isUsedAsTypeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6456 of file SemaDeclAttr.cpp.
References clang::Sema::Context, and clang::Sema::getASTMutationListener().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6363 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::IdentifierInfo::isStr(), clang::Type::isVoidPointerType(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6389 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getBeginLoc(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6402 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getBeginLoc(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6418 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), and clang::ObjCInterfaceDecl::setHasDesignatedInitializers().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2994 of file SemaDeclAttr.cpp.
References clang::ObjCRuntime::allowsDirectDispatch(), clang::SemaBase::Diag(), clang::Decl::getDeclContext(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::LangOptions::ObjCRuntime.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3008 of file SemaDeclAttr.cpp.
References clang::ObjCRuntime::allowsDirectDispatch(), clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::LangOptions::ObjCRuntime.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8917 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Decl::getBeginLoc(), getFunctionOrMethodNumParams(), getFunctionOrMethodParam(), clang::QualType::getLocalUnqualifiedType(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), hasFunctionProto(), clang::Qualifiers::OCL_Strong, and tryMakeVariablePseudoStrong().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3070 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::Type::isObjCObjectPointerType(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3017 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3043 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::Type::isCARCBridgableType(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6478 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::ExpectedVariable, clang::Decl::getBeginLoc(), clang::AttributeCommonInfo::getRange(), hasDeclarator(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6487 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Type::getObjCARCImplicitLifetime(), clang::QualType::getObjCLifetime(), clang::Type::isDependentType(), clang::Type::isObjCLifetimeType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6312 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getBeginLoc(), and clang::OMF_dealloc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6286 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::Type::isObjCRetainableType(), clang::Type::isPointerType(), and clang::Type::isReferenceType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6444 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2425 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1818 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkOMPAssumeAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8555 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getAttrName(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::LangOptions::getOpenCLCompatibleVersion(), clang::Sema::getOpenCLOptions(), clang::AttributeCommonInfo::getRange(), clang::ParsedAttr::getSemanticSpelling(), clang::Decl::getSourceRange(), clang::Decl::hasAttr(), clang::Decl::isInvalidDecl(), clang::OpenCLOptions::isSupported(), and clang::Decl::setInvalidDecl().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8546 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::LangOptions::getOpenCLCompatibleVersion(), clang::LangOptions::getOpenCLVersionString(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5107 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeOptimizeNoneAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1841 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::SemaBase::Diag(), clang::IdentifierTable::get(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::ParamIdx::getASTIndex(), getFunctionOrMethodParamType(), clang::Preprocessor::getIdentifierTable(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParamIdx::getSourceIndex(), clang::Stmt::getSourceRange(), clang::IdentifierLoc::Ident, clang::Type::isAnyPointerType(), clang::ParsedAttr::isArgIdent(), clang::Type::isBlockPointerType(), clang::Type::isIntegerType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), normalizeName(), clang::Sema::PP, clang::Decl::specific_attrs(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1433 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlign(), clang::Type::isDependentType(), and clang::Type::isIncompleteType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1305 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1203 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5893 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), getAttrLoc(), clang::Stmt::getBeginLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1461 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::declaresSameEntity(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::Type::isTypedefNameType(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6038 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::TypeLoc::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::ParsedAttr::hasParsedType(), and clang::Sema::RequireCompleteType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 734 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 705 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5409 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8410 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8420 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2103 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), getFunctionOrMethodResultSourceRange(), getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::Type::isAnyPointerType(), and clang::Type::isBlockPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1677 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, getFunctionOrMethodResultSourceRange(), and getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1339 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7944 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtMostNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunction, clang::Decl::getAttr(), clang::SourceRange::getBegin(), getFunctionOrMethodNumParams(), getFunctionOrMethodResultType(), clang::Decl::getFunctionType(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), clang::AttributeCommonInfo::getRange(), hasFunctionProto(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by handleInterruptAttr().
|
static |
Definition at line 3388 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkSectionName(), clang::Sema::checkStringLiteralArgumentAttr(), clang::isa(), clang::Sema::mergeSectionAttr(), clang::ASTContext::PSF_Execute, clang::ASTContext::PSF_Read, and clang::Sema::UnifySection().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3101 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::Type::castAs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionMethodOrBlock, clang::ParsedAttr::getArgAsExpr(), clang::Decl::getFunctionType(), clang::Expr::getIntegerConstantExpr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::Expr::isTypeDependent(), and V.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1384 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkForConsumableClass(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5128 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::CUDA(), clang::SemaCUDA::CurrentTarget(), clang::SemaBase::Diag(), clang::SemaCUDA::DiagIfHostCode(), clang::Sema::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 896 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Applies the given attribute to the Decl without performing any additional semantic checking.
Definition at line 406 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
|
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 430 of file SemaDeclAttr.cpp.
References appendDiagnostics(), clang::SemaBase::Diag(), and clang::Decl::getBeginLoc().
|
static |
Definition at line 2247 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::ParsedAttr::getSemanticSpelling(), clang::Sema::getSourceManager(), clang::SourceManager::isInSystemMacro(), and clang::SourceLocation::isMacroID().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3291 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Stmt::getSourceRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5321 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::AttributeCommonInfo::getAttributeSpellingListIndex(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 7103 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Type::castAs(), clang::ParsedAttr::checkExactlyNumArgs(), checkFunctionOrMethodParameterIndex(), checkSwiftAsyncErrorBlock(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::ParamIdx::getASTIndex(), clang::Decl::getAttr(), getFunctionOrMethodParam(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::Type::isBlockPointerType(), and clang::Type::isVoidType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6731 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), checkSwiftAsyncErrorBlock(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), and clang::IdentifierLoc::Ident.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7064 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::DiagnoseSwiftName(), and Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6526 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6536 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Other.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6576 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), getFunctionOrMethodNumParams(), getFunctionOrMethodParamType(), getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::Type::hasPointerRepresentation(), clang::IdentifierLoc::Ident, isErrorParameter(), clang::Type::isIntegralType(), clang::Decl::isInvalidDecl(), clang::Type::isReferenceType(), and Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7052 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::DiagnoseSwiftName(), and Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7076 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8822 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::FunctionDecl::getDescribedFunctionTemplate(), getFunctionOrMethodNumParams(), getFunctionOrMethodResultType(), clang::Decl::getLocation(), clang::TemplateParameterList::getParam(), clang::TemplateDecl::getTemplateParameters(), clang::Type::isVoidType(), and clang::TemplateParameterList::size().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3581 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkTargetAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3693 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkTargetClonesAttrString(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::TargetInfo::hasFeature(), clang::Expr::IgnoreParenCasts(), clang::Other, and clang::TargetClones.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3566 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkTargetVersionAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1406 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkForConsumableClass(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2086 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::SemaBase::Diag().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4313 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedUnion, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlign(), clang::ASTContext::getTypeSize(), clang::Type::hasFloatingRepresentation(), clang::TagDecl::isBeingDefined(), clang::TagDecl::isCompleteDefinition(), clang::Type::isIncompleteType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::TagDecl::isUnion(), and clang::Type::isVectorType().
Referenced by ProcessDeclAttribute(), and clang::Sema::ProcessDeclAttributeDelayed().
|
static |
Definition at line 8400 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5853 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedVariable, clang::ParsedAttr::getArgAsIdent(), clang::ParsedAttr::getLayoutCompatible(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getMatchingCType(), clang::ParsedAttr::getMustBeNull(), clang::Sema::GetTypeFromParser(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8874 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::SD_Automatic.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 9017 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
|
static |
Definition at line 2382 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getScopeName(), and clang::AttributeCommonInfo::isCXX11Attribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7177 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), AttributeLangSupport::C, clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getMSGuidDecl(), clang::isHexDigit(), clang::AttributeCommonInfo::isMicrosoftAttribute(), clang::Sema::LangOpts, clang::Sema::mergeUuidAttr(), clang::MSGuidDeclParts::Part1, clang::MSGuidDeclParts::Part2, clang::MSGuidDeclParts::Part3, and clang::MSGuidDeclParts::Part4And5.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2313 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3311 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::ParsedAttr::hasParsedType(), clang::ASTContext::hasSameType(), clang::Type::isBooleanType(), clang::Type::isExtVectorType(), clang::Type::isFloatingType(), and clang::Type::isIntegralType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2946 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedTypeOrNamespace, clang::SourceRange::getBegin(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::hasProtectedVisibility(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::Sema::mergeTypeVisibilityAttr(), clang::Sema::mergeVisibilityAttr(), and clang::ast_matchers::type.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3190 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getFunctionType(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::FunctionType::getReturnType(), clang::AttributeCommonInfo::getScopeName(), clang::AttributeCommonInfo::isClangScope(), clang::AttributeCommonInfo::isGNUAttribute(), clang::AttributeCommonInfo::isGNUScope(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::AttributeCommonInfo::isStandardAttributeSyntax(), and clang::Type::isVoidType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3243 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Decl::canBeWeakImported(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedVariableOrFunction, clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1945 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::DeclContext::getRedeclContext(), and clang::DeclContext::isFileContext().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7848 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunction, clang::Decl::getLocation(), isFunctionOrMethod(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::FunctionDecl::isThisDeclarationADefinition().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7912 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::FunctionDecl::hasBody().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7929 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::FunctionDecl::hasBody().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3266 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Stmt::getSourceRange().
|
static |
Definition at line 8226 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunction, clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5880 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::ParsedAttr::getArgAsExpr(), and clang::ParamIdx::getSourceIndex().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6154 of file SemaDeclAttr.cpp.
References clang::Sema::CF, clang::SemaBase::Diag(), clang::ExpectedFunctionMethodOrParameter, clang::ExpectedFunctionOrMethod, clang::Function, clang::Decl::getBeginLoc(), clang::ParsedAttr::getKind(), clang::Sema::getLangOpts(), clang::Type::getPointeeType(), clang::AttributeCommonInfo::getRange(), clang::FunctionDecl::getReturnType(), hasDeclarator(), clang::QualType::isNull(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::ParsedAttr::isUsedAsTypeAttr(), isValidSubjectOfCFAttribute(), isValidSubjectOfNSAttribute(), isValidSubjectOfNSReturnsRetainedAttribute(), isValidSubjectOfOSAttribute(), parsedAttrToRetainOwnershipKind(), and clang::Property.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8602 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), and clang::Decl::dropAttr().
Referenced by ProcessDeclAttribute().
Definition at line 7824 of file SemaDeclAttr.cpp.
References clang::Decl::specific_attrs().
Referenced by handleBTFDeclTagAttr(), and clang::Sema::mergeBTFDeclTagAttr().
Return true if the given decl has a declarator that should have been processed by Sema::GetTypeForDeclarator.
Definition at line 87 of file SemaDeclAttr.cpp.
Referenced by handleCallConvAttr(), handleNoReturnAttr(), handleObjCOwnershipAttr(), and handleXReturnsXRetainedAttr().
hasFunctionProto - Return true if the given decl has a argument information.
This decl should have already passed isFunctionOrMethod or isFunctionOrMethodOrBlock.
Definition at line 96 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), handleAllocSizeAttr(), handleAnyX86InterruptAttr(), handleMipsInterruptAttr(), handleMSP430InterruptAttr(), handleObjCExternallyRetainedAttr(), and handleRISCVInterruptAttr().
Definition at line 578 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), isCapabilityExpr(), and typeHasCapability().
Referenced by checkAttrArgsAreCapabilityObjs(), and isCapabilityExpr().
|
inlinestatic |
Definition at line 187 of file SemaDeclAttr.cpp.
References clang::IdentifierTable::get(), clang::Type::getAs(), clang::NamedDecl::getIdentifier(), clang::PointerType::getPointeeType(), clang::TagDecl::getTagKind(), clang::ASTContext::Idents, and clang::T.
Referenced by handleFormatArgAttr(), and handleFormatAttr().
Definition at line 6554 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), clang::SemaObjC::getNSErrorIdent(), clang::Type::getPointeeType(), clang::SemaObjC::isCFError(), and clang::Sema::ObjC().
Referenced by handleSwiftError().
|
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 10345 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::sema::DelayedDiagnostic::getForbiddenTypeDiagnostic(), clang::Decl::getLocation(), clang::ASTContext::getSourceManager(), and clang::SourceManager::isInSystemHeader().
Referenced by handleDelayedForbiddenType().
Definition at line 4293 of file SemaDeclAttr.cpp.
References clang::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), and clang::T.
Referenced by handleCalledOnceAttr().
isFunctionOrMethod - Return true if the given decl has function type (function or function-typed variable) or an Objective-C method.
Definition at line 75 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by GetFullTypeForDeclarator(), handleAllocSizeAttr(), handleAnyX86InterruptAttr(), handleAVRInterruptAttr(), handleAVRSignalAttr(), handleMipsInterruptAttr(), handleMSP430InterruptAttr(), handleWebAssemblyExportNameAttr(), isFunctionOrMethodOrBlock(), clang::NamedDecl::isPlaceholderVar(), and clang::NamedDecl::printQualifiedName().
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 81 of file SemaDeclAttr.cpp.
References isFunctionOrMethod().
Referenced by checkFunctionOrMethodParameterIndex(), and handleAnalyzerNoReturnAttr().
Definition at line 153 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), handleFormatAttr(), and handleNonNullAttr().
Definition at line 8472 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr(), and handleNoSanitizeSpecificAttr().
Definition at line 161 of file SemaDeclAttr.cpp.
Referenced by clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(), checkFunctionOrMethodParameterIndex(), handleAnyX86InterruptAttr(), handleCallbackAttr(), and handleFormatAttr().
Check if the passed-in expression is of type int or bool.
Definition at line 443 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().
Referenced by checkTryLockFunAttrCommon().
Definition at line 7285 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), clang::Type::hasUnsignedIntegerRepresentation(), and clang::T.
Referenced by handleHLSLSV_DispatchThreadIDAttr().
|
inlinestatic |
Definition at line 167 of file SemaDeclAttr.cpp.
References clang::IdentifierTable::get(), clang::Type::getAs(), clang::NamedDecl::getIdentifier(), clang::ASTContext::Idents, and clang::T.
Referenced by handleFormatArgAttr(), and handleFormatAttr().
|
static |
Definition at line 8478 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
Definition at line 6145 of file SemaDeclAttr.cpp.
References clang::Type::getPointeeType(), clang::QualType::isNull(), and isValidSubjectOfOSAttribute().
Referenced by ProcessDeclAttribute().
Definition at line 6065 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), clang::Type::isPointerType(), and isValidSubjectOfNSAttribute().
Referenced by clang::Sema::AddXConsumedAttr(), and handleXReturnsXRetainedAttr().
Definition at line 6060 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), clang::Type::isObjCNSObjectType(), and clang::Type::isObjCObjectPointerType().
Referenced by clang::Sema::AddXConsumedAttr(), handleXReturnsXRetainedAttr(), and isValidSubjectOfCFAttribute().
Definition at line 6056 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), and clang::Type::isObjCRetainableType().
Referenced by clang::Sema::checkNSReturnsRetainedReturnType(), and handleXReturnsXRetainedAttr().
Definition at line 6070 of file SemaDeclAttr.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::Type::getPointeeType(), clang::Type::isDependentType(), and clang::QualType::isNull().
Referenced by clang::Sema::AddXConsumedAttr(), handleXReturnsXRetainedAttr(), and isValidOSObjectOutParameter().
Pointer-like types in the default address space.
Definition at line 5600 of file SemaDeclAttr.cpp.
References clang::Default, clang::QualType::getAddressSpace(), clang::Type::getPointeeType(), clang::Type::hasPointerRepresentation(), and clang::Type::isDependentType().
Referenced by clang::Sema::AddParameterABIAttr(), and isValidSwiftErrorResultType().
Pointers and references to pointers in the default address space.
Definition at line 5619 of file SemaDeclAttr.cpp.
References clang::Qualifiers::empty(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Type::isDependentType(), and isValidSwiftContextType().
Referenced by clang::Sema::AddParameterABIAttr().
Pointers and references in the default address space.
Definition at line 5607 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().
|
static |
Definition at line 5735 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::ASTContext::getConstType(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::InitializedEntity::InitializeParameter(), clang::ASTContext::IntTy, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isValueDependent(), clang::Sema::PerformCopyInitialization(), and toString().
Referenced by clang::Sema::CreateLaunchBoundsAttr().
|
static |
Definition at line 2007 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::createMangleContext(), clang::IdentifierTable::get(), clang::Sema::getASTContext(), clang::ASTContext::getCXXABIKind(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::Idents, clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::Target, and clang::Sema::TUScope.
Referenced by handleAliasAttr(), and handleIFuncAttr().
|
static |
Definition at line 9077 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Decl::dropAttr(), and clang::Sema::getASTContext().
|
static |
Definition at line 2920 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::Type::getVisibility(), and clang::T.
|
static |
Definition at line 9115 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::acceptsExprPack(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getNumArgMembers(), clang::ParsedAttr::getNumArgs(), clang::ParsedAttr::hasVariadicArg(), clang::ParsedAttr::isParamExpr(), and clang::Expr::isValueDependent().
Referenced by ProcessDeclAttribute().
|
static |
Normalize the attribute, foo becomes foo.
Returns true if normalization was applied.
Definition at line 1832 of file SemaDeclAttr.cpp.
|
static |
Definition at line 6111 of file SemaDeclAttr.cpp.
References clang::Sema::CF, clang::ParsedAttr::getKind(), clang::Sema::NS, and clang::Sema::OS.
Referenced by handleXReturnsXRetainedAttr(), and ProcessDeclAttribute().
|
static |
parseModeAttrArg - Parses attribute mode string and returns parsed type attribute.
Definition at line 4756 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Default, clang::Float128, clang::TargetInfo::getCharWidth(), clang::TargetInfo::getPointerWidth(), clang::TargetInfo::getRegisterWidth(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getUnwindWordWidth(), clang::Ibm128, clang::LongDouble, and clang::NoFloat.
Referenced by clang::Sema::AddModeAttr().
|
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 9224 of file SemaDeclAttr.cpp.
References clang::Sema::AddParameterABIAttr(), clang::Sema::AddXConsumedAttr(), clang::Sema::checkCommonAttributeFeatures(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::existsInTarget(), clang::ParsedAttr::getInfo(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), handleAbiTagAttr(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), handleAcquireHandleAttr(), handleAliasAttr(), handleAlignedAttr(), handleAlignValueAttr(), handleAllocAlignAttr(), handleAllocSizeAttr(), handleAlwaysInlineAttr(), handleAMDGPUFlatWorkGroupSizeAttr(), handleAMDGPUMaxNumWorkGroupsAttr(), handleAMDGPUNumSGPRAttr(), handleAMDGPUNumVGPRAttr(), handleAMDGPUWavesPerEUAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArgumentWithTypeTagAttr(), handleArmBuiltinAliasAttr(), handleArmNewAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAssumeAlignedAttr(), clang::ParsedAttr::handleAttrWithDelayedArgs(), handleAvailabilityAttr(), handleAvailableOnlyInDefaultEvalMethod(), handleAVRSignalAttr(), handleBlocksAttr(), handleBPFPreserveAccessIndexAttr(), handleBTFDeclTagAttr(), handleBuiltinAliasAttr(), handleCallableWhenAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCalledOnceAttr(), handleCapabilityAttr(), handleCFGuardAttr(), handleCleanupAttr(), handleCmseNSEntryAttr(), handleCodeModelAttr(), handleCodeSegAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleCountedByAttrField(), handleCPUSpecificAttr(), clang::ParsedAttrInfo::handleDeclAttribute(), handleDeclspecThreadAttr(), handleDependencyAttr(), handleDeprecatedAttr(), handleDestroyAttr(), handleDestructorAttr(), handleDeviceAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnumExtensibilityAttr(), handleErrorAttr(), handleExcludeFromExplicitInstantiationAttr(), handleExclusiveTrylockFunctionAttr(), handleExternalSourceSymbolAttr(), handleExtVectorTypeAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionReturnThunksAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHLSLNumThreadsAttr(), handleHLSLPackOffsetAttr(), handleHLSLParamModifierAttr(), handleHLSLResourceBindingAttr(), handleHLSLShaderAttr(), handleHLSLSV_DispatchThreadIDAttr(), handleIBOutlet(), handleIBOutletCollection(), handleIFuncAttr(), handleInitPriorityAttr(), handleInternalLinkageAttr(), handleInterruptAttr(), handleLaunchBoundsAttr(), handleLayoutVersion(), handleLifetimeCategoryAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleManagedAttr(), handleMIGServerRoutineAttr(), handleMinSizeAttr(), handleMinVectorWidthAttr(), handleModeAttr(), handleMSAllocatorAttr(), handleMSConstexprAttr(), handleMSInheritanceAttr(), handleNakedAttr(), handleNoBuiltinAttr(), handleNoCfCheckAttr(), handleNoDebugAttr(), handleNoEscapeAttr(), handleNoMergeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoRandomizeLayoutAttr(), handleNoReturnAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleNoUniqueAddressAttr(), handleNSErrorDomain(), handleNullableTypeAttr(), handleObjCBoxable(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCDirectAttr(), handleObjCDirectMembersAttr(), handleObjCExternallyRetainedAttr(), handleObjCIndependentClass(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRuntimeName(), handleObjCSuppresProtocolAttr(), handleOMPAssumeAttr(), handleOpenCLAccessAttr(), handleOpenCLNoSVMAttr(), handleOptimizeNoneAttr(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handlePreferredName(), handlePreferredTypeAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleRandomizeLayoutAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleRestrictAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedAttr(), handleSharedTrylockFunctionAttr(), handleStandardNoReturnAttr(), handleSubGroupSize(), handleSuppressAttr(), handleSwiftAsyncAttr(), handleSwiftAsyncError(), handleSwiftAsyncName(), handleSwiftAttrAttr(), handleSwiftBridge(), handleSwiftError(), handleSwiftName(), handleSwiftNewType(), handleSYCLKernelAttr(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUninitializedAttr(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleWebAssemblyExportNameAttr(), handleWebAssemblyImportModuleAttr(), handleWebAssemblyImportNameAttr(), handleX86ForceAlignArgPointerAttr(), handleXRayLogArgsAttr(), handleXReturnsXRetainedAttr(), handleZeroCallUsedRegsAttr(), clang::AttributeCommonInfo::IgnoredAttribute, clang::AttributeCommonInfo::isClangScope(), clang::AttributeCommonInfo::isCXX11Attribute(), clang::AttributeCommonInfo::isDeclspecAttribute(), clang::ParsedAttr::isInvalid(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::AttributeCommonInfo::isStandardAttributeSyntax(), clang::ParsedAttr::isStmtAttr(), clang::ParsedAttr::isTypeAttr(), clang::ParsedAttr::isUsedAsTypeAttr(), isValidOSObjectOutParameter(), MustDelayAttributeArguments(), clang::ParsedAttrInfo::NotHandled, parsedAttrToRetainOwnershipKind(), clang::ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior(), clang::SwiftAsyncContext, clang::SwiftContext, clang::SwiftErrorResult, clang::SwiftIndirectResult, and clang::AttributeCommonInfo::UnknownAttribute.
Referenced by clang::Sema::ProcessAccessDeclAttributeList(), and clang::Sema::ProcessDeclAttributeList().
Definition at line 5991 of file SemaDeclAttr.cpp.
References clang::RISCV::FirstRVVBuiltin, and clang::RISCV::LastRVVBuiltin.
Referenced by handleBuiltinAliasAttr().
|
static |
Check if passed in Decl is a pointer type.
Note that this function may produce an error message.
Definition at line 487 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Type::getAs(), clang::AttributeCommonInfo::getLoc(), clang::Type::isAnyPointerType(), and threadSafetyCheckIsSmartPointer().
Referenced by handlePtGuardedByAttr(), and handlePtGuardedVarAttr().
|
static |
Definition at line 451 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, clang::DeclarationNameTable::getCXXOperatorName(), clang::RecordType::getDecl(), and clang::Result.
Referenced by checkRecordTypeForCapability(), and threadSafetyCheckIsPointer().
Definition at line 8880 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::DeclaratorDecl::getBeginLoc(), clang::Type::getObjCARCImplicitLifetime(), clang::Qualifiers::getObjCLifetime(), clang::QualType::getQualifiers(), clang::ValueDecl::getType(), clang::Type::isObjCRetainableType(), clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::VarDecl::setARCPseudoStrong(), clang::ValueDecl::setType(), and clang::QualType::withConst().
Referenced by handleObjCExternallyRetainedAttr().
Definition at line 568 of file SemaDeclAttr.cpp.
References checkRecordTypeForCapability(), and checkTypedefTypeForCapability().
Referenced by checkAcquireOrderAttrCommon(), checkAttrArgsAreCapabilityObjs(), and isCapabilityExpr().
|
static |
Perform checking of type validity.
C++11 [dcl.align]p1: An alignment-specifier may be applied to a variable or to a class data member, but it shall not be applied to a bit-field, a function parameter, the formal parameter of a catch clause, or a variable declared with the register storage class specifier. An alignment-specifier may also be applied to the declaration of a class or enumeration type. CWG 2354: CWG agreed to remove permission for alignas to be applied to enumerations. C11 6.7.5/2: An alignment attribute shall not be specified in a declaration of a typedef, or a bit-field, or a function, or a parameter, or an object declared with the register storage-class specifier.
Definition at line 4516 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::ExpectedVariableFieldOrTag, clang::ExpectedVariableOrField, clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::SC_Register.
Referenced by clang::Sema::AddAlignedAttr().
|
static |
Definition at line 6778 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::isValidAsciiIdentifier(), and Loc.
Referenced by clang::Sema::DiagnoseSwiftName().
|
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 2479 of file SemaDeclAttr.cpp.
References X.