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/SemaInternal.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Assumptions.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <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 } |
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 | 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 | 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 bool | hasArmStreamingInterface (const FunctionDecl *FD) |
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 | 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 | 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 void | handleCountedByAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static const FieldDecl * | FindFieldInTopLevelOrAnonymousStruct (const RecordDecl *RD, const IdentifierInfo *FieldName) |
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. | |
enum FormatAttrKind |
Enumerator | |
---|---|
CFStringFormat | |
NSStringFormat | |
StrftimeFormat | |
SupportedFormat | |
IgnoredFormat | |
InvalidFormat |
Definition at line 3879 of file SemaDeclAttr.cpp.
|
static |
Definition at line 408 of file SemaDeclAttr.cpp.
Referenced by appendDiagnostics(), and handleSimpleAttributeOrDiagnose().
|
static |
Definition at line 414 of file SemaDeclAttr.cpp.
References appendDiagnostics().
|
static |
Definition at line 5875 of file SemaDeclAttr.cpp.
References Id.
Referenced by ArmCdeAliasValid(), and ArmMveAliasValid().
Definition at line 5902 of file SemaDeclAttr.cpp.
References ArmBuiltinAliasValid().
Referenced by handleArmBuiltinAliasAttr(), and handleBuiltinAliasAttr().
Definition at line 5894 of file SemaDeclAttr.cpp.
References ArmBuiltinAliasValid().
Referenced by handleArmBuiltinAliasAttr(), and handleBuiltinAliasAttr().
|
static |
Definition at line 5915 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 5907 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 1578 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::isValidPointerAttrType().
Referenced by handleNonNullAttr(), handleNonNullAttrParameter(), and handleReturnsNonNullAttr().
|
static |
Definition at line 740 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Type::isDependentType(), and typeHasCapability().
Referenced by handleAcquiredAfterAttr(), and handleAcquiredBeforeAttr().
|
static |
Definition at line 7972 of file SemaDeclAttr.cpp.
References checkUInt32Argument(), clang::Sema::Diag(), clang::Attr::getLocation(), clang::Expr::isValueDependent(), clang::Max, and clang::Min.
Referenced by clang::Sema::CreateAMDGPUFlatWorkGroupSizeAttr().
|
static |
Definition at line 8107 of file SemaDeclAttr.cpp.
References checkUInt32Argument(), clang::Sema::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), and clang::Expr::isValueDependent().
Referenced by clang::Sema::CreateAMDGPUMaxNumWorkGroupsAttr().
|
static |
Definition at line 8027 of file SemaDeclAttr.cpp.
References checkUInt32Argument(), clang::Sema::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Attr::getLocation(), clang::Expr::isValueDependent(), clang::Max, and clang::Min.
Referenced by clang::Sema::CreateAMDGPUWavesPerEUAttr().
|
static |
Definition at line 9050 of file SemaDeclAttr.cpp.
References clang::FunctionType::ARM_In, clang::FunctionType::ARM_InOut, clang::FunctionType::ARM_Out, clang::FunctionType::ARM_Preserves, clang::Sema::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 603 of file SemaDeclAttr.cpp.
References clang::Sema::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 287 of file SemaDeclAttr.cpp.
References clang::Sema::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 275 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
|
static |
Definition at line 2393 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), and clang::IdentifierInfo::getName().
Referenced by clang::Sema::mergeAvailabilityAttr().
|
static |
Definition at line 3385 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Sema::isValidSectionSpecifier(), and toString().
Referenced by handleCodeSegAttr().
|
static |
Definition at line 1235 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Type::getAsCXXRecordDecl(), clang::CXXMethodDecl::getFunctionObjectParameterType(), and clang::AttributeCommonInfo::getLoc().
Referenced by handleCallableWhenAttr(), handleSetTypestateAttr(), and handleTestTypestateAttr().
|
static |
Definition at line 938 of file SemaDeclAttr.cpp.
References clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::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 303 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::Sema::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 707 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleGuardedByAttr(), and handlePtGuardedByAttr().
|
static |
Definition at line 1478 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by handleIBOutlet(), and handleIBOutletCollection().
|
static |
Definition at line 780 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 1774 of file SemaDeclAttr.cpp.
References clang::Sema::Diag().
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 818 of file SemaDeclAttr.cpp.
References checkFunctionOrMethodParameterIndex(), clang::Sema::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 254 of file SemaDeclAttr.cpp.
References checkUInt32Argument(), clang::Sema::Diag(), clang::Expr::getExprLoc(), and toString().
Referenced by handleAllocSizeAttr().
|
static |
Definition at line 518 of file SemaDeclAttr.cpp.
References clang::Decl::hasAttr().
Definition at line 533 of file SemaDeclAttr.cpp.
References clang::RecordType::getDecl(), getRecordType(), clang::Type::isIncompleteType(), and threadSafetyCheckIsSmartPointer().
Referenced by typeHasCapability().
|
static |
Definition at line 6591 of file SemaDeclAttr.cpp.
References clang::Type::castAs(), clang::Sema::Context, clang::Sema::Diag(), clang::Type::getAs(), getFunctionOrMethodParam(), clang::Sema::getNSErrorIdent(), clang::ValueDecl::getType(), clang::Sema::isCFError(), and clang::Type::isIntegralType().
Referenced by handleSwiftAsyncAttr(), and handleSwiftAsyncError().
|
static |
Definition at line 874 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntOrBool, clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), and isIntOrBool().
Referenced by handleExclusiveTrylockFunctionAttr(), handleSharedTrylockFunctionAttr(), and handleTryAcquireCapabilityAttr().
Definition at line 551 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 218 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::Sema::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(), 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 10060 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeCommonInfo::IgnoredAttribute, and clang::AttributeCommonInfo::UnknownAttribute.
|
static |
Definition at line 8948 of file SemaDeclAttr.cpp.
References clang::Decl::specific_attrs().
|
static |
Definition at line 8574 of file SemaDeclAttr.cpp.
References clang::DeclContext::decls(), FindFieldInTopLevelOrAnonymousStruct(), clang::NamedDecl::getName(), and clang::IdentifierInfo::getName().
Referenced by clang::Sema::CheckCountedByAttr(), and FindFieldInTopLevelOrAnonymousStruct().
|
static |
A helper function to provide Attribute Location for the Attr types AND the ParsedAttr.
Definition at line 207 of file SemaDeclAttr.cpp.
Referenced by checkFunctionOrMethodParameterIndex(), checkUInt32Argument(), and handlePatchableFunctionEntryAttr().
|
static |
Definition at line 210 of file SemaDeclAttr.cpp.
References clang::AttributeCommonInfo::getLoc().
|
static |
Definition at line 5679 of file SemaDeclAttr.cpp.
References clang::TargetInfo::getTargetOpts(), clang::TargetInfo::getTriple(), and clang::StringToCudaArch().
|
static |
getFormatAttrKind - Map from format attribute names to supported format types.
Definition at line 3890 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 100 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 108 of file SemaDeclAttr.cpp.
Referenced by checkSwiftAsyncErrorBlock(), getFunctionOrMethodParamRange(), handleObjCExternallyRetainedAttr(), and handleSwiftAsyncAttr().
|
static |
Definition at line 128 of file SemaDeclAttr.cpp.
References getFunctionOrMethodParam().
Referenced by checkParamIsIntegerType(), handleAnyX86InterruptAttr(), handleFormatArgAttr(), handleFormatAttr(), and handleNonNullAttr().
Definition at line 119 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 140 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), handleAnyX86InterruptAttr(), handleRestrictAttr(), and handleReturnsNonNullAttr().
Definition at line 134 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 198 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 506 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 7455 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8329 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 760 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 770 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8897 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), and clang::ParsedAttr::isUsedAsTypeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1998 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::CUDA_100, clang::Sema::Diag(), clang::IdentifierTable::get(), clang::Sema::getCurLexicalContext(), clang::AttributeCommonInfo::getLoc(), clang::TargetInfo::getSDKVersion(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ASTContext::Idents, clang::FunctionDecl::isThisDeclarationADefinition(), clang::Sema::LangOpts, clang::Sema::LookupOrdinaryName, clang::Sema::LookupQualifiedName(), clang::ToCudaVersion(), and clang::UNKNOWN.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4416 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignedAttr(), clang::Decl::addAttr(), clang::Expr::containsUnexpandedParameterPack(), clang::Type::containsUnexpandedParameterPack(), clang::Sema::Context, clang::Sema::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 4372 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignValueAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1688 of file SemaDeclAttr.cpp.
References clang::Sema::AddAllocAlignAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 837 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), checkParamIsIntegerType(), checkPositiveIntArgument(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), hasFunctionProto(), isFunctionOrMethod(), and clang::Type::isPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5058 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::AttributeCommonInfo::getAttrName(), and clang::Sema::mergeAlwaysInlineAttr().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 8019 of file SemaDeclAttr.cpp.
References clang::Sema::addAMDGPUFlatWorkGroupSizeAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8158 of file SemaDeclAttr.cpp.
References clang::Sema::addAMDGPUMaxNumWorkGroupsAttr(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8088 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8097 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8078 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 2249 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 4355 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 7653 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 5776 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::Sema::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 5923 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), ArmCdeAliasValid(), ArmMveAliasValid(), ArmSmeAliasValid(), ArmSveAliasValid(), clang::Sema::Context, clang::Sema::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 7486 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by handleInterruptAttr().
|
static |
Definition at line 9073 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::FunctionType::ARM_None, checkArmNewAttrMutualExclusion(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::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 8320 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 800 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 789 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1682 of file SemaDeclAttr.cpp.
References clang::Sema::AddAssumeAlignedAttr(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2373 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::ParsedAttr::getNumArgs().
|
static |
Definition at line 2614 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::Sema::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 8708 of file SemaDeclAttr.cpp.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7718 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Diag(), clang::ExpectedFunction, clang::Decl::getLocation(), isFunctionOrMethod(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by handleInterruptAttr().
|
static |
Definition at line 7731 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Diag(), clang::ExpectedFunction, clang::Decl::getLocation(), isFunctionOrMethod(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3041 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 7756 of file SemaDeclAttr.cpp.
References clang::Sema::Context, and handleBPFPreserveAIRecord().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7744 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 7771 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and hasBTFDeclTagAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5951 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), ArmCdeAliasValid(), ArmMveAliasValid(), ArmSveAliasValid(), clang::Sema::Context, clang::Sema::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 1250 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkForConsumableClass(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes.
Definition at line 4117 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::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 5184 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::Sema::CheckCallingConvAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionOrMethod, clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), hasDeclarator(), clang::Sema::IdentifyCUDATarget(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Handle 'called_once' attribute.
Definition at line 4263 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and isFunctionLike().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8302 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 8927 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3739 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::Sema::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(), 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 2153 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), clang::NamedDecl::isExternallyVisible(), clang::DeclContext::isExternCContext(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3367 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::Sema::Diag().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3415 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkCodeSegName(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::mergeCodeSegAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2143 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, AttributeLangSupport::Cpp, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5074 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2350 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1215 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 8559 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2071 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::Context, clang::Sema::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 7416 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 10275 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 2324 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Scope::FunctionDeclarationScope, clang::Scope::getFlags(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8376 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtMostNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::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 8767 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::ParsedAttr::getKind(), and clang::Decl::getLocation().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2363 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 5142 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1029 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentBuiltinFunction, clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::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(), and clang::Union.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1107 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Stmt::getBeginLoc(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8235 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 966 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Sema::Context, clang::Sema::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8958 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::dropAttr(), clang::AttributeCommonInfo::getAttrName(), clang::AttributeCommonInfo::getLoc(), and clang::IdentifierInfo::getName().
|
static |
Definition at line 3818 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 975 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::mergeErrorAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 901 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2856 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 1408 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 3840 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Type::castAs(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::Sema::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 4002 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Type::castAs(), checkUInt32Argument(), clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::Sema::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 8688 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), and clang::Decl::dropAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5106 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::Sema::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 5171 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Sema::LangOpts, and clang::SC_Extern.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 721 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8915 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
|
static |
Definition at line 7178 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Expr::getExprLoc(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::Sema::mergeHLSLNumThreadsAttr(), and X.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7372 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::getSemanticSpelling(), and clang::Sema::mergeHLSLParamModifierAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7300 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Sema::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7267 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::mergeHLSLShaderAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7247 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and isLegalTypeForHLSLSV_DispatchThreadID().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1504 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkIBOutletCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1511 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkIBOutletCommon(), clang::Sema::Context, clang::Sema::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 1983 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::FunctionDecl::isThisDeclarationADefinition().
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 3911 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::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(), and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8480 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Internal, and clang::Sema::mergeInternalLinkageAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7941 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 5767 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 8188 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), and clang::LangOptionsBase::MSVC2015.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5300 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Sema::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 911 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 922 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7620 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Expr::getIntegerConstantExpr(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), and clang::ParsedAttr::isArgExpr().
Referenced by handleInterruptAttr().
|
static |
Definition at line 5158 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8861 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Type::getAs(), clang::Sema::getASTContext(), clang::Decl::getBeginLoc(), clang::QualType::getCanonicalType(), getFunctionOrMethodResultType(), and clang::ASTContext::IntTy.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5064 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeMinSizeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3722 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7563 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::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 4789 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Sema::AddModeAttr(), clang::Sema::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8883 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::FunctionDecl::getReturnType(), clang::Type::isPointerType(), and clang::Type::isReferenceType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7433 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 7402 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ASTConsumer::AssignInheritanceModel(), AttributeLangSupport::C, clang::Sema::Consumer, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getSemanticSpelling(), clang::Sema::LangOpts, and clang::Sema::mergeMSInheritanceAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7511 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::Sema::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 2168 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 1133 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::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 2219 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Sema::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4948 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1667 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::Decl::isInvalidDecl(), and clang::Sema::isValidPointerAttrType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8714 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 1594 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::Sema::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(), and clang::Sema::isValidPointerAttrType().
Referenced by handleNonNullAttrParameter(), and ProcessDeclAttribute().
|
static |
Definition at line 1637 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, clang::Sema::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 5374 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2191 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeCommonInfo::getLoc(), hasDeclarator(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8422 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), isGlobalVar(), isSanitizerAttributeAllowedOnGlobals(), and clang::parseSanitizerValue().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8449 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 8724 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6273 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, clang::IdentifierLoc::Loc, clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::Result, and clang::Sema::TUScope.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6397 of file SemaDeclAttr.cpp.
References clang::Sema::Context, and clang::Sema::getASTMutationListener().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6304 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::IdentifierInfo::isStr(), and clang::Type::isVoidPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6330 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getBeginLoc(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6343 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getBeginLoc(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6359 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getDeclContext(), clang::Decl::getLocation(), and clang::ObjCInterfaceDecl::setHasDesignatedInitializers().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2951 of file SemaDeclAttr.cpp.
References clang::ObjCRuntime::allowsDirectDispatch(), clang::Sema::Diag(), clang::Decl::getDeclContext(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::LangOptions::ObjCRuntime.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2965 of file SemaDeclAttr.cpp.
References clang::ObjCRuntime::allowsDirectDispatch(), clang::Sema::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::LangOptions::ObjCRuntime.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8823 of file SemaDeclAttr.cpp.
References clang::Sema::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 3027 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getLocation(), and clang::Type::isObjCObjectPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2974 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 3000 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getLocation(), and clang::Type::isCARCBridgableType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6419 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::ExpectedVariable, clang::Decl::getBeginLoc(), clang::AttributeCommonInfo::getRange(), hasDeclarator(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6428 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 6253 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getBeginLoc(), and clang::OMF_dealloc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6227 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::Type::isObjCRetainableType(), clang::Type::isPointerType(), and clang::Type::isReferenceType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6385 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2382 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1798 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkOMPAssumeAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8494 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 8485 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), clang::LangOptions::getOpenCLCompatibleVersion(), clang::LangOptions::getOpenCLVersionString(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5069 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeOptimizeNoneAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1821 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::Sema::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, and clang::Decl::specific_attrs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1413 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 1285 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 1183 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5848 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), getAttrLoc(), clang::Stmt::getBeginLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1441 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::declaresSameEntity(), clang::Sema::Diag(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::QualType::hasQualifiers(), and clang::Type::isTypedefNameType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5979 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 729 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 700 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5367 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8349 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8359 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2060 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), getFunctionOrMethodResultSourceRange(), getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::Type::isAnyPointerType(), and clang::Type::isBlockPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1657 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, getFunctionOrMethodResultSourceRange(), and getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1319 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 7883 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtMostNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::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 3345 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 3058 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::Type::castAs(), clang::Sema::Context, clang::Sema::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 1364 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkForConsumableClass(), clang::Sema::Context, clang::Sema::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 5090 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::CUDADiagIfHostCode(), clang::Sema::CurrentCUDATarget(), clang::Sema::Diag(), clang::Sema::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 891 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 401 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 425 of file SemaDeclAttr.cpp.
References appendDiagnostics(), clang::Sema::Diag(), and clang::Decl::getBeginLoc().
|
static |
Definition at line 2204 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 3248 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Stmt::getSourceRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5279 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 7044 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Type::castAs(), clang::ParsedAttr::checkExactlyNumArgs(), checkFunctionOrMethodParameterIndex(), checkSwiftAsyncErrorBlock(), clang::Sema::Context, clang::Sema::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 6672 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), checkSwiftAsyncErrorBlock(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::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 7005 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::Sema::DiagnoseSwiftName().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6467 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6477 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Other.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6517 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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(), and clang::Type::isReferenceType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6993 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::Sema::DiagnoseSwiftName().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7017 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::Sema::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 8728 of file SemaDeclAttr.cpp.
References clang::Sema::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 3544 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 3655 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkTargetClonesAttrString(), clang::Sema::Context, clang::Sema::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 3529 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 1386 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkForConsumableClass(), clang::Sema::Context, clang::Sema::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 2043 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::Sema::Diag().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4275 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 8339 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5808 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::Sema::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 8780 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::SD_Automatic.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 8923 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
|
static |
Definition at line 2339 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getScopeName(), and clang::AttributeCommonInfo::isCXX11Attribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7118 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), AttributeLangSupport::C, clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::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 2270 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3268 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 2903 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::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 3147 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::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 3200 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Decl::canBeWeakImported(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedVariableOrFunction, clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1925 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::DeclContext::getRedeclContext(), and clang::DeclContext::isFileContext().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7787 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunction, clang::Decl::getLocation(), isFunctionOrMethod(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::FunctionDecl::isThisDeclarationADefinition().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7851 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::FunctionDecl::hasBody().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7868 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::FunctionDecl::hasBody().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3223 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Stmt::getSourceRange().
|
static |
Definition at line 8165 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunction, clang::AttributeCommonInfo::getLoc(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5835 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 6095 of file SemaDeclAttr.cpp.
References clang::Sema::CF, clang::Sema::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 8541 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), and clang::Decl::dropAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3499 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), clang::ValueDecl::getType(), and clang::FunctionType::SME_PStateSMEnabledMask.
Referenced by clang::Sema::checkTargetClonesAttrString(), and clang::Sema::checkTargetVersionAttr().
Definition at line 7763 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 82 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 91 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), handleAllocSizeAttr(), handleAnyX86InterruptAttr(), handleMipsInterruptAttr(), handleMSP430InterruptAttr(), handleObjCExternallyRetainedAttr(), and handleRISCVInterruptAttr().
Definition at line 573 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), isCapabilityExpr(), and typeHasCapability().
Referenced by checkAttrArgsAreCapabilityObjs(), and isCapabilityExpr().
|
inlinestatic |
Definition at line 182 of file SemaDeclAttr.cpp.
References clang::IdentifierTable::get(), clang::Type::getAs(), clang::NamedDecl::getIdentifier(), clang::PointerType::getPointeeType(), clang::TagDecl::getTagKind(), and clang::ASTContext::Idents.
Referenced by handleFormatArgAttr(), and handleFormatAttr().
Definition at line 6495 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), clang::Sema::getNSErrorIdent(), clang::Type::getPointeeType(), and clang::Sema::isCFError().
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 10240 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 4255 of file SemaDeclAttr.cpp.
References clang::Type::isBlockPointerType(), and clang::Type::isFunctionPointerType().
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 70 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 76 of file SemaDeclAttr.cpp.
References isFunctionOrMethod().
Referenced by checkFunctionOrMethodParameterIndex(), and handleAnalyzerNoReturnAttr().
Definition at line 148 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), handleFormatAttr(), and handleNonNullAttr().
Definition at line 8411 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr(), and handleNoSanitizeSpecificAttr().
Definition at line 156 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 438 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().
Referenced by checkTryLockFunAttrCommon().
Definition at line 7239 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Type::hasUnsignedIntegerRepresentation().
Referenced by handleHLSLSV_DispatchThreadIDAttr().
|
inlinestatic |
Definition at line 162 of file SemaDeclAttr.cpp.
References clang::IdentifierTable::get(), clang::Type::getAs(), clang::NamedDecl::getIdentifier(), and clang::ASTContext::Idents.
Referenced by handleFormatArgAttr(), and handleFormatAttr().
|
static |
Definition at line 8417 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
Definition at line 6086 of file SemaDeclAttr.cpp.
References clang::Type::getPointeeType(), clang::QualType::isNull(), and isValidSubjectOfOSAttribute().
Referenced by ProcessDeclAttribute().
Definition at line 6006 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), clang::Type::isPointerType(), and isValidSubjectOfNSAttribute().
Referenced by clang::Sema::AddXConsumedAttr(), and handleXReturnsXRetainedAttr().
Definition at line 6001 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 5997 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), and clang::Type::isObjCRetainableType().
Referenced by clang::Sema::checkNSReturnsRetainedReturnType(), and handleXReturnsXRetainedAttr().
Definition at line 6011 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 5555 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 5574 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 5562 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 5690 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::Sema::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 8983 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Decl::dropAttr(), and clang::Sema::getASTContext().
|
static |
Definition at line 2877 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
|
static |
Definition at line 9021 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 1812 of file SemaDeclAttr.cpp.
|
static |
Definition at line 6052 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 4718 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 9130 of file SemaDeclAttr.cpp.
References clang::Sema::AddParameterABIAttr(), clang::Sema::AddXConsumedAttr(), clang::Sema::checkCommonAttributeFeatures(), clang::Sema::Context, clang::Sema::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(), handleCountedByAttr(), handleCPUSpecificAttr(), clang::ParsedAttrInfo::handleDeclAttribute(), handleDeclspecThreadAttr(), handleDependencyAttr(), handleDeprecatedAttr(), handleDestroyAttr(), handleDestructorAttr(), handleDeviceAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnumExtensibilityAttr(), handleErrorAttr(), handleExclusiveTrylockFunctionAttr(), handleExternalSourceSymbolAttr(), handleExtVectorTypeAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionReturnThunksAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHLSLNumThreadsAttr(), 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(), 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 5946 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 482 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Type::getAs(), clang::AttributeCommonInfo::getLoc(), clang::Type::isAnyPointerType(), and threadSafetyCheckIsSmartPointer().
Referenced by handlePtGuardedByAttr(), and handlePtGuardedVarAttr().
|
static |
Definition at line 446 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 8786 of file SemaDeclAttr.cpp.
References clang::Sema::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 563 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 4478 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::ExpectedVariableFieldOrTag, clang::ExpectedVariableOrField, clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::SC_Register.
Referenced by clang::Sema::AddAlignedAttr().
|
static |
Definition at line 6719 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), and clang::isValidAsciiIdentifier().
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 2436 of file SemaDeclAttr.cpp.
References X.