clang 20.0.0git
|
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/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/SemaAMDGPU.h"
#include "clang/Sema/SemaARM.h"
#include "clang/Sema/SemaAVR.h"
#include "clang/Sema/SemaBPF.h"
#include "clang/Sema/SemaCUDA.h"
#include "clang/Sema/SemaHLSL.h"
#include "clang/Sema/SemaM68k.h"
#include "clang/Sema/SemaMIPS.h"
#include "clang/Sema/SemaMSP430.h"
#include "clang/Sema/SemaObjC.h"
#include "clang/Sema/SemaOpenCL.h"
#include "clang/Sema/SemaOpenMP.h"
#include "clang/Sema/SemaRISCV.h"
#include "clang/Sema/SemaSYCL.h"
#include "clang/Sema/SemaSwift.h"
#include "clang/Sema/SemaWasm.h"
#include "clang/Sema/SemaX86.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/STLForwardCompat.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/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Triple.h"
#include <optional>
Go to the source code of this file.
Namespaces | |
namespace | AttributeLangSupport |
Enumerations | |
enum | AttributeLangSupport::LANG { AttributeLangSupport::C , AttributeLangSupport::Cpp , AttributeLangSupport::ObjC } |
enum | FormatAttrKind { CFStringFormat , NSStringFormat , StrftimeFormat , SupportedFormat , IgnoredFormat , InvalidFormat } |
Functions | |
static 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 RecordType *RT) |
static bool | threadSafetyCheckIsPointer (Sema &S, const Decl *D, const ParsedAttr &AL) |
Check if passed in Decl is a pointer type. | |
static const RecordType * | getRecordType (QualType QT) |
Checks that the passed in QualType either is of RecordType or points to RecordType. | |
template<typename AttrType > | |
static bool | checkRecordDeclForAttr (const RecordDecl *RD) |
static bool | checkRecordTypeForCapability (Sema &S, QualType Ty) |
static bool | checkTypedefTypeForCapability (QualType Ty) |
static bool | typeHasCapability (Sema &S, QualType Ty) |
static bool | isCapabilityExpr (Sema &S, const Expr *Ex) |
static void | checkAttrArgsAreCapabilityObjs (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args, unsigned Sidx=0, bool ParamIdxOk=false) |
Checks that all attribute arguments, starting from Sidx, resolve to a capability object. | |
static void | handlePtGuardedVarAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | checkGuardedByAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, Expr *&Arg) |
static void | handleGuardedByAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handlePtGuardedByAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | checkAcquireOrderAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args) |
static void | handleAcquiredAfterAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleAcquiredBeforeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | checkLockFunAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args) |
static void | handleAssertSharedLockAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleAssertExclusiveLockAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
template<typename AttrInfo > | |
static bool | checkParamIsIntegerType (Sema &S, const Decl *D, const AttrInfo &AI, unsigned AttrArgNo) |
Checks to be sure that the given parameter number is in bounds, and is an integral type. | |
static void | handleAllocSizeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | checkTryLockFunAttrCommon (Sema &S, Decl *D, const ParsedAttr &AL, SmallVectorImpl< Expr * > &Args) |
static void | handleSharedTrylockFunctionAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleExclusiveTrylockFunctionAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleLockReturnedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleLocksExcludedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | checkFunctionConditionAttr (Sema &S, Decl *D, const ParsedAttr &AL, Expr *&Cond, StringRef &Msg) |
static void | handleEnableIfAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleErrorAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | 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 | 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 | 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 void | handleNoReturnAttr (Sema &S, Decl *D, const ParsedAttr &Attrs) |
static void | handleStandardNoReturnAttr (Sema &S, Decl *D, const ParsedAttr &A) |
static void | handleNoCfCheckAttr (Sema &S, Decl *D, const ParsedAttr &Attrs) |
static void | handleAnalyzerNoReturnAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleVecReturnAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleDependencyAttr (Sema &S, Scope *Scope, Decl *D, const ParsedAttr &AL) |
static void | handleUnusedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleConstructorAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleDestructorAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
template<typename AttrTy > | |
static void | handleAttrWithMessage (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | checkAvailabilityAttr (Sema &S, SourceRange Range, IdentifierInfo *Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted) |
static bool | versionsMatch (const VersionTuple &X, const VersionTuple &Y, bool BeforeIsOkay) |
Check whether the two versions match. | |
static void | handleAvailabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleExternalSourceSymbolAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
template<class T > | |
static T * | mergeVisibilityAttr (Sema &S, Decl *D, const AttributeCommonInfo &CI, typename T::VisibilityType value) |
static void | handleVisibilityAttr (Sema &S, Decl *D, const ParsedAttr &AL, bool isTypeVisibility) |
static void | handleSentinelAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleWarnUnusedResult (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleWeakImportAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
template<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 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 http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html. | |
static FormatAttrKind | getFormatAttrKind (StringRef Format) |
getFormatAttrKind - Map from format attribute names to supported format types. | |
static void | handleInitPriorityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
Handle attribute((init_priority(priority))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html. | |
static void | handleFormatAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
Handle attribute((format(type,idx,firstarg))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html. | |
static void | handleCallbackAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes. | |
static 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 | 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 | 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 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 | 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 | handleAssertCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleAcquireCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleTryAcquireCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleReleaseCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleRequiresCapabilityAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleDeprecatedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | isGlobalVar (const Decl *D) |
static bool | isSanitizerAttributeAllowedOnGlobals (StringRef Sanitizer) |
static void | handleNoSanitizeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleNoSanitizeSpecificAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleInternalLinkageAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleZeroCallUsedRegsAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleCountedByAttrField (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleFunctionReturnThunksAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleAvailableOnlyInDefaultEvalMethod (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleNoMergeAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleNoUniqueAddressAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleDestroyAttr (Sema &S, Decl *D, const ParsedAttr &A) |
static void | handleUninitializedAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleMIGServerRoutineAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleMSAllocatorAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleAcquireHandleAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
template<typename Attr > | |
static void | handleHandleAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
template<typename Attr > | |
static void | handleUnsafeBufferUsage (Sema &S, Decl *D, const ParsedAttr &AL) |
static void | handleCFGuardAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
template<typename AttrTy > | |
static const AttrTy * | findEnforceTCBAttrByName (Decl *D, StringRef Name) |
template<typename AttrTy , typename ConflictingAttrTy > | |
static void | handleEnforceTCBAttr (Sema &S, Decl *D, const ParsedAttr &AL) |
template<typename AttrTy , typename ConflictingAttrTy > | |
static AttrTy * | mergeEnforceTCBAttrImpl (Sema &S, Decl *D, const AttrTy &AL) |
static void | handleVTablePointerAuthentication (Sema &S, Decl *D, const ParsedAttr &AL) |
static bool | MustDelayAttributeArguments (const ParsedAttr &AL) |
static void | ProcessDeclAttribute (Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, const Sema::ProcessDeclAttributeOptions &Options) |
ProcessDeclAttribute - Apply the specific attribute to the specified decl if the attribute applies to decls. | |
static bool | isKernelDecl (Decl *D) |
static void | checkUnusedDeclAttributes (Sema &S, const ParsedAttributesView &A) |
checkUnusedDeclAttributes - Check a list of attributes to see if it contains any decl attributes that we should warn about. | |
static bool | isForbiddenTypeAllowed (Sema &S, Decl *D, const DelayedDiagnostic &diag, UnavailableAttr::ImplicitReason &reason) |
Is the given declaration allowed to use a forbidden type? If so, it'll still be annotated with an attribute that makes it illegal to actually use. | |
static void | handleDelayedForbiddenType (Sema &S, DelayedDiagnostic &DD, Decl *D) |
Handle a delayed forbidden-type diagnostic. | |
enum FormatAttrKind |
Enumerator | |
---|---|
CFStringFormat | |
NSStringFormat | |
StrftimeFormat | |
SupportedFormat | |
IgnoredFormat | |
InvalidFormat |
Definition at line 3500 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1249 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Sema::isValidPointerAttrType(), and clang::T.
Referenced by handleNonNullAttr(), handleNonNullAttrParameter(), and handleReturnsNonNullAttr().
|
static |
Definition at line 463 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), D, 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 326 of file SemaDeclAttr.cpp.
References D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::DeclContext::getParent(), getRecordType(), clang::Expr::getType(), isCapabilityExpr(), clang::Expr::isTypeDependent(), and typeHasCapability().
Referenced by checkAcquireOrderAttrCommon(), checkGuardedByAttrCommon(), checkLockFunAttrCommon(), checkTryLockFunAttrCommon(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleReleaseCapabilityAttr(), and handleRequiresCapabilityAttr().
|
static |
Definition at line 2041 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::IdentifierInfo::getName(), and Range.
Referenced by clang::Sema::mergeAvailabilityAttr().
|
static |
Definition at line 2924 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), E, clang::Sema::isValidSectionSpecifier(), and toString().
Referenced by handleCodeSegAttr().
|
static |
Definition at line 972 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 661 of file SemaDeclAttr.cpp.
References clang::Sema::checkStringLiteralArgumentAttr(), D, clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isPotentialConstantExprUnevaluated(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Sema::PerformContextuallyConvertToBool().
Referenced by handleDiagnoseIfAttr(), and handleEnableIfAttr().
|
static |
Definition at line 430 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs(), and D.
Referenced by handleGuardedByAttr(), and handlePtGuardedByAttr().
|
static |
Definition at line 503 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs(), and D.
Referenced by handleAcquireCapabilityAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), and handleAssertSharedLockAttr().
|
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 541 of file SemaDeclAttr.cpp.
References clang::Sema::checkFunctionOrMethodParameterIndex(), D, 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 94 of file SemaDeclAttr.cpp.
References clang::Sema::checkUInt32Argument(), clang::SemaBase::Diag(), clang::Expr::getExprLoc(), and toString().
Referenced by handleAllocSizeAttr().
|
static |
Definition at line 241 of file SemaDeclAttr.cpp.
References clang::Decl::hasAttr().
Definition at line 256 of file SemaDeclAttr.cpp.
References clang::RecordType::getDecl(), getRecordType(), clang::Type::isIncompleteType(), and threadSafetyCheckIsSmartPointer().
Referenced by typeHasCapability().
|
static |
Definition at line 597 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntOrBool, clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), and isIntOrBool().
Referenced by handleExclusiveTrylockFunctionAttr(), handleSharedTrylockFunctionAttr(), and handleTryAcquireCapabilityAttr().
Definition at line 274 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 7470 of file SemaDeclAttr.cpp.
References clang::SemaBase::Diag(), clang::AttributeCommonInfo::IgnoredAttribute, and clang::AttributeCommonInfo::UnknownAttribute.
|
static |
Definition at line 6268 of file SemaDeclAttr.cpp.
References D, and clang::Decl::specific_attrs().
|
static |
getFormatAttrKind - Map from format attribute names to supported format types.
Definition at line 3511 of file SemaDeclAttr.cpp.
References CFStringFormat, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.
Referenced by handleFormatAttr().
|
static |
Definition at line 83 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::getNumArgs(), and clang::ParsedAttr::hasParsedType().
|
static |
Definition at line 5303 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 229 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Type::getPointeeType().
Referenced by checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), and clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
|
static |
Definition at line 5683 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5909 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 483 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 493 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6217 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), and clang::ParsedAttr::isUsedAsTypeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1682 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::CUDA_100, D, 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 4130 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignedAttr(), clang::Decl::addAttr(), clang::Expr::containsUnexpandedParameterPack(), clang::Type::containsUnexpandedParameterPack(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), E, 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 4086 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignValueAttr(), D, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1359 of file SemaDeclAttr.cpp.
References clang::Sema::AddAllocAlignAttr(), D, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 560 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), checkParamIsIntegerType(), checkPositiveIntArgument(), clang::Sema::Context, D, 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 4756 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), D, clang::AttributeCommonInfo::getAttrName(), and clang::Sema::mergeAlwaysInlineAttr().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 1908 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, 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 4079 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CreateAnnotationAttr(), and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5400 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::ParamIdx::getASTIndex(), clang::AttributeCommonInfo::getAttrName(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamType(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5900 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 523 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 512 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1353 of file SemaDeclAttr.cpp.
References clang::Sema::AddAssumeAlignedAttr(), D, E, clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2032 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, and clang::ParsedAttr::getNumArgs().
|
static |
Definition at line 2268 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::AMK_None, clang::Sema::AP_Explicit, clang::Sema::AP_InferredFromOtherPlatform, clang::Sema::AP_PragmaClangAttribute, clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, D, 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::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getMessageExpr(), clang::IdentifierInfo::getName(), clang::AttributeCommonInfo::getRange(), clang::ParsedAttr::getReplacementExpr(), clang::ParsedAttr::getStrictLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ParsedAttr::getUnavailableLoc(), clang::DarwinSDKInfo::getVersionMapping(), clang::IdentifierLoc::Ident, clang::ASTContext::Idents, clang::DarwinSDKInfo::OSEnvPair::iOStoTvOSPair(), clang::DarwinSDKInfo::OSEnvPair::iOStoWatchOSPair(), clang::ParsedAttr::isPragmaClangAttribute(), clang::IdentifierInfo::isStr(), clang::SourceLocation::isValid(), clang::AvailabilityChange::isValid(), clang::IdentifierLoc::Loc, clang::DarwinSDKInfo::OSEnvPair::macOStoMacCatalystPair(), clang::Sema::mergeAvailabilityAttr(), clang::Min, V, and clang::AvailabilityChange::Version.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6142 of file SemaDeclAttr.cpp.
References D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5722 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, and hasBTFDeclTagAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5495 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::ARM(), clang::SemaARM::CdeAliasValid(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierInfo::getBuiltinID(), clang::ASTContext::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::IdentifierLoc::Ident, clang::SemaRISCV::isAliasValid(), clang::ParsedAttr::isArgIdent(), clang::SemaARM::MveAliasValid(), clang::Sema::RISCV(), and clang::SemaARM::SveAliasValid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 987 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkForConsumableClass(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::IdentifierLoc::Loc, and Loc.
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((callback(CalleeIdx, PayloadIdx0, ...))) attributes.
Definition at line 3737 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAsFunction(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamType(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), clang::Type::getPointeeType(), clang::AttributeCommonInfo::getRange(), clang::Stmt::getSourceRange(), clang::QualType::getTypePtr(), clang::Type::getUnqualifiedDesugaredType(), clang::Decl::hasAttr(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgExpr(), clang::ParsedAttr::isArgIdent(), clang::Type::isFunctionPointerType(), clang::isInstanceMethod(), clang::IdentifierLoc::Loc, and clang::FunctionDecl::parameters().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4891 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::Sema::CheckCallingConvAttr(), clang::Sema::Context, clang::Sema::CUDA(), D, clang::SemaBase::Diag(), clang::ExpectedFunctionOrMethod, clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::hasDeclarator(), clang::SemaCUDA::IdentifyTarget(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Handle 'called_once' attribute.
Definition at line 3996 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), isFunctionLike(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5882 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, and clang::ParsedAttr::getKind().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6247 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3361 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::CheckFunctionCall(), clang::Sema::Compatible, clang::Sema::Context, clang::UnaryOperator::Create(), clang::DeclRefExpr::Create(), clang::CallExpr::Create(), D, clang::SemaBase::Diag(), E, clang::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::DeclarationNameInfo::getName(), clang::DeclRefExpr::getNameInfo(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getPointerType(), clang::ValueDecl::getType(), clang::DeclRefExpr::hasQualifier(), Loc, 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 2906 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, and clang::SemaBase::Diag().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2954 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkCodeSegName(), clang::Sema::checkStringLiteralArgumentAttr(), D, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::mergeCodeSegAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1817 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, AttributeLangSupport::Cpp, D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4772 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2009 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 952 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6083 of file SemaDeclAttr.cpp.
References clang::Sema::BuildCountAttributedArrayOrPointerType(), clang::Sema::CheckCountedByAttrOnField(), D, clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getKind(), clang::ValueDecl::getType(), and clang::ValueDecl::setType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1745 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAttr(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), getNumAttributeArgs(), clang::AttributeCommonInfo::getParsedKind(), clang::ASTContext::getTargetInfo(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::IdentifierLoc::Loc, clang::Other, clang::FunctionDecl::setIsMultiVersion(), and clang::TargetInfo::validateCPUSpecificCPUDispatch().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5644 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, 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 7686 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, 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 1983 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Scope::FunctionDeclarationScope, clang::Scope::getFlags(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5956 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtMostNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, 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 6162 of file SemaDeclAttr.cpp.
References D, clang::SemaBase::Diag(), clang::ParsedAttr::getKind(), and clang::Decl::getLocation().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2022 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4840 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 766 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentBuiltinFunction, clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, 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(), Loc, clang::T, and clang::Union.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 844 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Stmt::getBeginLoc(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5815 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::ParsedAttr::getKind(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), clang::FunctionDecl::isInlined(), clang::Sema::mergeDLLExportAttr(), clang::Sema::mergeDLLImportAttr(), and clang::TargetInfo::shouldDLLImportComdatSymbols().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 689 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6278 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::AttributeCommonInfo::getAttrName(), clang::AttributeCommonInfo::getLoc(), and clang::IdentifierInfo::getName().
|
static |
Definition at line 3440 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 698 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), D, and clang::Sema::mergeErrorAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 706 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Decl::getDeclContext(), clang::AttributeCommonInfo::getLoc(), and clang::DeclContext::getRedeclContext().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 624 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, D, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2532 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), clang::Sema::Context, D, clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getArgAsIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1145 of file SemaDeclAttr.cpp.
References D, clang::Sema::ExtVectorDecls, and clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::push_back().
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((format_arg((idx)))) attribute based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html.
Definition at line 3462 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Type::castAs(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, D, 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::TypeDecl::getTypeForDecl(), clang::Interface, clang::SemaObjC::isCFStringType(), clang::Type::isCharType(), clang::SemaObjC::isNSStringType(), clang::Type::isPointerType(), and clang::Sema::ObjC().
Referenced by ProcessDeclAttribute().
|
static |
Handle attribute((format(type,idx,firstarg))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html.
Definition at line 3623 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Type::castAs(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, clang::FixItHint::CreateReplacement(), D, clang::SemaBase::Diag(), clang::IdentifierTable::get(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), getFormatAttrKind(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamRange(), clang::getFunctionOrMethodParamType(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::PointerType::getPointeeType(), clang::Stmt::getSourceRange(), clang::IdentifierLoc::Ident, clang::ASTContext::Idents, IgnoredFormat, InvalidFormat, clang::ParsedAttr::isArgIdent(), clang::SemaObjC::isCFStringType(), clang::Type::isCharType(), clang::isFunctionOrMethodVariadic(), clang::isInstanceMethod(), clang::SemaObjC::isNSStringType(), clang::Type::isPointerType(), clang::Sema::mergeFormatAttr(), normalizeName(), clang::Sema::ObjC(), and StrftimeFormat.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6122 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), and clang::Decl::dropAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4804 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::FixItHint::CreateReplacement(), D, 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 ProcessDeclAttribute().
|
static |
Definition at line 4878 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::Sema::LangOpts, and clang::SC_Extern.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4869 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, and clang::Decl::isInvalidDecl().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 444 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6235 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, and D.
|
static |
Definition at line 1666 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, 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 3532 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, clang::ParsedAttr::getArgAsExpr(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getBaseElementType(), clang::Sema::getCurFunctionOrMethodDecl(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::Sema::getSourceManager(), clang::Stmt::getSourceRange(), clang::SourceManager::isInSystemHeader(), clang::ParsedAttr::setInvalid(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6060 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), D, clang::Internal, and clang::Sema::mergeInternalLinkageAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5738 of file SemaDeclAttr.cpp.
References clang::Sema::ARM(), clang::Sema::AVR(), clang::Sema::Context, D, 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 5391 of file SemaDeclAttr.cpp.
References clang::Sema::AddLaunchBoundsAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::ParsedAttr::checkAtMostNumArgs(), D, clang::ParsedAttr::getArgAsExpr(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5768 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::AttributeCommonInfo::getLoc(), clang::Stmt::getSourceRange(), and clang::LangOptionsBase::MSVC2015.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3916 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::Decl::hasAttr(), and clang::Sema::ParseLifetimeCaptureByAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5011 of file SemaDeclAttr.cpp.
References clang::Sema::Context, D, 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 634 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 645 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4856 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6181 of file SemaDeclAttr.cpp.
References D, clang::FunctionProtoType::desugar(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::Sema::getASTContext(), clang::Decl::getBeginLoc(), clang::getFunctionOrMethodResultType(), clang::ASTContext::IntTy, and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4762 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), D, and clang::Sema::mergeMinSizeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3344 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, 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 4503 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Sema::AddModeAttr(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, and clang::ParsedAttr::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6203 of file SemaDeclAttr.cpp.
References D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::FunctionDecl::getReturnType(), and clang::Type::isPointerOrReferenceType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5661 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, 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 5630 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ASTConsumer::AssignInheritanceModel(), AttributeLangSupport::C, clang::Sema::Consumer, D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getSemanticSpelling(), clang::Sema::LangOpts, and clang::Sema::mergeMSInheritanceAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1827 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::AttributeCommonInfo::isDeclspecAttribute(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 870 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Decl::dropAttr(), E, clang::Decl::getAttr(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), clang::Decl::hasAttr(), and clang::Builtin::Context::isBuiltinFunc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1878 of file SemaDeclAttr.cpp.
References D, clang::SemaBase::Diag(), clang::Sema::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4662 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1338 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::Decl::isInvalidDecl(), clang::Sema::isValidPointerAttrType(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6148 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 1265 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, clang::ParsedAttr::getArgAsExpr(), clang::ParamIdx::getASTIndex(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamRange(), clang::getFunctionOrMethodParamType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::Stmt::getSourceRange(), clang::Sema::inTemplateInstantiation(), clang::SourceLocation::isFileID(), clang::isFunctionOrMethodVariadic(), clang::Sema::isValidPointerAttrType(), and clang::T.
Referenced by handleNonNullAttrParameter(), and ProcessDeclAttribute().
|
static |
Definition at line 1308 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Decl::getFunctionType(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::Decl::getSourceRange(), and handleNonNullAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5085 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1850 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeCommonInfo::getLoc(), clang::hasDeclarator(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6002 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), isGlobalVar(), isSanitizerAttributeAllowedOnGlobals(), and clang::parseSanitizerValue().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6029 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ExpectedFunction, clang::AttributeCommonInfo::getAttrName(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), isGlobalVar(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::AttributeCommonInfo::isStandardAttributeSyntax(), normalizeName(), and clang::AttributeCommonInfo::setAttributeSpellingListIndex().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1215 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::Decl::getDescribedTemplate(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6158 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5522 of file SemaDeclAttr.cpp.
References D, clang::SemaBase::Diag(), clang::SourceRange::getBegin(), clang::AttributeCommonInfo::getRange(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::ParsedAttr::isUsedAsTypeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4767 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), D, and clang::Sema::mergeOptimizeNoneAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1454 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::IdentifierTable::get(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::ParamIdx::getASTIndex(), clang::getFunctionOrMethodParamType(), clang::getFunctionOrMethodResultType(), clang::Preprocessor::getIdentifierTable(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ParamIdx::getSourceIndex(), clang::Stmt::getSourceRange(), clang::IdentifierLoc::Ident, clang::Type::isAnyPointerType(), clang::ParsedAttr::isArgIdent(), clang::Type::isBlockPointerType(), clang::Type::isIntegerType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), normalizeName(), clang::Sema::PP, clang::Decl::specific_attrs(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1150 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Sema::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlign(), clang::Type::isDependentType(), and clang::Type::isIncompleteType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1022 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 920 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, clang::ParsedAttr::getArgAsExpr(), clang::Decl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5472 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::Sema::getAttrLoc(), clang::Stmt::getBeginLoc(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ASTContext::getTargetInfo(), and clang::TargetInfo::getTriple().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1178 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::declaresSameEntity(), clang::SemaBase::Diag(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ParsedAttr::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::Type::isTypedefNameType(), and clang::T.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5536 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, 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 452 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, D, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 423 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5078 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5929 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5939 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1734 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::getFunctionOrMethodResultSourceRange(), clang::getFunctionOrMethodResultType(), clang::AttributeCommonInfo::getLoc(), clang::Type::isAnyPointerType(), and clang::Type::isBlockPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1328 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, D, clang::getFunctionOrMethodResultSourceRange(), and clang::getFunctionOrMethodResultType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1056 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2884 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkSectionName(), clang::Sema::checkStringLiteralArgumentAttr(), D, clang::isa(), clang::Sema::mergeSectionAttr(), clang::ASTContext::PSF_Execute, clang::ASTContext::PSF_Read, and clang::Sema::UnifySection().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2627 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::Type::castAs(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, 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::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::Expr::isTypeDependent(), and V.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1101 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkForConsumableClass(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4788 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::CUDA(), clang::SemaCUDA::CurrentTarget(), D, clang::SemaBase::Diag(), clang::SemaCUDA::DiagIfHostCode(), clang::Sema::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 614 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, D, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1863 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, 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 4990 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, E, clang::AttributeCommonInfo::getAttributeSpellingListIndex(), and clang::ParsedAttr::getNumArgs().
Referenced by ProcessDeclAttribute(), and ProcessStmtAttribute().
|
static |
Definition at line 3120 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkTargetAttr(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3277 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkTargetClonesAttrString(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::ParsedAttr::getNumArgs(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::TargetInfo::hasFeature(), clang::Expr::IgnoreParenCasts(), clang::Other, and clang::TargetClones.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3109 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkTargetVersionAttr(), clang::Sema::Context, and D.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1123 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkForConsumableClass(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1717 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, and clang::SemaBase::Diag().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4008 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, 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 5919 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, D, and clang::ParsedAttr::getArgAsExpr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5432 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ExpectedVariable, clang::ParsedAttr::getArgAsIdent(), clang::ParsedAttr::getLayoutCompatible(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getMatchingCType(), clang::ParsedAttr::getMustBeNull(), clang::Sema::GetTypeFromParser(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6175 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, and clang::SD_Automatic.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6243 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, and D.
|
static |
Definition at line 1998 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getScopeName(), and clang::AttributeCommonInfo::isCXX11Attribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5570 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), AttributeLangSupport::C, clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, 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 1929 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Decl::getAttr(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2816 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, D, 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 2579 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ExpectedTypeOrNamespace, clang::SourceRange::getBegin(), clang::AttributeCommonInfo::getLoc(), clang::AttributeCommonInfo::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::hasProtectedVisibility(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::Sema::mergeTypeVisibilityAttr(), clang::Sema::mergeVisibilityAttr(), and clang::ast_matchers::type.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6335 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::Decl::getAttr(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::ParsedAttr::getNumArgs(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgExpr(), clang::ParsedAttr::isArgIdent(), clang::IdentifierLoc::Loc, and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2716 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Decl::getFunctionType(), clang::Sema::getLangOpts(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::FunctionType::getReturnType(), clang::AttributeCommonInfo::getScopeName(), clang::AttributeCommonInfo::isClangScope(), clang::AttributeCommonInfo::isGNUAttribute(), clang::AttributeCommonInfo::isGNUScope(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::AttributeCommonInfo::isStandardAttributeSyntax(), and clang::Type::isVoidType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2769 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Decl::canBeWeakImported(), clang::Sema::Context, D, clang::SemaBase::Diag(), clang::ExpectedVariableOrFunction, clang::AttributeCommonInfo::getLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::AttributeCommonInfo::isRegularKeywordAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1576 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, 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 2792 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkUInt32Argument(), clang::Sema::Context, D, clang::SemaBase::Diag(), E, clang::ParsedAttr::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), and clang::Stmt::getSourceRange().
|
static |
Definition at line 5459 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::Sema::Context, D, clang::ParsedAttr::getArgAsExpr(), and clang::ParamIdx::getSourceIndex().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 6065 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, D, clang::SemaBase::Diag(), and clang::Decl::dropAttr().
Referenced by ProcessDeclAttribute().
Definition at line 5714 of file SemaDeclAttr.cpp.
References D, and clang::Decl::specific_attrs().
Referenced by handleBTFDeclTagAttr(), and clang::Sema::mergeBTFDeclTagAttr().
Definition at line 296 of file SemaDeclAttr.cpp.
References E, 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 7651 of file SemaDeclAttr.cpp.
References clang::Sema::Context, D, clang::sema::DelayedDiagnostic::getForbiddenTypeDiagnostic(), clang::Decl::getLocation(), clang::ASTContext::getSourceManager(), and clang::SourceManager::isInSystemHeader().
Referenced by handleDelayedForbiddenType().
Definition at line 3988 of file SemaDeclAttr.cpp.
References clang::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), and clang::T.
Referenced by handleCalledOnceAttr().
Definition at line 5991 of file SemaDeclAttr.cpp.
References D.
Referenced by handleNoSanitizeAttr(), and handleNoSanitizeSpecificAttr().
Check if the passed-in expression is of type int or bool.
Definition at line 161 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().
Referenced by checkTryLockFunAttrCommon().
Definition at line 7357 of file SemaDeclAttr.cpp.
References clang::CC_AMDGPUKernelCall, D, clang::Decl::getAttr(), clang::FunctionType::getCallConv(), clang::Decl::getFunctionType(), and clang::Decl::hasAttr().
Referenced by clang::Sema::ProcessDeclAttributeList().
|
static |
Definition at line 5997 of file SemaDeclAttr.cpp.
Referenced by handleNoSanitizeAttr().
|
static |
Definition at line 5314 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::SemaBase::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), E, 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 1638 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::Sema::LookupName(), clang::Sema::LookupOrdinaryName, clang::Target, and clang::Sema::TUScope.
Referenced by handleAliasAttr(), and handleIFuncAttr().
|
static |
Definition at line 6303 of file SemaDeclAttr.cpp.
References D, clang::SemaBase::Diag(), clang::Decl::dropAttr(), and clang::Sema::getASTContext().
|
static |
Definition at line 2553 of file SemaDeclAttr.cpp.
References clang::Sema::Context, D, clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::Type::getVisibility(), and clang::T.
|
static |
Definition at line 6451 of file SemaDeclAttr.cpp.
References clang::ParsedAttr::acceptsExprPack(), E, clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getNumArgMembers(), clang::ParsedAttr::getNumArgs(), clang::ParsedAttr::hasVariadicArg(), clang::ParsedAttr::isParamExpr(), and clang::Expr::isValueDependent().
Referenced by ProcessDeclAttribute().
|
static |
Normalize the attribute, foo becomes foo.
Returns true if normalization was applied.
Definition at line 1445 of file SemaDeclAttr.cpp.
|
static |
parseModeAttrArg - Parses attribute mode string and returns parsed type attribute.
Definition at line 4432 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 6484 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, D, clang::SemaBase::Diag(), clang::ParsedAttr::existsInTarget(), 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(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAssumeAlignedAttr(), clang::SemaSwift::handleAsyncAttr(), clang::SemaSwift::handleAsyncError(), clang::SemaSwift::handleAsyncName(), clang::SemaSwift::handleAttrAttr(), clang::ParsedAttr::handleAttrWithDelayedArgs(), 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(), handleCleanupAttr(), clang::SemaARM::handleCmseNSEntryAttr(), handleCodeModelAttr(), handleCodeSegAttr(), handleCommonAttr(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleCountedByAttrField(), handleCPUSpecificAttr(), clang::ParsedAttrInfo::handleDeclAttribute(), handleDeclspecThreadAttr(), handleDependencyAttr(), handleDeprecatedAttr(), clang::SemaObjC::handleDesignatedInitializer(), handleDestroyAttr(), handleDestructorAttr(), handleDeviceAttr(), handleDiagnoseAsBuiltinAttr(), handleDiagnoseIfAttr(), clang::SemaObjC::handleDirectAttr(), clang::SemaObjC::handleDirectMembersAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnumExtensibilityAttr(), clang::SemaSwift::handleError(), handleErrorAttr(), handleExcludeFromExplicitInstantiationAttr(), handleExclusiveTrylockFunctionAttr(), clang::SemaObjC::handleExternallyRetainedAttr(), handleExternalSourceSymbolAttr(), handleExtVectorTypeAttr(), clang::SemaX86::handleForceAlignArgPointerAttr(), handleFormatArgAttr(), handleFormatAttr(), handleFunctionReturnThunksAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGridConstantAttr(), handleGuardedByAttr(), clang::SemaObjC::handleIBOutlet(), clang::SemaObjC::handleIBOutletCollection(), handleIFuncAttr(), clang::SemaObjC::handleIndependentClass(), handleInitPriorityAttr(), handleInternalLinkageAttr(), handleInterruptAttr(), clang::SemaSYCL::handleKernelAttr(), clang::SemaSYCL::handleKernelEntryPointAttr(), handleLaunchBoundsAttr(), handleLayoutVersion(), handleLifetimeCaptureByAttr(), handleLifetimeCategoryAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleManagedAttr(), clang::SemaObjC::handleMethodFamilyAttr(), handleMIGServerRoutineAttr(), handleMinSizeAttr(), handleMinVectorWidthAttr(), handleModeAttr(), handleMSAllocatorAttr(), handleMSConstexprAttr(), handleMSInheritanceAttr(), handleNakedAttr(), clang::SemaSwift::handleName(), clang::SemaARM::handleNewAttr(), clang::SemaSwift::handleNewType(), handleNoBuiltinAttr(), handleNoCfCheckAttr(), handleNoDebugAttr(), handleNoEscapeAttr(), handleNoMergeAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoRandomizeLayoutAttr(), handleNoReturnAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleNoSpecializations(), clang::SemaOpenCL::handleNoSVMAttr(), handleNoUniqueAddressAttr(), clang::SemaObjC::handleNSErrorDomain(), clang::SemaObjC::handleNSObject(), handleNullableTypeAttr(), clang::SemaHLSL::handleNumThreadsAttr(), clang::SemaOpenMP::handleOMPAssumeAttr(), handleOptimizeNoneAttr(), clang::SemaObjC::handleOwnershipAttr(), handleOwnershipAttr(), handlePackedAttr(), clang::SemaHLSL::handlePackOffsetAttr(), clang::SemaHLSL::handleParamModifierAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePatchableFunctionEntryAttr(), clang::SemaObjC::handlePreciseLifetimeAttr(), handlePreferredName(), handlePreferredTypeAttr(), clang::SemaBPF::handlePreserveAccessIndexAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleRandomizeLayoutAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), clang::SemaObjC::handleRequiresSuperAttr(), clang::SemaHLSL::handleResourceBindingAttr(), handleRestrictAttr(), clang::SemaObjC::handleReturnsInnerPointerAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), clang::SemaObjC::handleRuntimeName(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), clang::SemaHLSL::handleShaderAttr(), handleSharedAttr(), handleSharedTrylockFunctionAttr(), clang::SemaAVR::handleSignalAttr(), handleStandardNoReturnAttr(), clang::SemaOpenCL::handleSubGroupSize(), clang::SemaObjC::handleSuppresProtocolAttr(), handleSuppressAttr(), clang::SemaHLSL::handleSV_DispatchThreadIDAttr(), clang::SemaHLSL::handleSV_GroupIDAttr(), clang::SemaHLSL::handleSV_GroupThreadIDAttr(), handleTargetAttr(), handleTargetClonesAttr(), handleTargetVersionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUninitializedAttr(), handleUnusedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleVTablePointerAuthentication(), handleWarnUnusedResult(), clang::SemaHLSL::handleWaveSizeAttr(), handleWeakImportAttr(), handleWeakRefAttr(), clang::SemaWasm::handleWebAssemblyExportNameAttr(), clang::SemaWasm::handleWebAssemblyImportModuleAttr(), clang::SemaWasm::handleWebAssemblyImportNameAttr(), handleXRayLogArgsAttr(), clang::SemaObjC::handleXReturnsXRetainedAttr(), handleZeroCallUsedRegsAttr(), clang::Sema::HLSL(), clang::AttributeCommonInfo::IgnoredAttribute, clang::AttributeCommonInfo::isC23Attribute(), clang::AttributeCommonInfo::isClangScope(), clang::AttributeCommonInfo::isCXX11Attribute(), clang::AttributeCommonInfo::isDeclspecAttribute(), clang::ParsedAttr::isInvalid(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::AttributeCommonInfo::isStandardAttributeSyntax(), clang::ParsedAttr::isStmtAttr(), clang::ParsedAttr::isTypeAttr(), clang::ParsedAttr::isUsedAsTypeAttr(), clang::SemaObjC::isValidOSObjectOutParameter(), MustDelayAttributeArguments(), clang::ParsedAttrInfo::NotHandled, clang::Sema::ObjC(), clang::Sema::OpenCL(), clang::Sema::OpenMP(), clang::SemaObjC::parsedAttrToRetainOwnershipKind(), clang::ParsedAttr::slidesFromDeclToDeclSpecLegacyBehavior(), clang::Sema::Swift(), clang::SwiftAsyncContext, clang::SwiftContext, clang::SwiftErrorResult, clang::SwiftIndirectResult, clang::Sema::SYCL(), clang::AttributeCommonInfo::UnknownAttribute, clang::Sema::Wasm(), and clang::Sema::X86().
Referenced by clang::Sema::ProcessAccessDeclAttributeList(), and clang::Sema::ProcessDeclAttributeList().
|
static |
Check if passed in Decl is a pointer type.
Note that this function may produce an error message.
Definition at line 205 of file SemaDeclAttr.cpp.
References D, clang::SemaBase::Diag(), clang::Type::getAs(), clang::AttributeCommonInfo::getLoc(), clang::Type::isAnyPointerType(), and threadSafetyCheckIsSmartPointer().
Referenced by handlePtGuardedByAttr(), and handlePtGuardedVarAttr().
|
static |
Definition at line 169 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, clang::DeclarationNameTable::getCXXOperatorName(), clang::RecordType::getDecl(), and clang::Result.
Referenced by checkRecordTypeForCapability(), and threadSafetyCheckIsPointer().
Definition at line 286 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 4192 of file SemaDeclAttr.cpp.
References D, clang::SemaBase::Diag(), clang::ExpectedVariableFieldOrTag, clang::ExpectedVariableOrField, clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::SC_Register.
Referenced by clang::Sema::AddAlignedAttr().
|
static |
Check whether the two versions match.
If either version tuple is empty, then they are assumed to match. If BeforeIsOkay
is true, then X
can be less than or equal to Y
.
Definition at line 2084 of file SemaDeclAttr.cpp.
References X.