|
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/SemaHexagon.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) |
| template<typename... AttrTypes> | |
| static bool | isAttrWithoutArgs (const Attr *A) |
| 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 4039 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1385 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 598 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 8621 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(), uint64_t, 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 348 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::TagDecl::isCompleteDefinition(), clang::Expr::isTypeDependent(), typeHasCapability(), and uint64_t.
Referenced by checkAcquireOrderAttrCommon(), checkGuardedByAttrCommon(), checkLockFunAttrCommon(), checkTryLockFunAttrCommon(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleReleaseCapabilityAttr(), and handleRequiresCapabilityAttr().
|
static |
Definition at line 2419 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), and clang::IdentifierInfo::getName().
Referenced by clang::Sema::mergeAvailabilityAttr().
|
static |
Definition at line 3646 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::isValidSectionSpecifier(), and toString().
Referenced by handleCodeSegAttr().
|
static |
Definition at line 1107 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 759 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 472 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 568 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkAtLeastNumArgs(), and checkAttrArgsAreCapabilityObjs().
Referenced by handleGuardedByAttr(), and handlePtGuardedByAttr().
|
static |
Definition at line 638 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 653 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 104 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 250 of file SemaDeclAttr.cpp.
References clang::Decl::hasAttr().
Referenced by checkAttrArgsAreCapabilityObjs(), clang::Sema::CheckFieldCapabilityAttrs(), checkRecordTypeForCapability(), and checkRecordTypeForScopedCapability().
Definition at line 265 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), getRecordDecl(), and threadSafetyCheckIsSmartPointer().
Referenced by typeHasCapability().
Definition at line 283 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), and getRecordDecl().
Referenced by checkFunParamsAreScopedLockable().
|
static |
Definition at line 487 of file SemaDeclAttr.cpp.
References checkFunParamsAreScopedLockable(), checkThreadSafetyValueDeclIsFunPtr(), clang::isa(), and isCallbackOrDependent().
Referenced by handleAcquireCapabilityAttr(), handleAssertCapabilityAttr(), handleLockReturnedAttr(), 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 463 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 709 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 296 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 8794 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::DiagnoseUnknownAttribute(), clang::AttributeCommonInfo::IgnoredAttribute, and clang::AttributeCommonInfo::UnknownAttribute.
|
static |
Definition at line 7346 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 4050 of file SemaDeclAttr.cpp.
References CFStringFormat, clang::Default, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.
Referenced by handleFormatAttrCommon().
|
static |
Definition at line 7083 of file SemaDeclAttr.cpp.
References clang::AttributeCommonInfo::isStandardAttributeSyntax(), and clang::AttributeCommonInfo::setAttributeSpellingListIndex().
Referenced by handleNoSanitizeAddressAttr(), handleNoSanitizeMemoryAttr(), and handleNoSanitizeThreadAttr().
|
static |
Definition at line 91 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::hasParsedType().
|
static |
Definition at line 6128 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 238 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 6697 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 6950 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 618 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 628 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7282 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 1840 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 4793 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 4750 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignValueAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1508 of file SemaDeclAttr.cpp.
References clang::Sema::AddAllocAlignAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 672 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 5435 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 2276 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 4743 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::CreateAnnotationAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6361 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 6938 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1502 of file SemaDeclAttr.cpp.
References clang::Sema::AddAssumeAlignedAttr(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2410 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 2766 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 7207 of file SemaDeclAttr.cpp.
References clang::handleSimpleAttribute(), and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6736 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and hasBTFDeclTagAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6478 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 1122 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 4335 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(), uint32_t, and unsigned.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5598 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 4660 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 6905 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 7325 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 990 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 3899 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 6327 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 3604 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 3676 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 2119 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 5463 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 2388 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 1087 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 7150 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 2047 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 6628 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 9056 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 7009 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 7227 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 2401 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 5543 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 5718 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 871 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 949 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 6831 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 787 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 7356 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 3977 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 796 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::mergeErrorAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 804 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 3135 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 1280 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 3999 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 4264 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 4190 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 4315 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 7187 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 6682 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 5499 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 5585 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 5576 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::isInvalidDecl().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 577 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7300 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1824 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 4074 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 7123 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Internal, and clang::Sema::mergeInternalLinkageAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6752 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 6234 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 6784 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 4546 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 5777 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 726 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 740 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2041 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckSpanLikeType(), clang::Sema::Context, and clang::getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5561 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 7246 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 5453 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeMinSizeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3882 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 5166 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 7550 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 7268 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 6645 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 6614 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 6667 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 2129 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 1005 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 2246 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::handleSimpleAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6347 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 5341 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1487 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 7213 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 1401 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 1457 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 5327 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 7146 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5851 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::checkAttrMutualExclusion(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2218 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 7101 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7055 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 7116 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7109 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1351 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 7223 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6506 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 5458 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeOptimizeNoneAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1594 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 1286 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 1157 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 1055 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 6437 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 7643 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 1314 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 6520 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 586 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 561 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5844 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::checkAttrMutualExclusion(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6923 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 6976 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6989 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), checkThreadSafetyAttrSubject(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1892 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 1477 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, clang::getFunctionOrMethodResultSourceRange(), and clang::getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1191 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 3572 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 3239 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(), unsigned, and V.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1236 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 5481 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 2231 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 5756 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 3812 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 3823 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 3792 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 1258 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 1875 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 4672 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(), clang::Type::isVectorType(), and uint64_t.
Referenced by ProcessDeclAttribute(), and clang::Sema::ProcessDeclAttributeDelayed().
|
static |
Definition at line 6963 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkThreadSafetyAttrSubject(), checkTryLockFunAttrCommon(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6397 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 7240 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, and clang::SD_Automatic.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7307 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 2351 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 6554 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 2297 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 3504 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 3191 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 7413 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 3332 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 3390 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 1734 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 3454 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 6424 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 7128 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 6728 of file SemaDeclAttr.cpp.
References clang::Decl::specific_attrs().
Referenced by handleBTFDeclTagAttr(), and clang::Sema::mergeBTFDeclTagAttr().
Definition at line 531 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::CheckFieldCapabilityAttrs().
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 455 of file SemaDeclAttr.cpp.
References clang::T.
Referenced by clang::Sema::checkInstantiatedThreadSafetyAttrs(), checkThreadSafetyAttrSubject(), and checkThreadSafetyValueDeclIsFunPtr().
Definition at line 318 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 9021 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 4652 of file SemaDeclAttr.cpp.
References clang::T.
Referenced by handleCalledOnceAttr().
Definition at line 7044 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
Check if the passed-in expression is of type int or bool.
Definition at line 171 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().
Referenced by checkTryLockFunAttrCommon().
Definition at line 8614 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 2156 of file SemaDeclAttr.cpp.
References clang::FunctionDecl::getBody(), and clang::isa().
Referenced by clang::inferNoReturnAttr().
|
static |
Definition at line 7050 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
|
static |
Definition at line 3594 of file SemaDeclAttr.cpp.
Referenced by handleCodeModelAttr().
|
static |
Definition at line 3416 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 6244 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::ConstantExpr::Create(), clang::Sema::DefaultLvalueConversion(), 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 6139 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 1796 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 7381 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 3165 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 7526 of file SemaDeclAttr.cpp.
Referenced by handleModularFormat(), and clang::Sema::mergeModularFormatAttr().
|
static |
Definition at line 7601 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 1585 of file SemaDeclAttr.cpp.
|
static |
parseModeAttrArg - Parses attribute mode string and returns parsed type attribute.
Definition at line 5095 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 7657 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::SemaHexagon::handleHLXVectorStackLimitAttr(), 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(), clang::SemaSYCL::handleSYCLExternalAttr(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUninitializedAttr(), handleUnsafeBufferUsage(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), clang::SemaHLSL::handleVkBindingAttr(), clang::SemaHLSL::handleVkBuiltInAttr(), 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::Hexagon(), 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 2362 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 2694 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 214 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 179 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, and clang::DeclarationNameTable::getCXXOperatorName().
Referenced by checkRecordTypeForCapability(), and threadSafetyCheckIsPointer().
Definition at line 308 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 4855 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 2462 of file SemaDeclAttr.cpp.
References X.
Referenced by clang::Sema::mergeAvailabilityAttr().