|
clang 24.0.0git
|
#include "clang/AST/APValue.h"#include "clang/AST/ASTConsumer.h"#include "clang/AST/ASTContext.h"#include "clang/AST/ASTMutationListener.h"#include "clang/AST/Availability.h"#include "clang/AST/CXXInheritance.h"#include "clang/AST/Decl.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/DeclObjC.h"#include "clang/AST/DeclTemplate.h"#include "clang/AST/DynamicRecursiveASTVisitor.h"#include "clang/AST/Expr.h"#include "clang/AST/ExprCXX.h"#include "clang/AST/Mangle.h"#include "clang/AST/Type.h"#include "clang/Basic/CharInfo.h"#include "clang/Basic/Cuda.h"#include "clang/Basic/DarwinSDKInfo.h"#include "clang/Basic/IdentifierTable.h"#include "clang/Basic/LangOptions.h"#include "clang/Basic/SourceLocation.h"#include "clang/Basic/SourceManager.h"#include "clang/Basic/TargetInfo.h"#include "clang/Lex/Preprocessor.h"#include "clang/Sema/Attr.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/Sema.h"#include "clang/Sema/SemaAMDGPU.h"#include "clang/Sema/SemaARM.h"#include "clang/Sema/SemaAVR.h"#include "clang/Sema/SemaBPF.h"#include "clang/Sema/SemaCUDA.h"#include "clang/Sema/SemaHLSL.h"#include "clang/Sema/SemaInternal.h"#include "clang/Sema/SemaM68k.h"#include "clang/Sema/SemaMIPS.h"#include "clang/Sema/SemaMSP430.h"#include "clang/Sema/SemaObjC.h"#include "clang/Sema/SemaOpenCL.h"#include "clang/Sema/SemaOpenMP.h"#include "clang/Sema/SemaPPC.h"#include "clang/Sema/SemaRISCV.h"#include "clang/Sema/SemaSYCL.h"#include "clang/Sema/SemaSwift.h"#include "clang/Sema/SemaWasm.h"#include "clang/Sema/SemaX86.h"#include "llvm/ADT/APSInt.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/StringExtras.h"#include "llvm/Demangle/Demangle.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/MC/MCSectionMachO.h"#include "llvm/Support/Error.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/MathExtras.h"#include "llvm/Support/raw_ostream.h"#include "llvm/TargetParser/NVPTXTargetParser.h"#include "llvm/TargetParser/Triple.h"#include <optional>Go to the source code of this file.
Classes | |
| struct | FormatAttrCommon |
Namespaces | |
| namespace | AttributeLangSupport |
Enumerations | |
| enum | AttributeLangSupport::LANG { AttributeLangSupport::C , AttributeLangSupport::Cpp , AttributeLangSupport::ObjC } |
| enum | FormatAttrKind { CFStringFormat , NSStringFormat , StrftimeFormat , SupportedFormat , IgnoredFormat , InvalidFormat } |
Functions | |
| static unsigned | getNumAttributeArgs (const ParsedAttr &AL) |
| 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. | |
| static bool | isIntOrBool (Expr *Exp) |
| Check if the passed-in expression is of type int or bool. | |
| static bool | threadSafetyCheckIsSmartPointer (Sema &S, const RecordDecl *Record) |
| static bool | threadSafetyCheckIsPointer (Sema &S, const Decl *D, const ParsedAttr &AL) |
| Check if passed in Decl is a pointer type. | |
| static const RecordDecl * | getRecordDecl (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 | checkRecordTypeForScopedCapability (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 bool | isCallbackOrDependent (QualType T) |
| True if T names a function to call: a function pointer, a function reference, or a reference to a function pointer. | |
| static bool | checkThreadSafetyValueDeclIsFunPtr (Sema &S, const ValueDecl *VD, const AttributeCommonInfo &A) |
| Checks that thread-safety attributes on variables or fields apply only to function pointer or function reference types. | |
| static bool | checkFunParamsAreScopedLockable (Sema &S, const ParmVarDecl *ParamDecl, const AttributeCommonInfo &AL) |
| static bool | checkThreadSafetyAttrSubject (Sema &S, Decl *D, const ParsedAttr &AL, bool CheckParmVar=false) |
| static void | handlePtGuardedVarAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | checkGuardedByAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args) |
| 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) |
| 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 | handleLockReturnedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleLocksExcludedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | checkFunctionConditionAttr (Sema &S, Decl *D, const ParsedAttr &AL, Expr *&Cond, StringRef &Msg) |
| static void | handleEnableIfAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleErrorAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleExcludeFromExplicitInstantiationAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDiagnoseAsBuiltinAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDiagnoseIfAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleCFIUncheckedCalleeAttr (Sema &S, Decl *D, const ParsedAttr &Attrs) |
| 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 void | handleNoSpecializations (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 bool | normalizeName (StringRef &AttrName) |
| Normalize the attribute, foo becomes foo. | |
| static void | handleOwnershipAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleWeakRefAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | markUsedForAliasOrIfunc (Sema &S, Decl *D, const ParsedAttr &AL, StringRef Str) |
| static void | handleIFuncAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAliasAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleTLSModelAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleRestrictAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMallocSpanAttr (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 | handleNakedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | isKnownToAlwaysThrow (const FunctionDecl *FD) |
| 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 | handleUnusedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static ExprResult | sharedGetConstructorDestructorAttrExpr (Sema &S, 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 bool | checkAvailabilityAttr (Sema &S, SourceRange Range, const 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 bool | shouldInferAvailabilityAttribute (const ParsedAttr &AL, IdentifierInfo *&II, bool &IsUnavailable, VersionTuple &Introduced, VersionTuple &Deprecated, VersionTuple &Obsolete, Sema &S) |
| Returns true if the given availability attribute should be inferred, and adjusts the value of the attribute as necessary to facilitate that. | |
| 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 | 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<class Attribute> | |
| static Expr * | makeAttributeArgExpr (Sema &S, Expr *E, const Attribute &Attr, const unsigned Idx) |
| template<typename WorkGroupAttr> | |
| static void | handleWorkGroupSize (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleVecTypeHint (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleSectionAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | isValidCodeModelAttr (llvm::Triple &Triple, StringRef Str) |
| static void | handleCodeModelAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | checkCodeSegName (Sema &S, SourceLocation LiteralLoc, StringRef CodeSegName) |
| static void | handleCodeSegAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleTargetVersionAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleTargetAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleTargetClonesAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMinVectorWidthAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleCleanupAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleEnumExtensibilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleFormatArgAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| Handle attribute((format_arg((idx)))) attribute based on https://gcc.gnu.org/onlinedocs/gcc/Common-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 bool | handleFormatAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, FormatAttrCommon *Info) |
| Handle attribute((format(type,idx,firstarg))) attributes based on https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html. | |
| static void | handleFormatAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleFormatMatchesAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleCallbackAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes. | |
| static void | handleLifetimeCaptureByAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| 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 | handleNonStringAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| 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 | handleGridConstantAttr (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 | handleDeviceKernelAttr (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 OffloadArch | getOffloadArch (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 std::pair< Expr *, int > | makeClusterDimsArgExpr (Sema &S, Expr *E, const CUDAClusterDimsAttr &AL, const unsigned Idx) |
| static void | handleClusterDimsAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoClusterAttr (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 void | handleBuiltinAliasAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNullableTypeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handlePreferredTypeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleUuidAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMSInheritanceAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDeclspecThreadAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMSConstexprAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMSStructAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleGCCStructAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAbiTagAttr (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 | handleInterruptAttr (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 | handleReentrantCapabilityAttr (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 AttributeCommonInfo | getNoSanitizeAttrInfo (const ParsedAttr &NoSanitizeSpecificAttr) |
| static void | handleNoSanitizeAddressAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoSanitizeThreadAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoSanitizeMemoryAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleInternalLinkageAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleZeroCallUsedRegsAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoPFPAttrField (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleCountedByAttrField (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleFunctionReturnThunksAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAvailableOnlyInDefaultEvalMethod (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoMergeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoUniqueAddressAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDestroyAttr (Sema &S, Decl *D, const ParsedAttr &A) |
| static void | handleUninitializedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMIGServerRoutineAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMSAllocatorAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAcquireHandleAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| template<typename Attr> | |
| static void | handleHandleAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | 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 void | handleVTablePointerAuthentication (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | modularFormatAttrsEquiv (const ModularFormatAttr *Existing, const IdentifierInfo *ModularImplFn, StringRef ImplName, ArrayRef< StringRef > Aspects) |
| static void | handleModularFormat (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | MustDelayAttributeArguments (const ParsedAttr &AL) |
| static void | handlePersonalityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | ProcessDeclAttribute (Sema &S, 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 bool | isKernelDecl (Decl *D) |
| static void | checkAMDGPUReqdWorkGroupSize (Sema &S, Decl *D) |
| 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? | |
| 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 3996 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1342 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Sema::isValidPointerAttrType(), and clang::T.
Referenced by handleNonNullAttr(), handleNonNullAttrParameter(), and handleReturnsNonNullAttr().
|
static |
Definition at line 558 of file SemaDeclAttr.cpp.
References clang::cast(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Type::isDependentType(), and typeHasCapability().
Referenced by handleAcquiredAfterAttr(), and handleAcquiredBeforeAttr().
Definition at line 8565 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::Max, clang::Min, clang::Decl::setInvalidDecl(), V, and X.
Referenced by clang::Sema::ProcessDeclAttributeList().
|
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 347 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::DeclContext::getParent(), getRecordDecl(), clang::Expr::getType(), isCapabilityExpr(), clang::Expr::isTypeDependent(), and typeHasCapability().
Referenced by checkAcquireOrderAttrCommon(), checkGuardedByAttrCommon(), checkLockFunAttrCommon(), checkTryLockFunAttrCommon(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleReleaseCapabilityAttr(), and handleRequiresCapabilityAttr().
|
static |
Definition at line 2376 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), and clang::IdentifierInfo::getName().
Referenced by clang::Sema::mergeAvailabilityAttr().
|
static |
Definition at line 3603 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::isValidSectionSpecifier(), and toString().
Referenced by handleCodeSegAttr().
|
static |
Definition at line 1064 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Type::getAsCXXRecordDecl(), clang::CXXMethodDecl::getFunctionObjectParameterType(), and clang::AttributeCommonInfo::getLoc().
Referenced by handleCallableWhenAttr(), handleSetTypestateAttr(), and handleTestTypestateAttr().
|
static |
Definition at line 716 of file SemaDeclAttr.cpp.
References clang::cast(), clang::Sema::checkStringLiteralArgumentAttr(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPotentialConstantExprUnevaluated(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Sema::PerformContextuallyConvertToBool().
Referenced by handleDiagnoseIfAttr(), and handleEnableIfAttr().
|
static |
Definition at line 460 of file SemaDeclAttr.cpp.
References checkRecordTypeForScopedCapability(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::AttributeCommonInfo::getLoc(), clang::ValueDecl::getType(), and clang::Type::isDependentType().
Referenced by clang::Sema::checkInstantiatedThreadSafetyAttrs(), and checkThreadSafetyAttrSubject().
|
static |
Definition at line 528 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkAtLeastNumArgs(), and checkAttrArgsAreCapabilityObjs().
Referenced by handleGuardedByAttr(), and handlePtGuardedByAttr().
|
static |
Definition at line 598 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleAcquireCapabilityAttr(), and handleAssertCapabilityAttr().
|
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 613 of file SemaDeclAttr.cpp.
References clang::Sema::checkFunctionOrMethodParameterIndex(), clang::SemaBase::Diag(), clang::ParamIdx::getASTIndex(), clang::Stmt::getBeginLoc(), clang::getFunctionOrMethodParamRange(), clang::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 103 of file SemaDeclAttr.cpp.
References clang::Sema::checkUInt32Argument(), clang::SemaBase::Diag(), clang::Expr::getExprLoc(), toString(), uint32_t, and UINT_MAX.
Referenced by handleAllocSizeAttr().
|
static |
Definition at line 249 of file SemaDeclAttr.cpp.
References clang::Decl::hasAttr().
Referenced by checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), and checkRecordTypeForScopedCapability().
Definition at line 264 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), getRecordDecl(), and threadSafetyCheckIsSmartPointer().
Referenced by typeHasCapability().
Definition at line 282 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), and getRecordDecl().
Referenced by checkFunParamsAreScopedLockable().
|
static |
Definition at line 475 of file SemaDeclAttr.cpp.
References checkFunParamsAreScopedLockable(), checkThreadSafetyValueDeclIsFunPtr(), clang::isa(), and isCallbackOrDependent().
Referenced by handleAcquireCapabilityAttr(), handleAssertCapabilityAttr(), handleLocksExcludedAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), and handleTryAcquireCapabilityAttr().
|
static |
Checks that thread-safety attributes on variables or fields apply only to function pointer or function reference types.
Definition at line 451 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ValueDecl::getType(), and isCallbackOrDependent().
Referenced by clang::Sema::checkInstantiatedThreadSafetyAttrs(), and checkThreadSafetyAttrSubject().
|
static |
Definition at line 669 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntOrBool, clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), and isIntOrBool().
Referenced by handleTryAcquireCapabilityAttr().
Definition at line 295 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Decl::hasAttr().
Referenced by typeHasCapability().
|
static |
checkUnusedDeclAttributes - Check a list of attributes to see if it contains any decl attributes that we should warn about.
Definition at line 8738 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::DiagnoseUnknownAttribute(), clang::AttributeCommonInfo::IgnoredAttribute, and clang::AttributeCommonInfo::UnknownAttribute.
|
static |
Definition at line 7296 of file SemaDeclAttr.cpp.
References clang::nullptr, and clang::Decl::specific_attrs().
Referenced by handleEnforceTCBAttr(), and mergeEnforceTCBAttrImpl().
|
static |
getFormatAttrKind - Map from format attribute names to supported format types.
Definition at line 4007 of file SemaDeclAttr.cpp.
References CFStringFormat, clang::Default, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.
Referenced by handleFormatAttrCommon().
|
static |
Definition at line 7033 of file SemaDeclAttr.cpp.
References clang::AttributeCommonInfo::isStandardAttributeSyntax(), and clang::AttributeCommonInfo::setAttributeSpellingListIndex().
Referenced by handleNoSanitizeAddressAttr(), handleNoSanitizeMemoryAttr(), and handleNoSanitizeThreadAttr().
|
static |
Definition at line 90 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::hasParsedType().
|
static |
Definition at line 6086 of file SemaDeclAttr.cpp.
References clang::TargetInfo::getTargetOpts(), clang::TargetInfo::getTriple(), and clang::StringToOffloadArch().
Referenced by clang::Sema::CreateLaunchBoundsAttr().
|
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 237 of file SemaDeclAttr.cpp.
References clang::Type::getAsCanonical(), and clang::Type::getAsRecordDecl().
Referenced by checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), checkRecordTypeForScopedCapability(), and clang::interp::Pointer::computeLayoutOffset().
|
static |
Definition at line 6647 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6900 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 578 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 588 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7232 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), and clang::ParsedAttr::isUsedAsTypeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1797 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::CUDA_100, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::TargetInfo::getSDKVersion(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::FunctionDecl::isThisDeclarationADefinition(), markUsedForAliasOrIfunc(), clang::ToCudaVersion(), and clang::UNKNOWN.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4751 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignedAttr(), clang::Decl::addAttr(), clang::Expr::containsUnexpandedParameterPack(), clang::Type::containsUnexpandedParameterPack(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ParsedAttr::getArgAsExpr(), clang::OpaquePtr< PtrTy >::getAsOpaquePtr(), clang::TypeLoc::getBeginLoc(), clang::ParsedAttr::getEllipsisLoc(), clang::OpaquePtr< QualType >::getFromOpaquePtr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::TypeSourceInfo::getType(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::ParsedAttr::hasParsedType(), clang::ParsedAttr::isPackExpansion(), and clang::Sema::UPPC_Expression.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4708 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignValueAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1465 of file SemaDeclAttr.cpp.
References clang::Sema::AddAllocAlignAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 632 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), checkParamIsIntegerType(), checkPositiveIntArgument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::hasFunctionProto(), clang::isFuncOrMethodForAttrSubject(), and clang::Type::isPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5393 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getAttrName(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::mergeAlwaysInlineAttr().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 2233 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionMethodOrBlock, clang::AttributeCommonInfo::getLoc(), clang::ValueDecl::getType(), clang::Type::isBlockPointerType(), clang::isFunctionOrMethodOrBlockForAttrSubject(), clang::Type::isFunctionPointerType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::AttributeCommonInfo::isStandardAttributeSyntax().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4701 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::CreateAnnotationAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6311 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::ParamIdx::getASTIndex(), clang::AttributeCommonInfo::getAttrName(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamType(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6888 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1459 of file SemaDeclAttr.cpp.
References clang::Sema::AddAssumeAlignedAttr(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2367 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2723 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::AP_Explicit, clang::Sema::AP_InferredFromOtherPlatform, clang::Sema::AP_PragmaClangAttribute, clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::IdentifierTable::get(), clang::ParsedAttr::getArgAsIdent(), clang::ParsedAttr::getAvailabilityDeprecated(), clang::ParsedAttr::getAvailabilityIntroduced(), clang::ParsedAttr::getAvailabilityObsoleted(), clang::SourceRange::getBegin(), clang::Sema::getDarwinSDKInfoForAvailabilityChecking(), clang::ParsedAttr::getEnvironment(), clang::IdentifierLoc::getIdentifierInfo(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::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::ASTContext::Idents, clang::DarwinSDKInfo::OSEnvPair::iOStoTvOSPair(), clang::DarwinSDKInfo::OSEnvPair::iOStoWatchOSPair(), clang::isa(), clang::ParsedAttr::isPragmaClangAttribute(), clang::IdentifierInfo::isStr(), clang::AvailabilityChange::isValid(), clang::SourceLocation::isValid(), clang::AvailabilityChange::KeywordLoc, clang::DarwinSDKInfo::OSEnvPair::macOStoMacCatalystPair(), clang::Sema::mergeAndInferAvailabilityAttr(), clang::Sema::mergeAvailabilityAttr(), clang::Min, clang::None, shouldInferAvailabilityAttribute(), clang::T, V, clang::Valid, clang::AvailabilitySpec::validateAnyAppleOSVersion(), and clang::AvailabilityChange::Version.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7157 of file SemaDeclAttr.cpp.
References clang::handleSimpleAttribute(), and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6686 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and hasBTFDeclTagAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6428 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::ARM(), clang::cast(), clang::SemaARM::CdeAliasValid(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierInfo::getBuiltinID(), clang::IdentifierLoc::getIdentifierInfo(), clang::ASTContext::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::SemaRISCV::isAliasValid(), clang::ParsedAttr::isArgIdent(), clang::SemaARM::MveAliasValid(), clang::Sema::RISCV(), and clang::SemaARM::SveAliasValid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1079 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::ParsedAttr::checkAtLeastNumArgs(), checkForConsumableClass(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::IdentifierLoc::getLoc(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes.
Definition at line 4293 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAsFunction(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamType(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::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::hasImplicitObjectParameter(), int32_t, clang::ParsedAttr::isArgExpr(), clang::ParsedAttr::isArgIdent(), clang::Type::isFunctionPointerType(), clang::FunctionDecl::parameters(), and uint32_t.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5556 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::Sema::CheckCallingConvAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::Sema::CUDA(), clang::SemaBase::Diag(), clang::ExpectedFunctionOrMethod, clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::Decl::hasAttr(), clang::hasDeclarator(), clang::SemaCUDA::IdentifyTarget(), clang::isa(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::VectorLength.
Referenced by handleDeviceKernelAttr(), and ProcessDeclAttribute().
|
static |
Handle 'called_once' attribute.
Definition at line 4618 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), isFunctionLike(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6855 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 7275 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 947 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeCommonInfo::getLoc(), clang::hasDeclarator(), clang::isa(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3856 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::CheckFunctionCall(), clang::Sema::Context, clang::CallExpr::Create(), clang::DeclRefExpr::Create(), clang::UnaryOperator::Create(), clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), clang::Decl::getAttr(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::DeclRefExpr::getNameInfo(), clang::FunctionDecl::getNumParams(), 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 6277 of file SemaDeclAttr.cpp.
References clang::Sema::addClusterDimsAttr(), Arch, clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), clang::Sema::Context, clang::TargetOptions::CPU, clang::SemaBase::Diag(), clang::TargetOptions::FeatureMap, clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTargetOpts(), clang::TargetInfo::getTriple(), clang::TargetInfo::hasFeatureEnabled(), and clang::StringToOffloadArch().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3561 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ASTContext::getAuxTargetInfo(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and isValidCodeModelAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3633 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkCodeSegName(), clang::Sema::checkStringLiteralArgumentAttr(), clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::mergeCodeSegAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2076 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, AttributeLangSupport::Cpp, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5421 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::CheckVarDeclSizeAddressSpace(), clang::Sema::Context, clang::cuda_constant, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2345 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), clang::Decl::getSourceRange(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and sharedGetConstructorDestructorAttrExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1044 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::getLoc(), clang::IdentifierInfo::getName(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7100 of file SemaDeclAttr.cpp.
References clang::Sema::BuildCountAttributedArrayOrPointerType(), clang::cast(), clang::Sema::CheckCountedByAttrOnField(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getKind(), clang::ValueDecl::getType(), and clang::ValueDecl::setType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2004 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::cast(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::checkAttrMutualExclusion(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAttr(), clang::IdentifierLoc::getIdentifierInfo(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::getLoc(), clang::IdentifierInfo::getName(), getNumAttributeArgs(), clang::AttributeCommonInfo::getParsedKind(), clang::ASTContext::getTargetInfo(), clang::ParsedAttr::isArgIdent(), clang::Other, clang::FunctionDecl::setIsMultiVersion(), and clang::TargetInfo::validateCPUSpecificCPUDispatch().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6578 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::isTLSSupported(), and clang::TSCS_unspecified.
Referenced by ProcessDeclAttribute().
|
static |
Handle a delayed forbidden-type diagnostic.
Definition at line 8994 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::sema::DelayedDiagnostic::getForbiddenTypeArgument(), clang::sema::DelayedDiagnostic::getForbiddenTypeDiagnostic(), clang::sema::DelayedDiagnostic::getForbiddenTypeOperand(), clang::Sema::getLangOpts(), clang::Decl::hasAttr(), isForbiddenTypeAllowed(), clang::sema::DelayedDiagnostic::Loc, and clang::sema::DelayedDiagnostic::Triggered.
Referenced by clang::Sema::PopParsingDeclaration().
|
static |
Definition at line 6959 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtMostNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::SourceRange::getBegin(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::isa(), clang::ParsedAttr::isArgExpr(), clang::AttributeCommonInfo::isCXX11Attribute(), clang::AttributeCommonInfo::isDeclspecAttribute(), clang::AttributeCommonInfo::isGNUScope(), and clang::AttributeCommonInfo::isStandardAttributeSyntax().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7177 of file SemaDeclAttr.cpp.
References clang::cast(), clang::SemaBase::Diag(), clang::ParsedAttr::getKind(), clang::Decl::getLocation(), and clang::handleSimpleAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2358 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::Decl::getLocation(), clang::Decl::getSourceRange(), clang::ActionResult< PtrTy, Compress >::isInvalid(), and sharedGetConstructorDestructorAttrExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5501 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckVarDeclSizeAddressSpace(), clang::Sema::Context, clang::cuda_device, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5676 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::ForThisTarget, clang::Sema::getASTContext(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), handleCallConvAttr(), handleGlobalAttr(), clang::handleSimpleAttribute(), int, clang::NamedDecl::isExternallyVisible(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::LangOptions::isTargetDevice(), and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 828 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentBuiltinFunction, clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::cast(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArg(), clang::ParsedAttr::getArgAsExpr(), clang::Stmt::getBeginLoc(), clang::FunctionDecl::getBuiltinID(), clang::QualType::getCanonicalType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::ParsedAttr::isArgExpr(), clang::T, uint32_t, and clang::Union.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 906 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), checkFunctionConditionAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Stmt::getBeginLoc(), clang::DiagnosticsEngine::getDiagnosticIDs(), clang::Sema::getDiagnostics(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6781 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::SourceRange::getBegin(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), clang::isa(), clang::FunctionDecl::isInlined(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeDLLImportAttr(), and clang::TargetInfo::shouldDLLImportComdatSymbols().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 744 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Sema::Context, clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7306 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), findEnforceTCBAttrByName(), clang::AttributeCommonInfo::getAttrName(), clang::AttributeCommonInfo::getLoc(), and clang::IdentifierInfo::getName().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3934 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 753 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::mergeErrorAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 761 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttrs(), clang::Decl::getDeclContext(), clang::getDLLAttr(), clang::AttributeCommonInfo::getLoc(), clang::DeclContext::getRedeclContext(), clang::isa(), and clang::Attr::isInherited().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3092 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 1237 of file SemaDeclAttr.cpp.
References clang::cast(), clang::Sema::ExtVectorDecls, clang::isa(), and clang::LazyVector< T, Loader, LoadedStorage, LocalStorage >::push_back().
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((format_arg((idx)))) attribute based on https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html.
Definition at line 3956 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Type::castAs(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), clang::ParamIdx::getASTIndex(), clang::getFunctionOrMethodParamRange(), clang::getFunctionOrMethodParamType(), clang::getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getObjCInstanceTypeDecl(), clang::ASTContext::getObjCObjectPointerType(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::ASTContext::getTypedefType(), clang::Interface, clang::SemaObjC::isCFStringType(), clang::Type::isCharType(), clang::SemaObjC::isNSStringType(), clang::Type::isPointerType(), clang::None, and clang::Sema::ObjC().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4222 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), FormatAttrCommon::FormatStringIdx, clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::Stmt::getSourceRange(), handleFormatAttrCommon(), FormatAttrCommon::Identifier, clang::isFunctionOrMethodVariadic(), FormatAttrCommon::Kind, clang::Sema::mergeFormatAttr(), FormatAttrCommon::NumArgs, StrftimeFormat, and uint32_t.
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((format(type,idx,firstarg))) attributes based on https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html.
Definition at line 4147 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Type::castAs(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), FormatAttrCommon::FormatStringIdx, clang::IdentifierTable::get(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), getFormatAttrKind(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamRange(), clang::getFunctionOrMethodParamType(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::hasImplicitObjectParameter(), FormatAttrCommon::Identifier, clang::ASTContext::Idents, IgnoredFormat, InvalidFormat, clang::ParsedAttr::isArgIdent(), clang::SemaObjC::isCFStringType(), clang::Type::isCharType(), clang::SemaObjC::isNSStringType(), clang::Type::isPointerType(), FormatAttrCommon::Kind, normalizeName(), FormatAttrCommon::NumArgs, and clang::Sema::ObjC().
Referenced by handleFormatAttr(), and handleFormatMatchesAttr().
|
static |
Definition at line 4273 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::SemaBase::Diag(), FormatAttrCommon::FormatStringIdx, clang::ParsedAttr::getArgAsExpr(), clang::Sema::GetFormatStringType(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::Stmt::getSourceRange(), handleFormatAttrCommon(), FormatAttrCommon::Identifier, clang::Expr::IgnoreParenImpCasts(), clang::Sema::mergeFormatMatchesAttr(), and clang::Sema::ValidateFormatString().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7137 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), and clang::Decl::dropAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6632 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::First, clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5457 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::DeclaratorDecl::getBeginLoc(), clang::ParsedAttr::getKind(), clang::Sema::getLangOpts(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::Decl::hasAttr(), clang::FunctionDecl::isInlineSpecified(), clang::Type::isInstantiationDependentType(), clang::SourceRange::isValid(), clang::Type::isVoidType(), and clang::Sema::LangOpts.
Referenced by handleDeviceKernelAttr(), and ProcessDeclAttribute().
|
static |
Definition at line 5543 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Sema::LangOpts, and clang::SC_Extern.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5534 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::isInvalidDecl().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 537 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7250 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1781 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::FunctionDecl::isThisDeclarationADefinition(), and markUsedForAliasOrIfunc().
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((init_priority(priority))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html.
Definition at line 4031 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Sema::getCurFunctionOrMethodDecl(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), clang::ParsedAttr::setInvalid(), and uint32_t.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7073 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Internal, and clang::Sema::mergeInternalLinkageAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6702 of file SemaDeclAttr.cpp.
References clang::Sema::ARM(), clang::Sema::AVR(), clang::Sema::Context, clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::SemaX86::handleAnyInterruptAttr(), clang::SemaARM::handleInterruptAttr(), clang::SemaAVR::handleInterruptAttr(), clang::SemaM68k::handleInterruptAttr(), clang::SemaMIPS::handleInterruptAttr(), clang::SemaMSP430::handleInterruptAttr(), clang::SemaRISCV::handleInterruptAttr(), clang::Sema::M68k(), clang::Sema::MIPS(), clang::Sema::MSP430(), clang::Sema::RISCV(), and clang::Sema::X86().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6192 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 6734 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), clang::LangOptionsBase::MSVC2015, and uint32_t.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4504 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::Global, clang::Sema::ParseLifetimeCaptureByAttr(), clang::Decl::specific_attrs(), and Unknown.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5735 of file SemaDeclAttr.cpp.
References clang::checkAttrMutualExclusion(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::Decl::getCanonicalDecl(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::QualType::getTypePtrOrNull(), clang::ParsedAttr::hasParsedType(), clang::Type::isArrayType(), clang::Type::isReferenceType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::Decl::redecls().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 686 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 697 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1998 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckSpanLikeType(), clang::Sema::Context, and clang::getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5519 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckVarDeclSizeAddressSpace(), clang::Sema::Context, clang::cuda_device, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7196 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::Decl::getBeginLoc(), clang::getFunctionOrMethodResultType(), clang::handleSimpleAttribute(), clang::ASTContext::IntTy, clang::isa(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5411 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeMinSizeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3839 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::setInvalid(), and uint32_t.
Referenced by ProcessDeclAttribute().
|
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 5124 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Sema::AddModeAttr(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7500 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAttr(), clang::Expr::getExprLoc(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParsedAttr::isArgIdent(), modularFormatAttrsEquiv(), and clang::Valid.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7218 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::FunctionDecl::getReturnType(), clang::handleSimpleAttribute(), and clang::Type::isPointerOrReferenceType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6595 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::LangOptions::isCompatibleWithMSVC(), clang::FunctionDecl::isConsteval(), clang::FunctionDecl::isConstexprSpecified(), and clang::LangOptionsBase::MSVC2022_3.
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 6564 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ASTConsumer::AssignInheritanceModel(), AttributeLangSupport::C, clang::cast(), clang::Sema::Consumer, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getSemanticSpelling(), clang::Sema::LangOpts, and clang::Sema::mergeMSInheritanceAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6617 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::First, clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2086 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), Arch, clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedNonMemberFunction, clang::Sema::getASTContext(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::isa(), clang::AttributeCommonInfo::isDeclspecAttribute(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 962 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), clang::Decl::hasAttr(), and clang::Builtin::Context::isBuiltinFunc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2203 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::handleSimpleAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6297 of file SemaDeclAttr.cpp.
References clang::Sema::addNoClusterAttr(), Arch, clang::Sema::Context, clang::TargetOptions::CPU, clang::SemaBase::Diag(), clang::TargetOptions::FeatureMap, clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTargetOpts(), clang::TargetInfo::getTriple(), clang::TargetInfo::hasFeatureEnabled(), and clang::StringToOffloadArch().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5299 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1444 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::Decl::isInvalidDecl(), clang::Sema::isValidPointerAttrType(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7163 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 1358 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParamIdx::getASTIndex(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamRange(), clang::getFunctionOrMethodParamType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::Stmt::getSourceRange(), clang::Sema::inTemplateInstantiation(), clang::SourceLocation::isFileID(), clang::isFunctionOrMethodVariadic(), clang::Sema::isValidPointerAttrType(), and clang::T.
Referenced by handleNonNullAttrParameter(), and ProcessDeclAttribute().
|
static |
Definition at line 1414 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getFunctionType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), and handleNonNullAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5285 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getBeginLoc(), clang::Type::getPointeeOrArrayElementType(), clang::AttributeCommonInfo::getRange(), clang::Type::isAnyCharacterType(), clang::Type::isArrayType(), clang::Type::isPointerType(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7096 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5809 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::checkAttrMutualExclusion(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2175 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeCommonInfo::getLoc(), clang::hasDeclarator(), clang::isa(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7051 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7005 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), isGlobalVar(), isSanitizerAttributeAllowedOnGlobals(), and clang::parseSanitizerValue().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7066 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7059 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1308 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Decl::getDescribedTemplate(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7173 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6456 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::ExpectedClass, clang::SourceRange::getBegin(), clang::AttributeCommonInfo::getRange(), clang::handleSimpleAttribute(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::ParsedAttr::isUsedAsTypeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5416 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeOptimizeNoneAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1551 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::SemaBase::Diag(), clang::IdentifierTable::get(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::ParamIdx::getASTIndex(), clang::getFunctionOrMethodParamType(), clang::getFunctionOrMethodResultType(), clang::IdentifierLoc::getIdentifierInfo(), clang::Preprocessor::getIdentifierTable(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParamIdx::getSourceIndex(), clang::Stmt::getSourceRange(), clang::ParsedAttr::isArgIdent(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), normalizeName(), clang::Sema::PP, clang::Decl::specific_attrs(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1243 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlign(), and clang::Type::isIncompleteType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1114 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::getLoc(), clang::IdentifierInfo::getName(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1012 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Decl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), getType(), clang::Decl::hasAttr(), and uint32_t.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6387 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Sema::getAttrLoc(), clang::Stmt::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::Sema::isValidSectionSpecifier(), toString(), and uint32_t.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7593 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getAttrName(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), and clang::Sema::mergePersonalityAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1271 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::declaresSameEntity(), clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::T, and clang::Template.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6470 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::TypeLoc::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::TypeSourceInfo::getTypeLoc(), clang::ParsedAttr::hasParsedType(), and clang::Sema::RequireCompleteType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 546 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 521 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5802 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::checkAttrMutualExclusion(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6873 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6926 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6939 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1849 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParamIdx::getASTIndex(), clang::AttributeCommonInfo::getAttributeSpellingListIndex(), clang::QualType::getCanonicalType(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamType(), clang::getFunctionOrMethodResultSourceRange(), clang::getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::DeclarationNameInfo::getName(), clang::DeclRefExpr::getNameInfo(), clang::ParsedAttr::getNumArgs(), clang::ParamIdx::getSourceIndex(), clang::hasFunctionProto(), clang::Type::isAnyPointerType(), clang::Type::isBlockPointerType(), clang::Type::isPointerType(), clang::ParamIdx::isValid(), clang::Sema::NoteAllOverloadCandidates(), clang::ASTContext::OverloadTy, and clang::Sema::ResolveSingleFunctionTemplateSpecialization().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1434 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, clang::getFunctionOrMethodResultSourceRange(), and clang::getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1148 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::getLoc(), clang::IdentifierInfo::getName(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3529 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::checkSectionName(), clang::Sema::checkStringLiteralArgumentAttr(), clang::isa(), clang::Sema::mergeSectionAttr(), ASTContext::PSF_Execute, ASTContext::PSF_Read, and clang::Sema::UnifySection().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3196 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::cast(), clang::Type::castAs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionMethodOrBlock, clang::ParsedAttr::getArgAsExpr(), clang::Decl::getFunctionType(), clang::Expr::getIntegerConstantExpr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), getPointeeType(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::isa(), clang::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::Expr::isTypeDependent(), and V.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1193 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::cast(), checkForConsumableClass(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::getLoc(), clang::IdentifierInfo::getName(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5439 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::CheckVarDeclSizeAddressSpace(), clang::Sema::Context, clang::Sema::CUDA(), clang::cuda_shared, clang::SemaCUDA::CurrentTarget(), clang::SemaBase::Diag(), clang::SemaCUDA::DiagIfHostCode(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2188 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::ParsedAttr::getSemanticSpelling(), clang::Sema::getSourceManager(), clang::SourceManager::isInSystemMacro(), and clang::SourceLocation::isMacroID().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5714 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 3769 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 3780 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::ARM(), clang::checkAttrMutualExclusion(), clang::Sema::checkStringLiteralArgumentAttr(), clang::SemaARM::checkTargetClonesAttr(), clang::SemaPPC::checkTargetClonesAttr(), clang::SemaRISCV::checkTargetClonesAttr(), clang::SemaX86::checkTargetClonesAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::Other, clang::Sema::PPC(), clang::Sema::RISCV(), clang::TargetClones, and clang::Sema::X86().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3749 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::ARM(), clang::Sema::checkStringLiteralArgumentAttr(), clang::SemaARM::checkTargetVersionAttr(), clang::SemaRISCV::checkTargetVersionAttr(), clang::Sema::Context, clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::Sema::RISCV().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1215 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::cast(), checkForConsumableClass(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::getLoc(), clang::IdentifierInfo::getName(), and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1832 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and clang::SemaBase::Diag().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4630 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedUnion, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlign(), clang::ASTContext::getTypeSize(), clang::Type::hasFloatingRepresentation(), clang::TagDecl::isBeingDefined(), clang::TagDecl::isCompleteDefinition(), clang::Type::isIncompleteType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::TagDecl::isUnion(), and clang::Type::isVectorType().
Referenced by ProcessDeclAttribute(), and clang::Sema::ProcessDeclAttributeDelayed().
|
static |
Definition at line 6913 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkThreadSafetyAttrSubject(), checkTryLockFunAttrCommon(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6347 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedVariable, clang::ParsedAttr::getArgAsIdent(), clang::IdentifierLoc::getIdentifierInfo(), clang::ParsedAttr::getLayoutCompatible(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getMatchingCType(), clang::ParsedAttr::getMustBeNull(), clang::Sema::GetTypeFromParser(), clang::isa(), clang::ParsedAttr::isArgIdent(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7190 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, and clang::SD_Automatic.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7257 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getAttrName(), clang::IdentifierInfo::getName(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2308 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getScopeName(), and clang::AttributeCommonInfo::isCXX11Attribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6504 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), AttributeLangSupport::C, clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getMSGuidDecl(), clang::isHexDigit(), clang::AttributeCommonInfo::isMicrosoftAttribute(), clang::Sema::LangOpts, clang::Sema::mergeUuidAttr(), clang::MSGuidDeclParts::Part1, clang::MSGuidDeclParts::Part2, clang::MSGuidDeclParts::Part3, and clang::MSGuidDeclParts::Part4And5.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2254 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3461 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::ParsedAttr::hasParsedType(), clang::ASTContext::hasSameType(), clang::Type::isBooleanType(), clang::Type::isExtVectorType(), clang::Type::isFloatingType(), and clang::Type::isIntegralType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3148 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedTypeOrNamespace, clang::SourceRange::getBegin(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::hasProtectedVisibility(), clang::isa(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::Sema::mergeTypeVisibilityAttr(), clang::Sema::mergeVisibilityAttr(), and clang::ast_matchers::type.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7363 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::cast(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAttr(), clang::IdentifierLoc::getIdentifierInfo(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::getLoc(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), clang::ParsedAttr::isArgExpr(), clang::ParsedAttr::isArgIdent(), clang::ParsedAttr::setInvalid(), and uint32_t.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3289 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionOrClassOrEnum, clang::Decl::getFunctionType(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::FunctionType::getReturnType(), clang::AttributeCommonInfo::getScopeName(), clang::isa(), 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 3347 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Decl::canBeWeakImported(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedVariableOrFunction, clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::isa(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1691 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::DeclContext::getRedeclContext(), and clang::DeclContext::isFileContext().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3411 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Equal, clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::Expr::getIntegerConstantExpr(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), clang::Expr::isValueDependent(), and makeAttributeArgExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6374 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::ParsedAttr::getArgAsExpr(), and clang::ParamIdx::getSourceIndex().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7078 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), and clang::Decl::dropAttr().
Referenced by ProcessDeclAttribute().
Definition at line 6678 of file SemaDeclAttr.cpp.
References clang::Decl::specific_attrs().
Referenced by handleBTFDeclTagAttr(), and clang::Sema::mergeBTFDeclTagAttr().
True if T names a function to call: a function pointer, a function reference, or a reference to a function pointer.
Dependent types are also accepted, and re-checked after instantiation.
Definition at line 443 of file SemaDeclAttr.cpp.
References clang::T.
Referenced by clang::Sema::checkInstantiatedThreadSafetyAttrs(), checkThreadSafetyAttrSubject(), and checkThreadSafetyValueDeclIsFunPtr().
Definition at line 317 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), isCapabilityExpr(), and typeHasCapability().
Referenced by checkAttrArgsAreCapabilityObjs(), and isCapabilityExpr().
|
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 8959 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Decl::getLocation(), clang::ASTContext::getSourceManager(), clang::isa(), and clang::SourceManager::isInSystemHeader().
Referenced by handleDelayedForbiddenType().
Definition at line 4610 of file SemaDeclAttr.cpp.
References clang::T.
Referenced by handleCalledOnceAttr().
Definition at line 6994 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
Check if the passed-in expression is of type int or bool.
Definition at line 170 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().
Referenced by checkTryLockFunAttrCommon().
Definition at line 8558 of file SemaDeclAttr.cpp.
References clang::CC_DeviceKernel, clang::FunctionType::getCallConv(), clang::Decl::getFunctionType(), and clang::Decl::hasAttr().
Referenced by clang::Sema::ProcessDeclAttributeList().
|
static |
Definition at line 2113 of file SemaDeclAttr.cpp.
References clang::FunctionDecl::getBody(), and clang::isa().
Referenced by clang::inferNoReturnAttr().
|
static |
Definition at line 7000 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
|
static |
Definition at line 3551 of file SemaDeclAttr.cpp.
Referenced by handleCodeModelAttr().
|
static |
Definition at line 3373 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::ASTContext::getConstType(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::InitializedEntity::InitializeParameter(), clang::ASTContext::IntTy, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isValueDependent(), clang::Sema::PerformCopyInitialization(), and toString().
Referenced by handleWorkGroupSize().
|
static |
Definition at line 6202 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::ConstantExpr::Create(), clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::getASTContext(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::Expr::isInstantiationDependent(), and toString().
Referenced by clang::Sema::createClusterDimsAttr().
|
static |
Definition at line 6097 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::ASTContext::getConstType(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::InitializedEntity::InitializeParameter(), clang::ASTContext::IntTy, clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isValueDependent(), clang::Sema::PerformCopyInitialization(), and toString().
Referenced by clang::Sema::CreateLaunchBoundsAttr().
|
static |
Definition at line 1753 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::createMangleContext(), clang::IdentifierTable::get(), clang::Sema::getASTContext(), clang::ASTContext::getCXXABIKind(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::Idents, clang::isa(), clang::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::Target, and clang::Sema::TUScope.
Referenced by handleAliasAttr(), and handleIFuncAttr().
|
static |
Definition at line 7331 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Decl::dropAttr(), findEnforceTCBAttrByName(), and clang::Sema::getASTContext().
Referenced by clang::Sema::mergeEnforceTCBAttr(), and clang::Sema::mergeEnforceTCBLeafAttr().
|
static |
Definition at line 3122 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::T.
|
static |
Definition at line 7476 of file SemaDeclAttr.cpp.
Referenced by handleModularFormat(), and clang::Sema::mergeModularFormatAttr().
|
static |
Definition at line 7551 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::acceptsExprPack(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getNumArgMembers(), clang::ParsedAttr::getNumArgs(), clang::ParsedAttr::hasVariadicArg(), clang::isa(), 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 1542 of file SemaDeclAttr.cpp.
|
static |
parseModeAttrArg - Parses attribute mode string and returns parsed type attribute.
Definition at line 5053 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 7607 of file SemaDeclAttr.cpp.
References clang::SemaSwift::AddParameterABIAttr(), clang::SemaObjC::AddXConsumedAttr(), clang::Sema::AMDGPU(), clang::Sema::ARM(), clang::Sema::AVR(), clang::Sema::BPF(), clang::Sema::checkCommonAttributeFeatures(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::DiagnoseUnknownAttribute(), clang::ParsedAttr::existsInTarget(), clang::AttributeCommonInfo::getAttrName(), clang::ParsedAttr::getInfo(), clang::ParsedAttr::getKind(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), handleAbiTagAttr(), clang::SemaOpenCL::handleAccessAttr(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), handleAcquireHandleAttr(), handleAliasAttr(), handleAlignedAttr(), handleAlignValueAttr(), handleAllocAlignAttr(), handleAllocSizeAttr(), handleAlwaysInlineAttr(), clang::SemaAMDGPU::handleAMDGPUFlatWorkGroupSizeAttr(), clang::SemaAMDGPU::handleAMDGPUMaxNumWorkGroupsAttr(), clang::SemaAMDGPU::handleAMDGPUNumSGPRAttr(), clang::SemaAMDGPU::handleAMDGPUNumVGPRAttr(), clang::SemaAMDGPU::handleAMDGPUWavesPerEUAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArgumentWithTypeTagAttr(), handleAssertCapabilityAttr(), handleAssumeAlignedAttr(), clang::SemaSwift::handleAsyncAttr(), clang::SemaSwift::handleAsyncError(), clang::SemaSwift::handleAsyncName(), clang::SemaSwift::handleAttrAttr(), clang::ParsedAttr::handleAttrWithDelayedArgs(), handleAttrWithMessage(), handleAvailabilityAttr(), handleAvailableOnlyInDefaultEvalMethod(), clang::SemaObjC::handleBlocksAttr(), clang::SemaObjC::handleBoxable(), clang::SemaSwift::handleBridge(), clang::SemaObjC::handleBridgeAttr(), clang::SemaObjC::handleBridgeMutableAttr(), clang::SemaObjC::handleBridgeRelatedAttr(), handleBTFDeclTagAttr(), clang::SemaARM::handleBuiltinAliasAttr(), handleBuiltinAliasAttr(), handleCallableWhenAttr(), handleCallbackAttr(), handleCallConvAttr(), handleCalledOnceAttr(), handleCapabilityAttr(), handleCFGuardAttr(), handleCFIUncheckedCalleeAttr(), handleCleanupAttr(), handleClusterDimsAttr(), clang::SemaARM::handleCmseNSEntryAttr(), handleCodeModelAttr(), handleCodeSegAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleCountedByAttrField(), handleCPUSpecificAttr(), clang::ParsedAttrInfo::handleDeclAttribute(), handleDeclspecThreadAttr(), handleDeprecatedAttr(), clang::SemaObjC::handleDesignatedInitializer(), handleDestroyAttr(), handleDestructorAttr(), handleDeviceAttr(), handleDeviceKernelAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), clang::SemaObjC::handleDirectAttr(), clang::SemaObjC::handleDirectMembersAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnforceTCBAttr(), handleEnumExtensibilityAttr(), clang::SemaSwift::handleError(), handleErrorAttr(), handleExcludeFromExplicitInstantiationAttr(), clang::SemaObjC::handleExternallyRetainedAttr(), handleExternalSourceSymbolAttr(), handleExtVectorTypeAttr(), clang::SemaX86::handleForceAlignArgPointerAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFormatMatchesAttr(), handleFunctionReturnThunksAttr(), handleGCCStructAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGridConstantAttr(), handleGuardedByAttr(), handleHandleAttr(), clang::SemaObjC::handleIBOutlet(), clang::SemaObjC::handleIBOutletCollection(), handleIFuncAttr(), clang::SemaObjC::handleIndependentClass(), handleInitPriorityAttr(), handleInternalLinkageAttr(), clang::SemaHLSL::handleInterpolationModifierAttr(), handleInterruptAttr(), clang::SemaARM::handleInterruptSaveFPAttr(), clang::SemaSYCL::handleKernelAttr(), clang::SemaSYCL::handleKernelEntryPointAttr(), handleLaunchBoundsAttr(), handleLayoutVersion(), handleLifetimeCaptureByAttr(), handleLifetimeCategoryAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleMallocSpanAttr(), handleManagedAttr(), clang::SemaObjC::handleMethodFamilyAttr(), handleMIGServerRoutineAttr(), handleMinSizeAttr(), handleMinVectorWidthAttr(), handleModeAttr(), handleModularFormat(), handleMSAllocatorAttr(), handleMSConstexprAttr(), handleMSInheritanceAttr(), handleMSStructAttr(), handleNakedAttr(), clang::SemaSwift::handleName(), clang::SemaARM::handleNewAttr(), clang::SemaSwift::handleNewType(), handleNoBuiltinAttr(), handleNoCfCheckAttr(), handleNoClusterAttr(), handleNoDebugAttr(), handleNoEscapeAttr(), handleNoMergeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNonStringAttr(), handleNoPFPAttrField(), handleNoRandomizeLayoutAttr(), handleNoReturnAttr(), handleNoSanitizeAddressAttr(), handleNoSanitizeAttr(), handleNoSanitizeMemoryAttr(), handleNoSanitizeThreadAttr(), handleNoSpecializations(), clang::SemaOpenCL::handleNoSVMAttr(), handleNoUniqueAddressAttr(), clang::SemaObjC::handleNSErrorDomain(), clang::SemaObjC::handleNSObject(), handleNullableTypeAttr(), clang::SemaHLSL::handleNumThreadsAttr(), clang::SemaOpenMP::handleOMPAssumeAttr(), handleOptimizeNoneAttr(), clang::SemaObjC::handleOwnershipAttr(), handleOwnershipAttr(), handlePackedAttr(), clang::SemaHLSL::handlePackOffsetAttr(), clang::SemaHLSL::handleParamModifierAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handlePersonalityAttr(), clang::SemaObjC::handlePreciseLifetimeAttr(), handlePreferredName(), handlePreferredTypeAttr(), clang::SemaBPF::handlePreserveAccessIndexAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleRandomizeLayoutAttr(), handleReentrantCapabilityAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), clang::SemaObjC::handleRequiresSuperAttr(), clang::SemaHLSL::handleResourceBindingAttr(), handleRestrictAttr(), clang::SemaObjC::handleReturnsInnerPointerAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), clang::SemaHLSL::handleRootSignatureAttr(), clang::SemaObjC::handleRuntimeName(), handleSectionAttr(), clang::SemaHLSL::handleSemanticAttr(), handleSentinelAttr(), handleSetTypestateAttr(), clang::SemaHLSL::handleShaderAttr(), handleSharedAttr(), clang::SemaAVR::handleSignalAttr(), clang::handleSimpleAttribute(), clang::handleSimpleAttributeOrDiagnose(), handleStandardNoReturnAttr(), clang::SemaOpenCL::handleSubGroupSize(), clang::SemaObjC::handleSuppresProtocolAttr(), handleSuppressAttr(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUninitializedAttr(), handleUnsafeBufferUsage(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), clang::SemaHLSL::handleVkBindingAttr(), clang::SemaHLSL::handleVkConstantIdAttr(), clang::SemaHLSL::handleVkExtBuiltinInputAttr(), clang::SemaHLSL::handleVkExtBuiltinOutputAttr(), clang::SemaHLSL::handleVkLocationAttr(), clang::SemaHLSL::handleVkPushConstantAttr(), handleVTablePointerAuthentication(), handleWarnUnusedResult(), clang::SemaHLSL::handleWaveSizeAttr(), handleWeakImportAttr(), handleWeakRefAttr(), clang::SemaWasm::handleWebAssemblyExportNameAttr(), clang::SemaWasm::handleWebAssemblyImportModuleAttr(), clang::SemaWasm::handleWebAssemblyImportNameAttr(), handleWorkGroupSize(), handleXRayLogArgsAttr(), clang::SemaObjC::handleXReturnsXRetainedAttr(), handleZeroCallUsedRegsAttr(), clang::Sema::HLSL(), clang::AttributeCommonInfo::IgnoredAttribute, clang::Sema::ProcessDeclAttributeOptions::IgnoreTypeAttributes, clang::Sema::ProcessDeclAttributeOptions::IncludeCXX11Attributes, clang::isa(), clang::AttributeCommonInfo::isC23Attribute(), 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(), clang::SemaObjC::isValidOSObjectOutParameter(), MustDelayAttributeArguments(), clang::ParsedAttrInfo::NotHandled, clang::Sema::ObjC(), clang::Sema::OpenCL(), clang::Sema::OpenMP(), clang::FunctionDecl::parameters(), clang::SemaObjC::parsedAttrToRetainOwnershipKind(), clang::ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior(), clang::Sema::Swift(), clang::SwiftAsyncContext, clang::SwiftContext, clang::SwiftErrorResult, clang::SwiftIndirectResult, clang::Sema::SYCL(), clang::AttributeCommonInfo::UnknownAttribute, clang::Sema::Wasm(), and clang::Sema::X86().
Referenced by clang::Sema::ProcessAccessDeclAttributeList(), and clang::Sema::ProcessDeclAttributeList().
|
static |
Definition at line 2319 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::ConstantExpr::Create(), clang::SemaBase::Diag(), clang::ExprError(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isIntegerType(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and uint32_t.
Referenced by handleConstructorAttr(), and handleDestructorAttr().
|
static |
Returns true if the given availability attribute should be inferred, and adjusts the value of the attribute as necessary to facilitate that.
Definition at line 2651 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::SourceRange::getBegin(), clang::Sema::getDarwinSDKInfoForAvailabilityChecking(), clang::IdentifierInfo::getName(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::DarwinSDKInfo::getVersionMapping().
Referenced by handleAvailabilityAttr().
|
static |
Check if passed in Decl is a pointer type.
Note that this function may produce an error message.
Definition at line 213 of file SemaDeclAttr.cpp.
References clang::cast(), clang::SemaBase::Diag(), clang::Type::getAsRecordDecl(), clang::AttributeCommonInfo::getLoc(), clang::Type::isAnyPointerType(), and threadSafetyCheckIsSmartPointer().
Referenced by handlePtGuardedByAttr(), and handlePtGuardedVarAttr().
|
static |
Definition at line 178 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, and clang::DeclarationNameTable::getCXXOperatorName().
Referenced by checkRecordTypeForCapability(), and threadSafetyCheckIsPointer().
Definition at line 307 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 4813 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::ExpectedVariableFieldOrTag, clang::ExpectedVariableOrField, clang::isa(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::SC_Register.
Referenced by clang::Sema::AddAlignedAttr(), and clang::Sema::AddAlignedAttr().
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 2419 of file SemaDeclAttr.cpp.
References X.
Referenced by clang::Sema::mergeAvailabilityAttr().