|
clang 22.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/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/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/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/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 | checkFunParamsAreScopedLockable (Sema &S, const ParmVarDecl *ParamDecl, const ParsedAttr &AL) |
| static void | handlePtGuardedVarAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | checkGuardedByAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, Expr *&Arg) |
| static void | handleGuardedByAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handlePtGuardedByAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | checkAcquireOrderAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args) |
| static void | handleAcquiredAfterAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAcquiredBeforeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | checkLockFunAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args) |
| 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 | handleDependencyAttr (Sema &S, Scope *Scope, 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, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted) |
| static bool | versionsMatch (const VersionTuple &X, const VersionTuple &Y, bool BeforeIsOkay) |
| Check whether the two versions match. | |
| static void | handleAvailabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleExternalSourceSymbolAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| template<class T> | |
| static T * | mergeVisibilityAttr (Sema &S, Decl *D, const AttributeCommonInfo &CI, typename T::VisibilityType value) |
| static void | handleVisibilityAttr (Sema &S, Decl *D, const ParsedAttr &AL, bool isTypeVisibility) |
| static void | 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 | 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) |
| template<typename Attr> | |
| static void | handleUnsafeBufferUsage (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleCFGuardAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| template<typename AttrTy> | |
| static const AttrTy * | findEnforceTCBAttrByName (Decl *D, StringRef Name) |
| template<typename AttrTy, typename ConflictingAttrTy> | |
| static void | handleEnforceTCBAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| template<typename AttrTy, typename ConflictingAttrTy> | |
| static AttrTy * | mergeEnforceTCBAttrImpl (Sema &S, Decl *D, const AttrTy &AL) |
| static void | handleVTablePointerAuthentication (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | modularFormatAttrsEquiv (const ModularFormatAttr *Existing, 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 | ProcessDeclAttribute (Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) |
| ProcessDeclAttribute - Apply the specific attribute to the specified decl if the attribute applies to decls. | |
| static bool | isKernelDecl (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 3678 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1271 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 493 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().
|
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 343 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::DeclContext::getParent(), getRecordDecl(), clang::Expr::getType(), isCapabilityExpr(), clang::Expr::isTypeDependent(), and typeHasCapability().
Referenced by checkAcquireOrderAttrCommon(), checkGuardedByAttrCommon(), checkLockFunAttrCommon(), checkTryLockFunAttrCommon(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleReleaseCapabilityAttr(), and handleRequiresCapabilityAttr().
|
static |
Definition at line 2293 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), and clang::IdentifierInfo::getName().
Referenced by clang::Sema::mergeAvailabilityAttr().
|
static |
Definition at line 3316 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::isValidSectionSpecifier(), and toString().
Referenced by handleCodeSegAttr().
|
static |
Definition at line 993 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 652 of file SemaDeclAttr.cpp.
References clang::cast(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Cond, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::isa(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPotentialConstantExprUnevaluated(), and clang::Sema::PerformContextuallyConvertToBool().
Referenced by handleDiagnoseIfAttr(), and handleEnableIfAttr().
|
static |
Definition at line 436 of file SemaDeclAttr.cpp.
References checkRecordTypeForScopedCapability(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::AttributeCommonInfo::getLoc(), and clang::ValueDecl::getType().
Referenced by handleAcquireCapabilityAttr(), handleLocksExcludedAttr(), handleReleaseCapabilityAttr(), and handleRequiresCapabilityAttr().
|
static |
Definition at line 460 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleGuardedByAttr(), and handlePtGuardedByAttr().
|
static |
Definition at line 533 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 548 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 99 of file SemaDeclAttr.cpp.
References clang::Sema::checkUInt32Argument(), clang::SemaBase::Diag(), clang::Expr::getExprLoc(), toString(), and UINT_MAX.
Referenced by handleAllocSizeAttr().
|
static |
Definition at line 245 of file SemaDeclAttr.cpp.
References clang::Decl::hasAttr().
Referenced by checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), and checkRecordTypeForScopedCapability().
Definition at line 260 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), getRecordDecl(), and threadSafetyCheckIsSmartPointer().
Referenced by typeHasCapability().
Definition at line 278 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), and getRecordDecl().
Referenced by checkFunParamsAreScopedLockable().
|
static |
Definition at line 604 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 291 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 8175 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::DiagnoseUnknownAttribute(), clang::AttributeCommonInfo::IgnoredAttribute, and clang::AttributeCommonInfo::UnknownAttribute.
|
static |
Definition at line 6826 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 3689 of file SemaDeclAttr.cpp.
References CFStringFormat, clang::Default, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.
Referenced by handleFormatAttrCommon().
|
static |
Definition at line 6578 of file SemaDeclAttr.cpp.
References clang::AttributeCommonInfo::isStandardAttributeSyntax(), and clang::AttributeCommonInfo::setAttributeSpellingListIndex().
Referenced by handleNoSanitizeAddressAttr(), handleNoSanitizeMemoryAttr(), and handleNoSanitizeThreadAttr().
|
static |
Definition at line 86 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::hasParsedType().
|
static |
Definition at line 5664 of file SemaDeclAttr.cpp.
References clang::TargetInfo::getTargetOpts(), clang::TargetInfo::getTriple(), and clang::StringToOffloadArch().
|
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 233 of file SemaDeclAttr.cpp.
References clang::Type::getAsCanonical(), and clang::Type::getAsRecordDecl().
Referenced by checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), and checkRecordTypeForScopedCapability().
|
static |
Definition at line 6205 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 6446 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunParamsAreScopedLockable(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 513 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 523 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6775 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 1699 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 4372 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 4329 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignValueAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1384 of file SemaDeclAttr.cpp.
References clang::Sema::AddAllocAlignAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 567 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 5013 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::AttributeCommonInfo::getAttrName(), and clang::Sema::mergeAlwaysInlineAttr().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 2135 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 4322 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::CreateAnnotationAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5869 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 6437 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1378 of file SemaDeclAttr.cpp.
References clang::Sema::AddAssumeAlignedAttr(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2284 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 2521 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::DarwinSDKInfo::OSEnvPair::macOStoMacCatalystPair(), clang::Sema::mergeAvailabilityAttr(), clang::Min, clang::None, V, and clang::AvailabilityChange::Version.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6700 of file SemaDeclAttr.cpp.
References clang::handleSimpleAttribute(), and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6244 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and hasBTFDeclTagAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5986 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 1008 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 3983 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(), clang::ParsedAttr::isArgExpr(), clang::ParsedAttr::isArgIdent(), clang::Type::isFunctionPointerType(), and clang::FunctionDecl::parameters().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5148 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 4239 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 6404 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 6805 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 876 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 3545 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::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), 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 5837 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(), clang::SM_90, and clang::StringToOffloadArch().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3274 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 3346 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 1978 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 5029 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2262 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 973 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 6641 of file SemaDeclAttr.cpp.
References clang::Sema::BuildCountAttributedArrayOrPointerType(), clang::Sema::CheckCountedByAttrOnField(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getKind(), clang::ValueDecl::getType(), and clang::ValueDecl::setType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1906 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 6136 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 8431 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 2210 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Scope::FunctionDeclarationScope, clang::Scope::getFlags(), clang::AttributeCommonInfo::getLoc(), and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6504 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 6720 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 2275 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 5097 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5268 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 757 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, and clang::Union.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 835 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), checkFunctionConditionAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Cond, 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 6337 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), clang::isa(), clang::FunctionDecl::isInlined(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeDLLImportAttr(), and clang::TargetInfo::shouldDLLImportComdatSymbols().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 680 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Cond, clang::Sema::Context, clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6836 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 3616 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 689 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::mergeErrorAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 697 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), clang::DeclContext::getRedeclContext(), and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2818 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 1166 of file SemaDeclAttr.cpp.
References clang::cast(), clang::Sema::ExtVectorDecls, clang::isa(), and clang::LazyVector< T, Source, 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 3638 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 3912 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, and StrftimeFormat.
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 3837 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 3963 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 6680 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 6190 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 5061 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::FunctionDecl::isInlineSpecified(), clang::Type::isInstantiationDependentType(), clang::SourceRange::isValid(), clang::Type::isVoidType(), and clang::Sema::LangOpts.
Referenced by handleDeviceKernelAttr(), and ProcessDeclAttribute().
|
static |
Definition at line 5135 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 5126 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::isInvalidDecl().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 474 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6793 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1683 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 3713 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getBaseElementType(), clang::Sema::getCurFunctionOrMethodDecl(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), clang::ParsedAttr::setInvalid(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6618 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Internal, and clang::Sema::mergeInternalLinkageAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6260 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 5752 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 6290 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(), and clang::LangOptionsBase::MSVC2015.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4159 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::Decl::hasAttr(), and clang::Sema::ParseLifetimeCaptureByAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5327 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 621 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 632 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), checkFunParamsAreScopedLockable(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1900 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckSpanLikeType(), clang::Sema::Context, and clang::getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5113 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 6739 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 5019 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeMinSizeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3528 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(), and clang::ParsedAttr::setInvalid().
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 4745 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 7031 of file SemaDeclAttr.cpp.
References 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(), modularFormatAttrsEquiv(), and clang::Valid.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6761 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 6153 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 6122 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 6175 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 1988 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 891 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 2105 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::handleSimpleAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5856 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(), clang::SM_90, and clang::StringToOffloadArch().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4919 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1363 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 6706 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 1287 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 1333 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 4905 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 5401 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::checkAttrMutualExclusion(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2077 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 6596 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6550 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 6611 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6604 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1237 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 6716 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6014 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 5024 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeOptimizeNoneAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1471 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 1172 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 1043 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 941 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(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5945 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(), and toString().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1200 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 6028 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 482 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 453 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5394 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::checkAttrMutualExclusion(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6422 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 6470 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), checkFunParamsAreScopedLockable(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6483 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), checkFunParamsAreScopedLockable(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1751 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 1353 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, clang::getFunctionOrMethodResultSourceRange(), and clang::getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1077 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 3242 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 2913 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::cast(), clang::Type::castAs(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedFunctionMethodOrBlock, clang::ParsedAttr::getArgAsExpr(), clang::Decl::getFunctionType(), clang::Expr::getIntegerConstantExpr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), getPointeeType(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::isa(), clang::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::Expr::isTypeDependent(), and V.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1122 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 5045 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::Sema::CUDA(), 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 2090 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 5306 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 3464 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 3475 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::ARM(), clang::checkAttrMutualExclusion(), clang::Sema::checkStringLiteralArgumentAttr(), clang::SemaARM::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::RISCV(), clang::TargetClones, and clang::Sema::X86().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3444 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 1144 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 1734 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 4251 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ExpectedUnion, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlign(), clang::ASTContext::getTypeSize(), clang::Type::hasFloatingRepresentation(), clang::TagDecl::isBeingDefined(), clang::TagDecl::isCompleteDefinition(), clang::Type::isIncompleteType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::TagDecl::isUnion(), and clang::Type::isVectorType().
Referenced by ProcessDeclAttribute(), and clang::Sema::ProcessDeclAttributeDelayed().
|
static |
Definition at line 6460 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5905 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 6733 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, and clang::SD_Automatic.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6801 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2225 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 6062 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 2156 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 3174 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 2865 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 6893 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(), and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3002 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 3060 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 1593 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 3124 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 5932 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 6623 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 6236 of file SemaDeclAttr.cpp.
References clang::Decl::specific_attrs().
Referenced by handleBTFDeclTagAttr(), and clang::Sema::mergeBTFDeclTagAttr().
Definition at line 313 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 8396 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 4231 of file SemaDeclAttr.cpp.
References clang::T.
Referenced by handleCalledOnceAttr().
Definition at line 6539 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
Check if the passed-in expression is of type int or bool.
Definition at line 166 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().
Referenced by checkTryLockFunAttrCommon().
Definition at line 8029 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 2015 of file SemaDeclAttr.cpp.
References clang::FunctionDecl::getBody(), clang::FunctionDecl::hasBody(), and clang::isa().
Referenced by clang::inferNoReturnAttr().
|
static |
Definition at line 6545 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
|
static |
Definition at line 3264 of file SemaDeclAttr.cpp.
Referenced by handleCodeModelAttr().
|
static |
Definition at line 3086 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 5762 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::ConstantExpr::Create(), clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::Sema::getASTContext(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), clang::Expr::isInstantiationDependent(), and toString().
Referenced by clang::Sema::createClusterDimsAttr().
|
static |
Definition at line 5675 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 1655 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 6861 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 2839 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 7006 of file SemaDeclAttr.cpp.
Referenced by handleModularFormat(), and clang::Sema::mergeModularFormatAttr().
|
static |
Definition at line 7077 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 1462 of file SemaDeclAttr.cpp.
|
static |
parseModeAttrArg - Parses attribute mode string and returns parsed type attribute.
Definition at line 4674 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 7110 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(), handleDependencyAttr(), handleDeprecatedAttr(), clang::SemaObjC::handleDesignatedInitializer(), handleDestroyAttr(), handleDestructorAttr(), handleDeviceAttr(), handleDeviceKernelAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), clang::SemaObjC::handleDirectAttr(), clang::SemaObjC::handleDirectMembersAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnforceTCBAttr(), handleEnumExtensibilityAttr(), clang::SemaSwift::handleError(), handleErrorAttr(), handleExcludeFromExplicitInstantiationAttr(), clang::SemaObjC::handleExternallyRetainedAttr(), handleExternalSourceSymbolAttr(), handleExtVectorTypeAttr(), clang::SemaX86::handleForceAlignArgPointerAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFormatMatchesAttr(), handleFunctionReturnThunksAttr(), handleGCCStructAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGridConstantAttr(), handleGuardedByAttr(), handleHandleAttr(), clang::SemaObjC::handleIBOutlet(), clang::SemaObjC::handleIBOutletCollection(), handleIFuncAttr(), clang::SemaObjC::handleIndependentClass(), handleInitPriorityAttr(), handleInternalLinkageAttr(), 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(), 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(), clang::SemaObjC::handlePreciseLifetimeAttr(), handlePreferredName(), handlePreferredTypeAttr(), clang::SemaBPF::handlePreserveAccessIndexAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleRandomizeLayoutAttr(), handleReentrantCapabilityAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), clang::SemaObjC::handleRequiresSuperAttr(), clang::SemaHLSL::handleResourceBindingAttr(), handleRestrictAttr(), clang::SemaObjC::handleReturnsInnerPointerAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), clang::SemaHLSL::handleRootSignatureAttr(), clang::SemaObjC::handleRuntimeName(), handleSectionAttr(), clang::SemaHLSL::handleSemanticAttr(), handleSentinelAttr(), handleSetTypestateAttr(), clang::SemaHLSL::handleShaderAttr(), handleSharedAttr(), clang::SemaAVR::handleSignalAttr(), clang::handleSimpleAttribute(), clang::handleSimpleAttributeOrDiagnose(), handleStandardNoReturnAttr(), clang::SemaOpenCL::handleSubGroupSize(), clang::SemaObjC::handleSuppresProtocolAttr(), handleSuppressAttr(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUninitializedAttr(), handleUnsafeBufferUsage(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), clang::SemaHLSL::handleVkBindingAttr(), clang::SemaHLSL::handleVkConstantIdAttr(), clang::SemaHLSL::handleVkExtBuiltinInputAttr(), clang::SemaHLSL::handleVkLocationAttr(), clang::SemaHLSL::handleVkPushConstantAttr(), handleVTablePointerAuthentication(), handleWarnUnusedResult(), clang::SemaHLSL::handleWaveSizeAttr(), handleWeakImportAttr(), handleWeakRefAttr(), clang::SemaWasm::handleWebAssemblyExportNameAttr(), clang::SemaWasm::handleWebAssemblyImportModuleAttr(), clang::SemaWasm::handleWebAssemblyImportNameAttr(), handleWorkGroupSize(), handleXRayLogArgsAttr(), clang::SemaObjC::handleXReturnsXRetainedAttr(), handleZeroCallUsedRegsAttr(), clang::Sema::HLSL(), clang::AttributeCommonInfo::IgnoredAttribute, clang::Sema::ProcessDeclAttributeOptions::IgnoreTypeAttributes, clang::Sema::ProcessDeclAttributeOptions::IncludeCXX11Attributes, clang::isa(), clang::AttributeCommonInfo::isC23Attribute(), clang::AttributeCommonInfo::isClangScope(), clang::AttributeCommonInfo::isCXX11Attribute(), clang::AttributeCommonInfo::isDeclspecAttribute(), clang::ParsedAttr::isInvalid(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::AttributeCommonInfo::isStandardAttributeSyntax(), clang::ParsedAttr::isStmtAttr(), clang::ParsedAttr::isTypeAttr(), clang::ParsedAttr::isUsedAsTypeAttr(), clang::SemaObjC::isValidOSObjectOutParameter(), MustDelayAttributeArguments(), clang::ParsedAttrInfo::NotHandled, clang::Sema::ObjC(), clang::Sema::OpenCL(), clang::Sema::OpenMP(), clang::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 2236 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(), and clang::Expr::isValueDependent().
Referenced by handleConstructorAttr(), and handleDestructorAttr().
|
static |
Check if passed in Decl is a pointer type.
Note that this function may produce an error message.
Definition at line 209 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 174 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, and clang::DeclarationNameTable::getCXXOperatorName().
Referenced by checkRecordTypeForCapability(), and threadSafetyCheckIsPointer().
Definition at line 303 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 4434 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 2336 of file SemaDeclAttr.cpp.
References X.
Referenced by clang::Sema::mergeAvailabilityAttr().