|
clang 23.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/SemaInternal.h"#include "clang/Sema/SemaM68k.h"#include "clang/Sema/SemaMIPS.h"#include "clang/Sema/SemaMSP430.h"#include "clang/Sema/SemaObjC.h"#include "clang/Sema/SemaOpenCL.h"#include "clang/Sema/SemaOpenMP.h"#include "clang/Sema/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, const IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted) |
| static bool | versionsMatch (const VersionTuple &X, const VersionTuple &Y, bool BeforeIsOkay) |
| Check whether the two versions match. | |
| static bool | shouldInferAvailabilityAttribute (const ParsedAttr &AL, IdentifierInfo *&II, bool &IsUnavailable, VersionTuple &Introduced, VersionTuple &Deprecated, VersionTuple &Obsolete, Sema &S) |
| Returns true if the given availability attribute should be inferred, and adjusts the value of the attribute as necessary to facilitate that. | |
| static void | handleAvailabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleExternalSourceSymbolAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| template<class T> | |
| static T * | mergeVisibilityAttr (Sema &S, Decl *D, const AttributeCommonInfo &CI, typename T::VisibilityType value) |
| static void | handleVisibilityAttr (Sema &S, Decl *D, const ParsedAttr &AL, bool isTypeVisibility) |
| static void | handleSentinelAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleWarnUnusedResult (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleWeakImportAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| template<class Attribute> | |
| static Expr * | makeAttributeArgExpr (Sema &S, Expr *E, const Attribute &Attr, const unsigned Idx) |
| template<typename WorkGroupAttr> | |
| static void | handleWorkGroupSize (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleVecTypeHint (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleSectionAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | isValidCodeModelAttr (llvm::Triple &Triple, StringRef Str) |
| static void | handleCodeModelAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | checkCodeSegName (Sema &S, SourceLocation LiteralLoc, StringRef CodeSegName) |
| static void | handleCodeSegAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleTargetVersionAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleTargetAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleTargetClonesAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMinVectorWidthAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleCleanupAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleEnumExtensibilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleFormatArgAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| Handle attribute((format_arg((idx)))) attribute based on https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html. | |
| static FormatAttrKind | getFormatAttrKind (StringRef Format) |
| getFormatAttrKind - Map from format attribute names to supported format types. | |
| static void | handleInitPriorityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| Handle attribute((init_priority(priority))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html. | |
| static bool | handleFormatAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, FormatAttrCommon *Info) |
| Handle attribute((format(type,idx,firstarg))) attributes based on https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html. | |
| static void | handleFormatAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleFormatMatchesAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleCallbackAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes. | |
| static void | handleLifetimeCaptureByAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | isFunctionLike (const Type &T) |
| static void | handleCalledOnceAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| Handle 'called_once' attribute. | |
| static void | handleTransparentUnionAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAnnotateAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAlignValueAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAlignedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | validateAlignasAppliedType (Sema &S, Decl *D, const AlignedAttr &Attr, SourceLocation AttrLoc) |
| Perform checking of type validity. | |
| static void | parseModeAttrArg (Sema &S, StringRef Str, unsigned &DestWidth, bool &IntegerMode, bool &ComplexMode, FloatModeKind &ExplicitType) |
| parseModeAttrArg - Parses attribute mode string and returns parsed type attribute. | |
| static void | handleModeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| handleModeAttr - This attribute modifies the width of a decl with primitive type. | |
| static void | handleNonStringAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoDebugAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAlwaysInlineAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMinSizeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleOptimizeNoneAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleConstantAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleSharedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleGlobalAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDeviceAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleManagedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleGridConstantAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleGNUInlineAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleCallConvAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDeviceKernelAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleSuppressAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleLifetimeCategoryAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleRandomizeLayoutAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoRandomizeLayoutAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static OffloadArch | getOffloadArch (const TargetInfo &TI) |
| static Expr * | makeLaunchBoundsArgExpr (Sema &S, Expr *E, const CUDALaunchBoundsAttr &AL, const unsigned Idx) |
| static void | handleLaunchBoundsAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static std::pair< Expr *, int > | makeClusterDimsArgExpr (Sema &S, Expr *E, const CUDAClusterDimsAttr &AL, const unsigned Idx) |
| static void | handleClusterDimsAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoClusterAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleArgumentWithTypeTagAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleTypeTagForDatatypeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleXRayLogArgsAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handlePatchableFunctionEntryAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleBuiltinAliasAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNullableTypeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handlePreferredTypeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleUuidAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMSInheritanceAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDeclspecThreadAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMSConstexprAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMSStructAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleGCCStructAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAbiTagAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | hasBTFDeclTagAttr (Decl *D, StringRef Tag) |
| static void | handleBTFDeclTagAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleInterruptAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleLayoutVersion (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDLLAttr (Sema &S, Decl *D, const ParsedAttr &A) |
| static void | handleCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleReentrantCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAssertCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAcquireCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleTryAcquireCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleReleaseCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleRequiresCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDeprecatedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | isGlobalVar (const Decl *D) |
| static bool | isSanitizerAttributeAllowedOnGlobals (StringRef Sanitizer) |
| static void | handleNoSanitizeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static AttributeCommonInfo | getNoSanitizeAttrInfo (const ParsedAttr &NoSanitizeSpecificAttr) |
| static void | handleNoSanitizeAddressAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoSanitizeThreadAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoSanitizeMemoryAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleInternalLinkageAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleZeroCallUsedRegsAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoPFPAttrField (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleCountedByAttrField (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleFunctionReturnThunksAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAvailableOnlyInDefaultEvalMethod (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoMergeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleNoUniqueAddressAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleDestroyAttr (Sema &S, Decl *D, const ParsedAttr &A) |
| static void | handleUninitializedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMIGServerRoutineAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleMSAllocatorAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | handleAcquireHandleAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| template<typename Attr> | |
| static void | handleHandleAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| 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, const IdentifierInfo *ModularImplFn, StringRef ImplName, ArrayRef< StringRef > Aspects) |
| static void | handleModularFormat (Sema &S, Decl *D, const ParsedAttr &AL) |
| static bool | MustDelayAttributeArguments (const ParsedAttr &AL) |
| static void | handlePersonalityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
| static void | ProcessDeclAttribute (Sema &S, 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 3805 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1290 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::isValidPointerAttrType().
Referenced by handleNonNullAttr(), handleNonNullAttrParameter(), and handleReturnsNonNullAttr().
|
static |
Definition at line 494 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 344 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 2312 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), and clang::IdentifierInfo::getName().
Referenced by clang::Sema::mergeAvailabilityAttr().
|
static |
Definition at line 3441 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::isValidSectionSpecifier(), and toString().
Referenced by handleCodeSegAttr().
|
static |
Definition at line 1012 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 653 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 437 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 461 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleGuardedByAttr(), and handlePtGuardedByAttr().
|
static |
Definition at line 534 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 549 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 100 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 246 of file SemaDeclAttr.cpp.
References clang::Decl::hasAttr().
Referenced by checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), and checkRecordTypeForScopedCapability().
Definition at line 261 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), getRecordDecl(), and threadSafetyCheckIsSmartPointer().
Referenced by typeHasCapability().
Definition at line 279 of file SemaDeclAttr.cpp.
References checkRecordDeclForAttr(), and getRecordDecl().
Referenced by checkFunParamsAreScopedLockable().
|
static |
Definition at line 605 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 292 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 8380 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::DiagnoseUnknownAttribute(), clang::AttributeCommonInfo::IgnoredAttribute, and clang::AttributeCommonInfo::UnknownAttribute.
|
static |
Definition at line 6975 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 3816 of file SemaDeclAttr.cpp.
References CFStringFormat, clang::Default, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.
Referenced by handleFormatAttrCommon().
|
static |
Definition at line 6723 of file SemaDeclAttr.cpp.
References clang::AttributeCommonInfo::isStandardAttributeSyntax(), and clang::AttributeCommonInfo::setAttributeSpellingListIndex().
Referenced by handleNoSanitizeAddressAttr(), handleNoSanitizeMemoryAttr(), and handleNoSanitizeThreadAttr().
|
static |
Definition at line 87 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::hasParsedType().
|
static |
Definition at line 5791 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 234 of file SemaDeclAttr.cpp.
References clang::Type::getAsCanonical(), and clang::Type::getAsRecordDecl().
Referenced by checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), and checkRecordTypeForScopedCapability().
|
static |
Definition at line 6332 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 6591 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunParamsAreScopedLockable(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 514 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 524 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6924 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 1718 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 4491 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 4448 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignValueAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1403 of file SemaDeclAttr.cpp.
References clang::Sema::AddAllocAlignAttr(), and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 568 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 5132 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::AttributeCommonInfo::getAttrName(), and clang::Sema::mergeAlwaysInlineAttr().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 2154 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 4441 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::CreateAnnotationAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5996 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 6582 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1397 of file SemaDeclAttr.cpp.
References clang::Sema::AddAssumeAlignedAttr(), clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2303 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 2614 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, shouldInferAvailabilityAttribute(), V, and clang::AvailabilityChange::Version.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6849 of file SemaDeclAttr.cpp.
References clang::handleSimpleAttribute(), and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6371 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and hasBTFDeclTagAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6113 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 1027 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 4102 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 5275 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 4358 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and isFunctionLike().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6549 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 6954 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 895 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 3672 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 5964 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 3399 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 3471 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 1997 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 5148 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::CheckVarDeclSizeAddressSpace(), clang::Sema::Context, clang::cuda_constant, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2281 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 992 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 6790 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 1925 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 6263 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 8636 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 2229 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 6649 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 6869 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 2294 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 5220 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckVarDeclSizeAddressSpace(), clang::Sema::Context, clang::cuda_device, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5395 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 776 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(), and clang::Union.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 854 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 6466 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::SourceRange::getBegin(), clang::Decl::getDeclContext(), 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 681 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 6985 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 3743 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 690 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::mergeErrorAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 698 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttrs(), clang::Decl::getDeclContext(), clang::getDLLAttr(), clang::AttributeCommonInfo::getLoc(), clang::DeclContext::getRedeclContext(), clang::isa(), and clang::Attr::isInherited().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2930 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 1185 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 3765 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 4031 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 3956 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 4082 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 6829 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 6317 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 5184 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 5262 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 5253 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and clang::Decl::isInvalidDecl().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 475 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6942 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1702 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 3840 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Sema::getCurFunctionOrMethodDecl(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6763 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Internal, and clang::Sema::mergeInternalLinkageAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6387 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 5879 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 6419 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 4278 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 5454 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 622 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 633 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), checkFunParamsAreScopedLockable(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1919 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckSpanLikeType(), clang::Sema::Context, and clang::getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5238 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckVarDeclSizeAddressSpace(), clang::Sema::Context, clang::cuda_device, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6888 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::Decl::getBeginLoc(), clang::getFunctionOrMethodResultType(), clang::handleSimpleAttribute(), clang::ASTContext::IntTy, and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5138 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeMinSizeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3655 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 4864 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 7179 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAttr(), clang::Expr::getExprLoc(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParsedAttr::isArgIdent(), modularFormatAttrsEquiv(), and clang::Valid.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6910 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 6280 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 6249 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 6302 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 2007 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 910 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 2124 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::handleSimpleAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5983 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 5038 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1382 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(), and clang::Sema::isValidPointerAttrType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6855 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 1306 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(), and clang::Sema::isValidPointerAttrType().
Referenced by handleNonNullAttrParameter(), and ProcessDeclAttribute().
|
static |
Definition at line 1352 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 5024 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 6786 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5528 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::checkAttrMutualExclusion(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2096 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 6741 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6695 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 6756 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6749 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and getNoSanitizeAttrInfo().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1256 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 6865 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6141 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 5143 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::mergeOptimizeNoneAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1490 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, and clang::Decl::specific_attrs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1191 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 1062 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 960 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 6072 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 7272 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getAttrName(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), and clang::Sema::mergePersonalityAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1219 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(), and clang::Template.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6155 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 483 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 454 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5521 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::checkAttrMutualExclusion(), clang::Sema::Context, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6567 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 6615 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), checkFunParamsAreScopedLockable(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6628 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), checkFunParamsAreScopedLockable(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1770 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 1372 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, clang::getFunctionOrMethodResultSourceRange(), and clang::getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1096 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 3367 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 3034 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 1141 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 5166 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::CheckVarDeclSizeAddressSpace(), clang::Sema::Context, clang::Sema::CUDA(), clang::cuda_shared, clang::SemaCUDA::CurrentTarget(), clang::SemaBase::Diag(), clang::SemaCUDA::DiagIfHostCode(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::isa().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2109 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 5433 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 3589 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 3600 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 3569 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 1163 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 1753 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 4370 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 6605 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6032 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 6882 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::Sema::Context, and clang::SD_Automatic.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6950 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), and clang::Sema::Context.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2244 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 6189 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 2175 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 3299 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 2986 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 7042 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 3127 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 3185 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 1612 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 3249 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 6059 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 6768 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 6363 of file SemaDeclAttr.cpp.
References clang::Decl::specific_attrs().
Referenced by handleBTFDeclTagAttr(), and clang::Sema::mergeBTFDeclTagAttr().
Definition at line 314 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 8601 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 4350 of file SemaDeclAttr.cpp.
Referenced by handleCalledOnceAttr().
Definition at line 6684 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
Check if the passed-in expression is of type int or bool.
Definition at line 167 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().
Referenced by checkTryLockFunAttrCommon().
Definition at line 8234 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 2034 of file SemaDeclAttr.cpp.
References clang::FunctionDecl::getBody(), clang::FunctionDecl::hasBody(), and clang::isa().
Referenced by clang::inferNoReturnAttr().
|
static |
Definition at line 6690 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
|
static |
Definition at line 3389 of file SemaDeclAttr.cpp.
Referenced by handleCodeModelAttr().
|
static |
Definition at line 3211 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 5889 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 5802 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 1674 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 7010 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 2960 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
|
static |
Definition at line 7155 of file SemaDeclAttr.cpp.
Referenced by handleModularFormat(), and clang::Sema::mergeModularFormatAttr().
|
static |
Definition at line 7230 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 1481 of file SemaDeclAttr.cpp.
|
static |
parseModeAttrArg - Parses attribute mode string and returns parsed type attribute.
Definition at line 4793 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 7286 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(), handleNoPFPAttrField(), handleNoRandomizeLayoutAttr(), handleNoReturnAttr(), handleNoSanitizeAddressAttr(), handleNoSanitizeAttr(), handleNoSanitizeMemoryAttr(), handleNoSanitizeThreadAttr(), handleNoSpecializations(), clang::SemaOpenCL::handleNoSVMAttr(), handleNoUniqueAddressAttr(), clang::SemaObjC::handleNSErrorDomain(), clang::SemaObjC::handleNSObject(), handleNullableTypeAttr(), clang::SemaHLSL::handleNumThreadsAttr(), clang::SemaOpenMP::handleOMPAssumeAttr(), handleOptimizeNoneAttr(), clang::SemaObjC::handleOwnershipAttr(), handleOwnershipAttr(), handlePackedAttr(), clang::SemaHLSL::handlePackOffsetAttr(), clang::SemaHLSL::handleParamModifierAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), handlePersonalityAttr(), clang::SemaObjC::handlePreciseLifetimeAttr(), handlePreferredName(), handlePreferredTypeAttr(), clang::SemaBPF::handlePreserveAccessIndexAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleRandomizeLayoutAttr(), handleReentrantCapabilityAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), clang::SemaObjC::handleRequiresSuperAttr(), clang::SemaHLSL::handleResourceBindingAttr(), handleRestrictAttr(), clang::SemaObjC::handleReturnsInnerPointerAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), clang::SemaHLSL::handleRootSignatureAttr(), clang::SemaObjC::handleRuntimeName(), handleSectionAttr(), clang::SemaHLSL::handleSemanticAttr(), handleSentinelAttr(), handleSetTypestateAttr(), clang::SemaHLSL::handleShaderAttr(), handleSharedAttr(), clang::SemaAVR::handleSignalAttr(), clang::handleSimpleAttribute(), clang::handleSimpleAttributeOrDiagnose(), handleStandardNoReturnAttr(), clang::SemaOpenCL::handleSubGroupSize(), clang::SemaObjC::handleSuppresProtocolAttr(), handleSuppressAttr(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUninitializedAttr(), handleUnsafeBufferUsage(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), clang::SemaHLSL::handleVkBindingAttr(), clang::SemaHLSL::handleVkConstantIdAttr(), clang::SemaHLSL::handleVkExtBuiltinInputAttr(), clang::SemaHLSL::handleVkLocationAttr(), clang::SemaHLSL::handleVkPushConstantAttr(), handleVTablePointerAuthentication(), handleWarnUnusedResult(), clang::SemaHLSL::handleWaveSizeAttr(), handleWeakImportAttr(), handleWeakRefAttr(), clang::SemaWasm::handleWebAssemblyExportNameAttr(), clang::SemaWasm::handleWebAssemblyImportModuleAttr(), clang::SemaWasm::handleWebAssemblyImportNameAttr(), handleWorkGroupSize(), handleXRayLogArgsAttr(), clang::SemaObjC::handleXReturnsXRetainedAttr(), handleZeroCallUsedRegsAttr(), clang::Sema::HLSL(), clang::AttributeCommonInfo::IgnoredAttribute, clang::Sema::ProcessDeclAttributeOptions::IgnoreTypeAttributes, clang::Sema::ProcessDeclAttributeOptions::IncludeCXX11Attributes, clang::isa(), clang::AttributeCommonInfo::isC23Attribute(), clang::AttributeCommonInfo::isClangScope(), clang::AttributeCommonInfo::isCXX11Attribute(), clang::AttributeCommonInfo::isDeclspecAttribute(), clang::ParsedAttr::isInvalid(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::AttributeCommonInfo::isStandardAttributeSyntax(), clang::ParsedAttr::isStmtAttr(), clang::ParsedAttr::isTypeAttr(), clang::ParsedAttr::isUsedAsTypeAttr(), clang::SemaObjC::isValidOSObjectOutParameter(), MustDelayAttributeArguments(), clang::ParsedAttrInfo::NotHandled, clang::Sema::ObjC(), clang::Sema::OpenCL(), clang::Sema::OpenMP(), clang::FunctionDecl::parameters(), clang::SemaObjC::parsedAttrToRetainOwnershipKind(), clang::ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior(), clang::Sema::Swift(), clang::SwiftAsyncContext, clang::SwiftContext, clang::SwiftErrorResult, clang::SwiftIndirectResult, clang::Sema::SYCL(), clang::AttributeCommonInfo::UnknownAttribute, clang::Sema::Wasm(), and clang::Sema::X86().
Referenced by clang::Sema::ProcessAccessDeclAttributeList(), and clang::Sema::ProcessDeclAttributeList().
|
static |
Definition at line 2255 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 |
Returns true if the given availability attribute should be inferred, and adjusts the value of the attribute as necessary to facilitate that.
Definition at line 2542 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::SourceRange::getBegin(), clang::Sema::getDarwinSDKInfoForAvailabilityChecking(), clang::IdentifierInfo::getName(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::DarwinSDKInfo::getVersionMapping().
Referenced by handleAvailabilityAttr().
|
static |
Check if passed in Decl is a pointer type.
Note that this function may produce an error message.
Definition at line 210 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 175 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, and clang::DeclarationNameTable::getCXXOperatorName().
Referenced by checkRecordTypeForCapability(), and threadSafetyCheckIsPointer().
Definition at line 304 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 4553 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 2355 of file SemaDeclAttr.cpp.
References X.
Referenced by clang::Sema::mergeAvailabilityAttr().