|
clang
5.0.0
|
#include "clang/AST/ASTConsumer.h"#include "clang/AST/ASTContext.h"#include "clang/AST/ASTMutationListener.h"#include "clang/AST/CXXInheritance.h"#include "clang/AST/DeclCXX.h"#include "clang/AST/DeclObjC.h"#include "clang/AST/DeclTemplate.h"#include "clang/AST/Expr.h"#include "clang/AST/ExprCXX.h"#include "clang/AST/Mangle.h"#include "clang/AST/RecursiveASTVisitor.h"#include "clang/Basic/CharInfo.h"#include "clang/Basic/SourceManager.h"#include "clang/Basic/TargetInfo.h"#include "clang/Lex/Preprocessor.h"#include "clang/Sema/DeclSpec.h"#include "clang/Sema/DelayedDiagnostic.h"#include "clang/Sema/Initialization.h"#include "clang/Sema/Lookup.h"#include "clang/Sema/Scope.h"#include "clang/Sema/SemaInternal.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/StringExtras.h"#include "llvm/Support/MathExtras.h"Go to the source code of this file.
Namespaces | |
| AttributeLangSupport | |
Functions | |
| static bool | isFunctionOrMethod (const Decl *D) |
| isFunctionOrMethod - Return true if the given decl has function type (function or function-typed variable) or an Objective-C method. More... | |
| static bool | isFunctionOrMethodOrBlock (const Decl *D) |
| Return true if the given decl has function type (function or function-typed variable) or an Objective-C method or a block. More... | |
| static bool | hasDeclarator (const Decl *D) |
| Return true if the given decl has a declarator that should have been processed by Sema::GetTypeForDeclarator. More... | |
| static bool | hasFunctionProto (const Decl *D) |
| hasFunctionProto - Return true if the given decl has a argument information. More... | |
| static unsigned | getFunctionOrMethodNumParams (const Decl *D) |
| getFunctionOrMethodNumParams - Return number of function or method parameters. More... | |
| static QualType | getFunctionOrMethodParamType (const Decl *D, unsigned Idx) |
| static SourceRange | getFunctionOrMethodParamRange (const Decl *D, unsigned Idx) |
| static QualType | getFunctionOrMethodResultType (const Decl *D) |
| static SourceRange | getFunctionOrMethodResultSourceRange (const Decl *D) |
| static bool | isFunctionOrMethodVariadic (const Decl *D) |
| static bool | isInstanceMethod (const Decl *D) |
| static bool | isNSStringType (QualType T, ASTContext &Ctx) |
| static bool | isCFStringType (QualType T, ASTContext &Ctx) |
| static unsigned | getNumAttributeArgs (const AttributeList &Attr) |
| template<typename Compare > | |
| static bool | checkAttributeNumArgsImpl (Sema &S, const AttributeList &Attr, unsigned Num, unsigned Diag, Compare Comp) |
| static bool | checkAttributeNumArgs (Sema &S, const AttributeList &Attr, unsigned Num) |
| Check if the attribute has exactly as many args as Num. More... | |
| static bool | checkAttributeAtLeastNumArgs (Sema &S, const AttributeList &Attr, unsigned Num) |
| Check if the attribute has at least as many args as Num. More... | |
| static bool | checkAttributeAtMostNumArgs (Sema &S, const AttributeList &Attr, unsigned Num) |
| Check if the attribute has at most as many args as Num. More... | |
| template<typename AttrInfo > | |
| static std::enable_if < std::is_base_of< clang::Attr, AttrInfo >::value, SourceLocation >::type | getAttrLoc (const AttrInfo &Attr) |
| A helper function to provide Attribute Location for the Attr types AND the AttributeList. More... | |
| static SourceLocation | getAttrLoc (const clang::AttributeList &Attr) |
| template<typename AttrInfo > | |
| static std::enable_if < std::is_base_of< clang::Attr, AttrInfo >::value, const AttrInfo * >::type | getAttrName (const AttrInfo &Attr) |
| A helper function to provide Attribute Name for the Attr types AND the AttributeList. More... | |
| static const IdentifierInfo * | getAttrName (const clang::AttributeList &Attr) |
| template<typename AttrInfo > | |
| static bool | checkUInt32Argument (Sema &S, const AttrInfo &Attr, const Expr *Expr, uint32_t &Val, unsigned Idx=UINT_MAX) |
| If Expr is a valid integer constant, get the value of the integer expression and return success or failure. More... | |
| template<typename AttrInfo > | |
| static bool | checkPositiveIntArgument (Sema &S, const AttrInfo &Attr, 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. More... | |
| template<typename AttrTy > | |
| static bool | checkAttrMutualExclusion (Sema &S, Decl *D, SourceRange Range, IdentifierInfo *Ident) |
| Diagnose mutually exclusive attributes when present on a given declaration. More... | |
| template<typename AttrInfo > | |
| static bool | checkFunctionOrMethodParameterIndex (Sema &S, const Decl *D, const AttrInfo &Attr, unsigned AttrArgNum, const Expr *IdxExpr, uint64_t &Idx, bool AllowImplicitThis=false) |
| Check if IdxExpr is a valid parameter index for a function or instance method D. More... | |
| template<typename AttrType > | |
| static void | handleSimpleAttribute (Sema &S, Decl *D, const AttributeList &Attr) |
| Applies the given attribute to the Decl without performing any additional semantic checking. More... | |
| template<typename AttrType > | |
| static void | handleSimpleAttributeWithExclusions (Sema &S, Decl *D, const AttributeList &Attr) |
| template<typename AttrType , typename IncompatibleAttrType , typename... IncompatibleAttrTypes> | |
| static void | handleSimpleAttributeWithExclusions (Sema &S, Decl *D, const AttributeList &Attr) |
| Applies the given attribute to the Decl so long as the Decl doesn't already have one of the given incompatible attributes. More... | |
| static bool | isIntOrBool (Expr *Exp) |
| Check if the passed-in expression is of type int or bool. More... | |
| static bool | threadSafetyCheckIsSmartPointer (Sema &S, const RecordType *RT) |
| static bool | threadSafetyCheckIsPointer (Sema &S, const Decl *D, const AttributeList &Attr) |
| Check if passed in Decl is a pointer type. More... | |
| static const RecordType * | getRecordType (QualType QT) |
| Checks that the passed in QualType either is of RecordType or points to RecordType. More... | |
| 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 AttributeList &Attr, SmallVectorImpl< Expr * > &Args, int Sidx=0, bool ParamIdxOk=false) |
| Checks that all attribute arguments, starting from Sidx, resolve to a capability object. More... | |
| static void | handlePtGuardedVarAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | checkGuardedByAttrCommon (Sema &S, Decl *D, const AttributeList &Attr, Expr *&Arg) |
| static void | handleGuardedByAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handlePtGuardedByAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | checkAcquireOrderAttrCommon (Sema &S, Decl *D, const AttributeList &Attr, SmallVectorImpl< Expr * > &Args) |
| static void | handleAcquiredAfterAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAcquiredBeforeAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | checkLockFunAttrCommon (Sema &S, Decl *D, const AttributeList &Attr, SmallVectorImpl< Expr * > &Args) |
| static void | handleAssertSharedLockAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAssertExclusiveLockAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| template<typename AttrInfo > | |
| static bool | checkParamIsIntegerType (Sema &S, const FunctionDecl *FD, const AttrInfo &Attr, Expr *AttrArg, unsigned FuncParamNo, unsigned AttrArgNo, bool AllowDependentType=false) |
| Checks to be sure that the given parameter number is in bounds, and is an integral type. More... | |
| static bool | checkParamIsIntegerType (Sema &S, const FunctionDecl *FD, const AttributeList &Attr, unsigned FuncParamNo, unsigned AttrArgNo, bool AllowDependentType=false) |
| Checks to be sure that the given parameter number is in bounds, and is an integral type. More... | |
| static void | handleAllocSizeAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | checkTryLockFunAttrCommon (Sema &S, Decl *D, const AttributeList &Attr, SmallVectorImpl< Expr * > &Args) |
| static void | handleSharedTrylockFunctionAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleExclusiveTrylockFunctionAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleLockReturnedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleLocksExcludedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | checkFunctionConditionAttr (Sema &S, Decl *D, const AttributeList &Attr, Expr *&Cond, StringRef &Msg) |
| static void | handleEnableIfAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleDiagnoseIfAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handlePassObjectSizeAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleConsumableAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | checkForConsumableClass (Sema &S, const CXXMethodDecl *MD, const AttributeList &Attr) |
| static void | handleCallableWhenAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleParamTypestateAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleReturnTypestateAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleSetTypestateAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleTestTypestateAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleExtVectorTypeAttr (Sema &S, Scope *scope, Decl *D, const AttributeList &Attr) |
| static void | handlePackedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | checkIBOutletCommon (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleIBOutlet (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleIBOutletCollection (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | attrNonNullArgCheck (Sema &S, QualType T, const AttributeList &Attr, SourceRange AttrParmRange, SourceRange TypeRange, bool isReturnValue=false) |
| static void | handleNonNullAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleNonNullAttrParameter (Sema &S, ParmVarDecl *D, const AttributeList &Attr) |
| static void | handleReturnsNonNullAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAssumeAlignedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAllocAlignAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | normalizeName (StringRef &AttrName) |
| Normalize the attribute, foo becomes foo. More... | |
| static void | handleOwnershipAttr (Sema &S, Decl *D, const AttributeList &AL) |
| static void | handleWeakRefAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleIFuncAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAliasAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleColdAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleHotAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleTLSModelAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleRestrictAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleCommonAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleNakedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleNoReturnAttr (Sema &S, Decl *D, const AttributeList &attr) |
| static void | handleNoCallerSavedRegsAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAnalyzerNoReturnAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleVecReturnAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleDependencyAttr (Sema &S, Scope *Scope, Decl *D, const AttributeList &Attr) |
| static void | handleNotTailCalledAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleDisableTailCallsAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleUsedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleUnusedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleConstructorAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleDestructorAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| template<typename AttrTy > | |
| static void | handleAttrWithMessage (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleObjCSuppresProtocolAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| 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. More... | |
| static void | handleAvailabilityAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleExternalSourceSymbolAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| template<class T > | |
| static T * | mergeVisibilityAttr (Sema &S, Decl *D, SourceRange range, typename T::VisibilityType value, unsigned attrSpellingListIndex) |
| static void | handleVisibilityAttr (Sema &S, Decl *D, const AttributeList &Attr, bool isTypeVisibility) |
| static void | handleObjCMethodFamilyAttr (Sema &S, Decl *decl, const AttributeList &Attr) |
| static void | handleObjCNSObject (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleObjCIndependentClass (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleBlocksAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleSentinelAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleWarnUnusedResult (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleWeakImportAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| template<typename WorkGroupAttr > | |
| static void | handleWorkGroupSize (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleSubGroupSize (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleVecTypeHint (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleSectionAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleTargetAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleCleanupAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleEnumExtensibilityAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleFormatArgAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| Handle attribute((format_arg((idx)))) attribute based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html. More... | |
| static FormatAttrKind | getFormatAttrKind (StringRef Format) |
| getFormatAttrKind - Map from format attribute names to supported format types. More... | |
| static void | handleInitPriorityAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| Handle attribute((init_priority(priority))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html. More... | |
| static void | handleFormatAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| Handle attribute((format(type,idx,firstarg))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html. More... | |
| static void | handleTransparentUnionAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAnnotateAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAlignValueAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAlignedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | parseModeAttrArg (Sema &S, StringRef Str, unsigned &DestWidth, bool &IntegerMode, bool &ComplexMode) |
| parseModeAttrArg - Parses attribute mode string and returns parsed type attribute. More... | |
| static void | handleModeAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| handleModeAttr - This attribute modifies the width of a decl with primitive type. More... | |
| static void | handleNoDebugAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAlwaysInlineAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleMinSizeAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleOptimizeNoneAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleConstantAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleSharedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleGlobalAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleGNUInlineAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleCallConvAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleSuppressAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | isValidSwiftContextType (QualType type) |
| Pointer-like types in the default address space. More... | |
| static bool | isValidSwiftIndirectResultType (QualType type) |
| Pointers and references in the default address space. More... | |
| static bool | isValidSwiftErrorResultType (QualType type) |
| Pointers and references to pointers in the default address space. More... | |
| static void | handleParameterABIAttr (Sema &S, Decl *D, const AttributeList &attr, ParameterABI abi) |
| static Expr * | makeLaunchBoundsArgExpr (Sema &S, Expr *E, const CUDALaunchBoundsAttr &Attr, const unsigned Idx) |
| static void | handleLaunchBoundsAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleArgumentWithTypeTagAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleTypeTagForDatatypeAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleXRayLogArgsAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | isValidSubjectOfNSReturnsRetainedAttribute (QualType type) |
| static bool | isValidSubjectOfNSAttribute (Sema &S, QualType type) |
| static bool | isValidSubjectOfCFAttribute (Sema &S, QualType type) |
| static void | handleNSConsumedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleNSReturnsRetainedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleObjCReturnsInnerPointerAttr (Sema &S, Decl *D, const AttributeList &attr) |
| static void | handleObjCRequiresSuperAttr (Sema &S, Decl *D, const AttributeList &attr) |
| static void | handleCFAuditedTransferAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleCFUnknownTransferAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleObjCBridgeAttr (Sema &S, Scope *Sc, Decl *D, const AttributeList &Attr) |
| static void | handleObjCBridgeMutableAttr (Sema &S, Scope *Sc, Decl *D, const AttributeList &Attr) |
| static void | handleObjCBridgeRelatedAttr (Sema &S, Scope *Sc, Decl *D, const AttributeList &Attr) |
| static void | handleObjCDesignatedInitializer (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleObjCRuntimeName (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleObjCBoxable (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleObjCOwnershipAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleObjCPreciseLifetimeAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleUuidAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleMSInheritanceAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleDeclspecThreadAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAbiTagAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleARMInterruptAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleMSP430InterruptAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleMipsInterruptAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAnyX86InterruptAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAVRInterruptAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAVRSignalAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleInterruptAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAMDGPUFlatWorkGroupSizeAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAMDGPUWavesPerEUAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAMDGPUNumSGPRAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAMDGPUNumVGPRAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleX86ForceAlignArgPointerAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleLayoutVersion (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleDLLAttr (Sema &S, Decl *D, const AttributeList &A) |
| static void | handleCapabilityAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAssertCapabilityAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleAcquireCapabilityAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleTryAcquireCapabilityAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleReleaseCapabilityAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleRequiresCapabilityAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleDeprecatedAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | isGlobalVar (const Decl *D) |
| static void | handleNoSanitizeAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleNoSanitizeSpecificAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleInternalLinkageAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | handleOpenCLNoSVMAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static bool | handleCommonAttributeFeatures (Sema &S, Scope *scope, Decl *D, const AttributeList &Attr) |
| Handles semantic checking for features that are common to all attributes, such as checking whether a parameter was properly specified, or the correct number of arguments were passed, etc. More... | |
| static void | handleOpenCLAccessAttr (Sema &S, Decl *D, const AttributeList &Attr) |
| static void | ProcessDeclAttribute (Sema &S, Scope *scope, Decl *D, const AttributeList &Attr, bool IncludeCXX11Attributes) |
| ProcessDeclAttribute - Apply the specific attribute to the specified decl if the attribute applies to decls. More... | |
| static void | checkUnusedDeclAttributes (Sema &S, const AttributeList *A) |
| checkUnusedDeclAttributes - Check a list of attributes to see if it contains any decl attributes that we should warn about. More... | |
| static bool | isForbiddenTypeAllowed (Sema &S, Decl *decl, 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. More... | |
| static void | handleDelayedForbiddenType (Sema &S, DelayedDiagnostic &diag, Decl *decl) |
| Handle a delayed forbidden-type diagnostic. More... | |
| static const AvailabilityAttr * | getAttrForPlatform (ASTContext &Context, const Decl *D) |
| static std::pair < AvailabilityResult, const NamedDecl * > | ShouldDiagnoseAvailabilityOfDecl (const NamedDecl *D, std::string *Message) |
The diagnostic we should emit for D, and the declaration that originated it, or AR_Available. More... | |
| static bool | ShouldDiagnoseAvailabilityInContext (Sema &S, AvailabilityResult K, VersionTuple DeclVersion, Decl *Ctx) |
whether we should emit a diagnostic for K and DeclVersion in the context of Ctx. More... | |
| static bool | shouldDiagnoseAvailabilityByDefault (const ASTContext &Context, const VersionTuple &DeploymentVersion, const VersionTuple &DeclVersion) |
| static NamedDecl * | findEnclosingDeclToAnnotate (Decl *OrigCtx) |
| static void | DoEmitAvailabilityWarning (Sema &S, AvailabilityResult K, Decl *Ctx, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) |
| Actually emit an availability diagnostic for a reference to an unavailable decl. More... | |
| static void | handleDelayedAvailabilityCheck (Sema &S, DelayedDiagnostic &DD, Decl *Ctx) |
| static void | EmitAvailabilityWarning (Sema &S, AvailabilityResult AR, const NamedDecl *ReferringDecl, const NamedDecl *OffendingDecl, StringRef Message, SourceLocation Loc, const ObjCInterfaceDecl *UnknownObjCClass, const ObjCPropertyDecl *ObjCProperty, bool ObjCPropertyAccess) |
| enum FormatAttrKind |
| Enumerator | |
|---|---|
| CFStringFormat | |
| NSStringFormat | |
| StrftimeFormat | |
| SupportedFormat | |
| IgnoredFormat | |
| InvalidFormat | |
Definition at line 3146 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1425 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and clang::Sema::isValidPointerAttrType().
Referenced by handleNonNullAttr(), handleNonNullAttrParameter(), and handleReturnsNonNullAttr().
|
static |
Definition at line 694 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs(), checkAttributeAtLeastNumArgs(), clang::Sema::Diag(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), 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 568 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), getRecordType(), clang::Expr::getType(), clang::ValueDecl::getType(), isCapabilityExpr(), clang::Expr::isTypeDependent(), and typeHasCapability().
Referenced by checkAcquireOrderAttrCommon(), checkGuardedByAttrCommon(), checkLockFunAttrCommon(), checkTryLockFunAttrCommon(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleReleaseCapabilityAttr(), and handleRequiresCapabilityAttr().
|
static |
Check if the attribute has at least as many args as Num.
May output an error.
Definition at line 205 of file SemaDeclAttr.cpp.
References checkAttributeNumArgsImpl().
Referenced by checkAcquireOrderAttrCommon(), checkTryLockFunAttrCommon(), handleAbiTagAttr(), handleAllocSizeAttr(), handleCallableWhenAttr(), handleCommonAttributeFeatures(), handleExternalSourceSymbolAttr(), handleLaunchBoundsAttr(), handleLocksExcludedAttr(), handleNoSanitizeAttr(), handleRequiresCapabilityAttr(), and handleSuppressAttr().
|
static |
Check if the attribute has at most as many args as Num.
May output an error.
Definition at line 214 of file SemaDeclAttr.cpp.
References checkAttributeNumArgsImpl().
Referenced by handleAllocSizeAttr(), handleCommonAttributeFeatures(), handleDeprecatedAttr(), handleExternalSourceSymbolAttr(), and handleLaunchBoundsAttr().
|
static |
Check if the attribute has exactly as many args as Num.
May output an error.
Definition at line 196 of file SemaDeclAttr.cpp.
References checkAttributeNumArgsImpl().
Referenced by clang::Sema::CheckCallingConvAttr(), clang::Sema::CheckNoCallerSavedRegsAttr(), clang::Sema::CheckNoReturnAttr(), clang::Sema::CheckRegparmAttr(), handleArgumentWithTypeTagAttr(), handleAvailabilityAttr(), handleAVRInterruptAttr(), handleAVRSignalAttr(), handleCommonAttributeFeatures(), handleMSP430InterruptAttr(), and handleTypeTagForDatatypeAttr().
|
static |
Definition at line 183 of file SemaDeclAttr.cpp.
References Diag(), clang::Sema::Diag(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and getNumAttributeArgs().
Referenced by checkAttributeAtLeastNumArgs(), checkAttributeAtMostNumArgs(), and checkAttributeNumArgs().
|
static |
Diagnose mutually exclusive attributes when present on a given declaration.
Returns true if diagnosed.
Definition at line 299 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Decl::getAttr(), and clang::SourceRange::getBegin().
|
static |
Definition at line 2193 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::VersionTuple::empty(), clang::VersionTuple::getAsString(), clang::SourceRange::getBegin(), and clang::IdentifierInfo::getName().
Referenced by clang::Sema::mergeAvailabilityAttr().
|
static |
Definition at line 1107 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Type::getAsCXXRecordDecl(), clang::Sema::getASTContext(), clang::AttributeList::getLoc(), clang::Type::getPointeeType(), and clang::CXXMethodDecl::getThisType().
Referenced by handleCallableWhenAttr(), handleSetTypestateAttr(), and handleTestTypestateAttr().
|
static |
Definition at line 934 of file SemaDeclAttr.cpp.
References clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isPotentialConstantExprUnevaluated(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Sema::PerformContextuallyConvertToBool().
Referenced by handleDiagnoseIfAttr(), and handleEnableIfAttr().
|
static |
Check if IdxExpr is a valid parameter index for a function or instance method D.
May output an error.
Definition at line 315 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::Sema::Diag(), getAttrLoc(), getAttrName(), getFunctionOrMethodNumParams(), clang::Stmt::getSourceRange(), hasFunctionProto(), isFunctionOrMethodOrBlock(), isFunctionOrMethodVariadic(), isInstanceMethod(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by clang::Sema::AddAllocAlignAttr(), checkParamIsIntegerType(), handleArgumentWithTypeTagAttr(), handleFormatArgAttr(), handleNonNullAttr(), handleOwnershipAttr(), and handleXRayLogArgsAttr().
|
static |
Definition at line 656 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleGuardedByAttr(), and handlePtGuardedByAttr().
|
static |
Definition at line 1319 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeList::getLoc(), and clang::AttributeList::getName().
Referenced by handleIBOutlet(), and handleIBOutletCollection().
|
static |
Definition at line 742 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleAcquireCapabilityAttr(), 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.
FuncParamNo is expected to be from the user, so is base-1. AttrArgNo is used to actually retrieve the argument, so it's base-0.
Definition at line 786 of file SemaDeclAttr.cpp.
References checkFunctionOrMethodParameterIndex(), clang::Sema::Diag(), getAttrName(), clang::Stmt::getLocStart(), clang::FunctionDecl::getParamDecl(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Type::isCharType(), clang::Type::isDependentType(), and clang::Type::isIntegerType().
Referenced by checkParamIsIntegerType(), and handleAllocSizeAttr().
|
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.
FuncParamNo is expected to be from the user, so is base-1. AttrArgNo is used to actually retrieve the argument, so it's base-0.
Definition at line 812 of file SemaDeclAttr.cpp.
References checkParamIsIntegerType(), clang::AttributeList::getArgAsExpr(), and clang::AttributeList::isArgExpr().
|
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 278 of file SemaDeclAttr.cpp.
References checkUInt32Argument(), clang::Sema::Diag(), clang::Expr::getExprLoc(), I, and max().
Referenced by handleAllocSizeAttr().
Definition at line 483 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), clang::RecordType::getDecl(), getRecordType(), clang::CXXBaseSpecifier::getType(), clang::Decl::hasAttr(), clang::Type::isIncompleteType(), and threadSafetyCheckIsSmartPointer().
Referenced by typeHasCapability().
|
static |
Definition at line 860 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntOrBool, checkAttrArgsAreCapabilityObjs(), checkAttributeAtLeastNumArgs(), clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and isIntOrBool().
Referenced by handleExclusiveTrylockFunctionAttr(), handleSharedTrylockFunctionAttr(), and handleTryAcquireCapabilityAttr().
Definition at line 515 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Decl::hasAttr().
Referenced by typeHasCapability().
|
static |
If Expr is a valid integer constant, get the value of the integer expression and return success or failure.
May output an error.
Definition at line 248 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::Sema::Diag(), getAttrLoc(), getAttrName(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), I, clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and UINT_MAX.
Referenced by checkPositiveIntArgument(), clang::Sema::CheckRegparmAttr(), handleAMDGPUFlatWorkGroupSizeAttr(), handleAMDGPUNumSGPRAttr(), handleAMDGPUNumVGPRAttr(), handleAMDGPUWavesPerEUAttr(), handleConstructorAttr(), handleDestructorAttr(), handleFormatAttr(), handleInitPriorityAttr(), handleLayoutVersion(), handlePassObjectSizeAttr(), handleSubGroupSize(), and handleWorkGroupSize().
|
static |
checkUnusedDeclAttributes - Check a list of attributes to see if it contains any decl attributes that we should warn about.
Definition at line 6616 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeList::getKind(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getNext(), clang::AttributeList::getRange(), clang::AttributeList::IgnoredAttribute, clang::AttributeList::isInvalid(), clang::AttributeList::isUsedAsTypeAttr(), and clang::AttributeList::UnknownAttribute.
|
static |
Actually emit an availability diagnostic for a reference to an unavailable decl.
| Ctx | The context that the reference occurred in |
| ReferringDecl | The exact declaration that was referenced. |
| OffendingDecl | A related decl to ReferringDecl that has an availability attribute corrisponding to K attached to it. Note that this may not be the same as ReferringDecl, i.e. if an EnumDecl is annotated and we refer to a member EnumConstantDecl, ReferringDecl is the EnumConstantDecl and OffendingDecl is the EnumDecl. |
Definition at line 7016 of file SemaDeclAttr.cpp.
References clang::AR_Available, clang::AR_Deprecated, clang::AR_NotYetIntroduced, clang::AR_Unavailable, clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::Sema::Diag(), findEnclosingDeclToAnnotate(), clang::Sema::getASTContext(), clang::Decl::getAttr(), getAttrForPlatform(), clang::CharSourceRange::getCharRange(), clang::NamedDecl::getDeclName(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::Sema::getLocForEndOfToken(), clang::NamedDecl::getMostRecentDecl(), clang::TargetInfo::getPlatformMinVersion(), clang::Decl::getPreviousDecl(), clang::Sema::getSourceManager(), clang::ASTContext::getTargetInfo(), clang::SourceManager::isInSystemHeader(), clang::CharSourceRange::isValid(), Replacement, shouldDiagnoseAvailabilityByDefault(), and ShouldDiagnoseAvailabilityInContext().
Referenced by EmitAvailabilityWarning(), and handleDelayedAvailabilityCheck().
|
static |
Definition at line 7267 of file SemaDeclAttr.cpp.
References clang::Sema::DelayedDiagnostics::add(), clang::Sema::DelayedDiagnostics, DoEmitAvailabilityWarning(), clang::Sema::getCurLexicalContext(), clang::sema::DelayedDiagnostic::makeAvailability(), and clang::Sema::DelayedDiagnostics::shouldDelayDiagnostics().
Referenced by clang::Sema::DiagnoseAvailabilityOfDecl().
Definition at line 6991 of file SemaDeclAttr.cpp.
Referenced by DoEmitAvailabilityWarning().
|
static |
Definition at line 6828 of file SemaDeclAttr.cpp.
References clang::Decl::attrs(), clang::ASTContext::getLangOpts(), clang::TargetInfo::getPlatformName(), and clang::ASTContext::getTargetInfo().
Referenced by DoEmitAvailabilityWarning(), and ShouldDiagnoseAvailabilityInContext().
|
static |
A helper function to provide Attribute Location for the Attr types AND the AttributeList.
Definition at line 226 of file SemaDeclAttr.cpp.
Referenced by checkFunctionOrMethodParameterIndex(), and checkUInt32Argument().
|
static |
Definition at line 229 of file SemaDeclAttr.cpp.
References clang::AttributeList::getLoc().
|
static |
A helper function to provide Attribute Name for the Attr types AND the AttributeList.
Definition at line 238 of file SemaDeclAttr.cpp.
Referenced by checkFunctionOrMethodParameterIndex(), checkParamIsIntegerType(), and checkUInt32Argument().
|
static |
Definition at line 241 of file SemaDeclAttr.cpp.
References clang::AttributeList::getName().
|
static |
getFormatAttrKind - Map from format attribute names to supported format types.
Definition at line 3157 of file SemaDeclAttr.cpp.
References CFStringFormat, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.
Referenced by handleFormatAttr().
getFunctionOrMethodNumParams - Return number of function or method parameters.
It is an error to call this on a K&R function (use hasFunctionProto first).
Definition at line 87 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), handleAnyX86InterruptAttr(), handleFormatAttr(), handleMipsInterruptAttr(), and handleNonNullAttr().
|
static |
Definition at line 104 of file SemaDeclAttr.cpp.
Referenced by handleAnyX86InterruptAttr(), handleFormatArgAttr(), handleFormatAttr(), and handleNonNullAttr().
Definition at line 95 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by clang::Sema::AddAllocAlignAttr(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), handleFormatArgAttr(), handleFormatAttr(), handleNonNullAttr(), and handleOwnershipAttr().
|
static |
Definition at line 120 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), handleAnyX86InterruptAttr(), handleRestrictAttr(), and handleReturnsNonNullAttr().
Definition at line 114 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by clang::Sema::AddAllocAlignAttr(), clang::Sema::AddAssumeAlignedAttr(), handleAnyX86InterruptAttr(), handleFormatArgAttr(), handleMipsInterruptAttr(), handleRestrictAttr(), and handleReturnsNonNullAttr().
|
static |
Definition at line 177 of file SemaDeclAttr.cpp.
References clang::AttributeList::getNumArgs(), and clang::AttributeList::hasParsedType().
Referenced by checkAttributeNumArgsImpl().
|
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 472 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Type::getPointeeType().
Referenced by checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), and clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody().
|
static |
Definition at line 5150 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttributeAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), E, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), and I.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5673 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 716 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 729 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1829 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::FunctionDecl::isThisDeclarationADefinition().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3505 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignedAttr(), clang::Decl::addAttr(), clang::Expr::containsUnexpandedParameterPack(), clang::Sema::Context, clang::Sema::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), E, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getEllipsisLoc(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), clang::Stmt::getSourceRange(), clang::AttributeList::isPackExpansion(), and clang::Expr::isValueDependent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3454 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignValueAttr(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1528 of file SemaDeclAttr.cpp.
References clang::Sema::AddAllocAlignAttr(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 821 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttributeAtLeastNumArgs(), checkAttributeAtMostNumArgs(), checkParamIsIntegerType(), checkPositiveIntArgument(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4032 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and clang::Sema::mergeAlwaysInlineAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5421 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), and clang::AttributeList::getName().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5479 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5491 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getLoc().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5449 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and clang::AttributeList::getNumArgs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1992 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionMethodOrBlock, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ValueDecl::getType(), clang::Type::isBlockPointerType(), clang::AttributeList::isCXX11Attribute(), isFunctionOrMethodOrBlock(), and clang::Type::isFunctionPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3436 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), I, and clang::Decl::specific_attrs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5306 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionWithProtoType, clang::AttributeList::getAttributeSpellingListIndex(), getFunctionOrMethodNumParams(), getFunctionOrMethodParamRange(), getFunctionOrMethodParamType(), getFunctionOrMethodResultSourceRange(), getFunctionOrMethodResultType(), clang::ASTContext::getIntTypeForBitwidth(), clang::AttributeList::getLoc(), clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::ASTContext::getTypeSize(), hasFunctionProto(), isFunctionOrMethod(), isInstanceMethod(), clang::Type::isPointerType(), and clang::CXXMethodDecl::isStaticOverloadedOperator().
Referenced by handleInterruptAttr().
|
static |
Definition at line 4529 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkAttributeNumArgs(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), getFunctionOrMethodParamType(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), hasFunctionProto(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), isFunctionOrMethod(), and clang::Type::isPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5182 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and clang::AttributeList::getNumArgs().
Referenced by handleInterruptAttr().
|
static |
Definition at line 5666 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 765 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 752 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1520 of file SemaDeclAttr.cpp.
References clang::Sema::AddAssumeAlignedAttr(), E, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getNumArgs(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
|
static |
Definition at line 2414 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::AMK_None, checkAttributeNumArgs(), clang::Sema::Context, clang::Sema::Diag(), clang::IdentifierTable::get(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getAvailabilityDeprecated(), clang::AttributeList::getAvailabilityIntroduced(), clang::AttributeList::getAvailabilityObsoleted(), clang::VersionTuple::getMajor(), clang::AttributeList::getMessageExpr(), clang::IdentifierInfo::getName(), clang::AttributeList::getRange(), clang::AttributeList::getReplacementExpr(), clang::AttributeList::getStrictLoc(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), clang::AttributeList::getUnavailableLoc(), clang::IdentifierLoc::Ident, clang::ASTContext::Idents, clang::SourceLocation::isValid(), clang::IdentifierLoc::Loc, clang::Sema::mergeAvailabilityAttr(), Replacement, and clang::AvailabilityChange::Version.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5372 of file SemaDeclAttr.cpp.
References checkAttributeNumArgs(), clang::Sema::Diag(), clang::ExpectedFunction, clang::Decl::getLocation(), isFunctionOrMethod(), and S.
Referenced by handleInterruptAttr().
|
static |
Definition at line 5385 of file SemaDeclAttr.cpp.
References checkAttributeNumArgs(), clang::Sema::Diag(), clang::ExpectedFunction, clang::Decl::getLocation(), isFunctionOrMethod(), and S.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2709 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), and clang::ast_matchers::type.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1124 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttributeAtLeastNumArgs(), checkForConsumableClass(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4134 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::CC_AAPCS, clang::CC_AAPCS_VFP, clang::Sema::CheckCallingConvAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getKind(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and hasDeclarator().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5642 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getKind(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4859 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getName(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4870 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getName(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3018 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckAssignmentConstraints(), clang::Sema::Compatible, clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::DeclRefExpr::getDecl(), clang::Expr::getExprLoc(), clang::AttributeList::getLoc(), clang::Decl::getLocation(), clang::AttributeList::getName(), clang::DeclarationNameInfo::getName(), clang::DeclRefExpr::getNameInfo(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getPointerType(), clang::AttributeList::getRange(), clang::ValueDecl::getType(), clang::VarDecl::hasLocalStorage(), clang::DeclRefExpr::hasQualifier(), clang::Sema::NoteAllOverloadCandidates(), clang::ASTContext::OverloadTy, and clang::Sema::ResolveSingleFunctionTemplateSpecialization().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1862 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getName(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1910 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), AttributeLangSupport::Cpp, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::Sema::LangOpts, and clang::Sema::mergeCommonAttr().
Referenced by ProcessDeclAttribute().
|
static |
Handles semantic checking for features that are common to all attributes, such as checking whether a parameter was properly specified, or the correct number of arguments were passed, etc.
Definition at line 5831 of file SemaDeclAttr.cpp.
References checkAttributeAtLeastNumArgs(), checkAttributeAtMostNumArgs(), checkAttributeNumArgs(), clang::AttributeList::diagnoseAppertainsTo(), clang::AttributeList::diagnoseLangOpts(), clang::AttributeList::getKind(), clang::AttributeList::getMaxArgs(), clang::AttributeList::getMinArgs(), clang::AttributeList::hasCustomParsing(), clang::AttributeList::hasVariadicArg(), and clang::AttributeList::UnknownAttribute.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4057 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2146 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getNumArgs(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1085 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5131 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getRange(), clang::ASTContext::getTargetInfo(), clang::VarDecl::getTSCSpec(), clang::VarDecl::hasLocalStorage(), clang::TargetInfo::isTLSSupported(), and clang::TSCS_unspecified.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 7200 of file SemaDeclAttr.cpp.
References clang::sema::DelayedDiagnostic::Availability, DoEmitAvailabilityWarning(), clang::sema::DelayedDiagnostic::getAvailabilityMessage(), clang::sema::DelayedDiagnostic::getAvailabilityOffendingDecl(), clang::sema::DelayedDiagnostic::getAvailabilityReferringDecl(), clang::sema::DelayedDiagnostic::getAvailabilityResult(), clang::sema::DelayedDiagnostic::getObjCProperty(), clang::sema::DelayedDiagnostic::getUnknownObjCClass(), clang::sema::DelayedDiagnostic::Kind, clang::sema::DelayedDiagnostic::Loc, and clang::sema::DelayedDiagnostic::Triggered.
Referenced by clang::Sema::PopParsingDeclaration().
|
static |
Handle a delayed forbidden-type diagnostic.
Definition at line 6802 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::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 2070 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Scope::FunctionDeclarationScope, clang::AttributeList::getAttributeSpellingListIndex(), clang::Scope::getFlags(), clang::AttributeList::getLoc(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5728 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttributeAtMostNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Sema::getLangOpts(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::AttributeList::getScopeName(), clang::AttributeList::hasScope(), clang::AttributeList::isArgExpr(), clang::AttributeList::isCXX11Attribute(), clang::AttributeList::isDeclspecAttribute(), clang::IdentifierInfo::isStr(), and Replacement.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2157 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getNumArgs(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1021 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::Stmt::getLocStart(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2097 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getName(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5572 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::SourceRange::getBegin(), clang::TargetInfo::getCXXABI(), clang::AttributeList::getKind(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ASTContext::getTargetInfo(), clang::FunctionDecl::isInlined(), clang::TargetCXXABI::isMicrosoft(), clang::Sema::mergeDLLExportAttr(), and clang::Sema::mergeDLLImportAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 964 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionConditionAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3081 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, and clang::AttributeList::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 891 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2531 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttributeAtLeastNumArgs(), checkAttributeAtMostNumArgs(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1296 of file SemaDeclAttr.cpp.
References 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 3105 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::Sema::Diag(), clang::Expr::EvaluateAsInt(), clang::AttributeList::getArgAsExpr(), clang::Type::getAs(), clang::AttributeList::getAttributeSpellingListIndex(), getFunctionOrMethodParamRange(), getFunctionOrMethodParamType(), getFunctionOrMethodResultType(), clang::AttributeList::getLoc(), clang::AttributeList::getRange(), clang::Stmt::getSourceRange(), isCFStringType(), clang::Type::isCharType(), isNSStringType(), and clang::Type::isPointerType().
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 3240 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), CFStringFormat, checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::IdentifierTable::get(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getArgAsIdent(), clang::Type::getAs(), clang::AttributeList::getAttributeSpellingListIndex(), getFormatAttrKind(), getFunctionOrMethodNumParams(), getFunctionOrMethodParamRange(), getFunctionOrMethodParamType(), clang::AttributeList::getLoc(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::Stmt::getSourceRange(), clang::IdentifierLoc::Ident, clang::ASTContext::Idents, IgnoredFormat, InvalidFormat, clang::AttributeList::isArgIdent(), isCFStringType(), clang::Type::isCharType(), isFunctionOrMethodVariadic(), isInstanceMethod(), isNSStringType(), clang::Type::isPointerType(), clang::Sema::mergeFormatAttr(), normalizeName(), NSStringFormat, and StrftimeFormat.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4089 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Sema::getLangOpts(), clang::DeclaratorDecl::getLocStart(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::FunctionDecl::isInlineSpecified(), clang::SourceRange::isValid(), and clang::Type::isVoidType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4122 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getRange(), and clang::FunctionDecl::isInlineSpecified().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 671 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1870 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getName(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1345 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkIBOutletCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1354 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkIBOutletCommon(), clang::Sema::Context, clang::Sema::Diag(), clang::IdentifierTable::get(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getDeclContext(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::DeclContext::getParent(), clang::AttributeList::getRange(), clang::Sema::getScopeForContext(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::AttributeList::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::Sema::getTypeName(), clang::AttributeList::hasParsedType(), clang::ASTContext::Idents, clang::Type::isBuiltinType(), clang::Type::isObjCIdType(), and clang::Type::isObjCObjectType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1807 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::FunctionDecl::isThisDeclarationADefinition().
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 3178 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::AttributeList::getAttributeSpellingListIndex(), clang::ASTContext::getBaseElementType(), clang::Sema::getCurFunctionOrMethodDecl(), clang::Sema::getLangOpts(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::Stmt::getSourceRange(), and clang::AttributeList::setInvalid().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5811 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and clang::Sema::mergeInternalLinkageAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5398 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), handleAnyX86InterruptAttr(), handleARMInterruptAttr(), handleAVRInterruptAttr(), handleMipsInterruptAttr(), and handleMSP430InterruptAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4518 of file SemaDeclAttr.cpp.
References clang::Sema::AddLaunchBoundsAttr(), checkAttributeAtLeastNumArgs(), checkAttributeAtMostNumArgs(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getNumArgs(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5528 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::Stmt::getSourceRange(), and clang::LangOptions::MSVC2015.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 902 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 916 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), checkAttributeAtLeastNumArgs(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4044 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), and clang::Sema::mergeMinSizeAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5247 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeList::getAttributeSpellingListIndex(), getFunctionOrMethodNumParams(), getFunctionOrMethodResultType(), clang::AttributeList::getLoc(), clang::Decl::getLocation(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), hasFunctionProto(), isFunctionOrMethod(), and clang::Type::isVoidType().
Referenced by handleInterruptAttr().
|
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 3784 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Sema::AddModeAttr(), clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), and Name.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5115 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::ASTConsumer::AssignInheritanceModel(), AttributeLangSupport::C, clang::Sema::Consumer, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::AttributeList::getSemanticSpelling(), clang::Sema::LangOpts, and clang::Sema::mergeMSInheritanceAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5211 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), checkAttributeNumArgs(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::Stmt::getSourceRange(), clang::AttributeList::isArgExpr(), and clang::Expr::isIntegerConstantExpr().
Referenced by handleInterruptAttr().
|
static |
Definition at line 1922 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Sema::getASTContext(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::AttributeList::isDeclspecAttribute().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1958 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckNoCallerSavedRegsAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3940 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1441 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), getFunctionOrMethodNumParams(), getFunctionOrMethodParamRange(), getFunctionOrMethodParamType(), clang::AttributeList::getLoc(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), clang::Stmt::getSourceRange(), I, clang::Sema::inTemplateInstantiation(), clang::Type::isDependentType(), clang::SourceLocation::isFileID(), isFunctionOrMethodVariadic(), and clang::Sema::isValidPointerAttrType().
Referenced by handleNonNullAttrParameter(), and ProcessDeclAttribute().
|
static |
Definition at line 1485 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getFunctionType(), clang::AttributeList::getLoc(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), clang::ParmVarDecl::getSourceRange(), clang::ValueDecl::getType(), and handleNonNullAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1942 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::CheckNoReturnAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and hasDeclarator().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5768 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttributeAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), E, clang::ExpectedFunctionOrMethod, clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getLocation(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), I, isGlobalVar(), and clang::parseSanitizerValue().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5794 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunction, clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), isGlobalVar(), and normalizeName().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2087 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getName(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4640 of file SemaDeclAttr.cpp.
References clang::Sema::AddNSConsumedAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getKind(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4692 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionMethodOrParameter, clang::ExpectedFunctionOrMethod, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getKind(), clang::Sema::getLangOpts(), clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::Type::getPointeeType(), clang::AttributeList::getRange(), clang::FunctionDecl::getReturnType(), hasDeclarator(), clang::QualType::isNull(), clang::AttributeList::isUsedAsTypeAttr(), isValidSubjectOfCFAttribute(), isValidSubjectOfNSAttribute(), isValidSubjectOfNSReturnsRetainedAttribute(), and clang::Property.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4976 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::getASTMutationListener(), clang::AttributeList::getAttributeSpellingListIndex(), clang::RecordDecl::getDefinition(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4881 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), clang::IdentifierInfo::isStr(), and clang::Type::isVoidPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4911 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, and clang::AttributeList::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4925 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, and clang::AttributeList::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4943 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getDeclContext(), clang::AttributeList::getRange(), and clang::ObjCInterfaceDecl::setHasDesignatedInitializers().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2693 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getLocation(), clang::AttributeList::getRange(), and clang::Type::isObjCObjectPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2634 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::ast_matchers::decl, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ObjCMethodDecl::getReturnType(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), clang::Type::isObjCObjectPointerType(), clang::IdentifierLoc::Loc, and clang::OMF_init.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2664 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getLocation(), clang::AttributeList::getRange(), and clang::Type::isCARCBridgableType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4999 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::ExpectedVariable, clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and hasDeclarator().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5007 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getRange(), clang::ValueDecl::getType(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, and clang::ast_matchers::type.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4837 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getDeclContext(), clang::Decl::getLocStart(), clang::ObjCMethodDecl::getMethodFamily(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and clang::OMF_dealloc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4809 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::Type::isObjCRetainableType(), clang::Type::isPointerType(), and clang::Type::isReferenceType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4961 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2180 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5868 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Sema::getLangOpts(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::Decl::getSourceRange(), clang::Decl::hasAttr(), clang::Type::isImageType(), clang::Decl::isInvalidDecl(), clang::Type::isPipeType(), and clang::Decl::setInvalidDecl().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5819 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4050 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), and clang::Sema::mergeOptimizeNoneAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1634 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::Sema::Diag(), clang::IdentifierTable::get(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), getFunctionOrMethodParamType(), clang::Preprocessor::getIdentifierTable(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::Stmt::getSourceRange(), I, clang::IdentifierLoc::Ident, clang::Type::isAnyPointerType(), clang::AttributeList::isArgIdent(), clang::Type::isBlockPointerType(), clang::Type::isIntegerType(), normalizeName(), clang::Sema::PP, and clang::Decl::specific_attrs().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1302 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlign(), clang::Type::isDependentType(), and clang::Type::isIncompleteType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4366 of file SemaDeclAttr.cpp.
References clang::Sema::AddParameterABIAttr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1162 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1048 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Stmt::getLocStart(), clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::Stmt::getSourceRange(), and clang::Decl::hasAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 680 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 646 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5699 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5710 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), checkAttributeAtLeastNumArgs(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1898 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), getFunctionOrMethodResultSourceRange(), getFunctionOrMethodResultType(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::Type::isAnyPointerType(), and clang::Type::isBlockPointerType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1507 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), attrNonNullArgCheck(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), getFunctionOrMethodResultSourceRange(), getFunctionOrMethodResultType(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1199 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2971 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkSectionName(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::isValidSectionSpecifier(), and clang::Sema::mergeSectionAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2729 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Decl::addAttr(), clang::Type::castAs(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionMethodOrBlock, clang::AttributeList::getArgAsExpr(), clang::Type::getAs(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getFunctionType(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1247 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkForConsumableClass(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4070 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::CUDADiagIfHostCode(), clang::Sema::CurrentCUDATarget(), clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Sema::getLangOpts(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 878 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Applies the given attribute to the Decl without performing any additional semantic checking.
Definition at line 396 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
|
static |
Definition at line 403 of file SemaDeclAttr.cpp.
References S.
Referenced by handleSimpleAttributeWithExclusions(), and ProcessDeclAttribute().
|
static |
Applies the given attribute to the Decl so long as the Decl doesn't already have one of the given incompatible attributes.
Definition at line 412 of file SemaDeclAttr.cpp.
References clang::AttributeList::getName(), clang::AttributeList::getRange(), handleSimpleAttributeWithExclusions(), and S.
|
static |
Definition at line 2896 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and clang::Stmt::getSourceRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4235 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttributeAtLeastNumArgs(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, E, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), and I.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3006 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::checkTargetAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1271 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkForConsumableClass(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), and clang::IdentifierLoc::Loc.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1878 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 3362 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedUnion, clang::RecordDecl::field_begin(), clang::RecordDecl::field_end(), clang::Type::getAsUnionType(), clang::AttributeList::getAttributeSpellingListIndex(), clang::RecordType::getDecl(), clang::AttributeList::getLoc(), clang::Decl::getLocation(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlign(), clang::ASTContext::getTypeSize(), clang::TypedefNameDecl::getUnderlyingType(), clang::Type::hasFloatingRepresentation(), clang::TagDecl::isBeingDefined(), clang::TagDecl::isCompleteDefinition(), clang::Type::isIncompleteType(), clang::TagDecl::isUnion(), clang::Type::isUnionType(), and clang::Type::isVectorType().
Referenced by ProcessDeclAttribute(), and clang::Sema::ProcessDeclAttributeDelayed().
|
static |
Definition at line 5685 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkTryLockFunAttrCommon(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4574 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), checkAttributeNumArgs(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedVariable, clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLayoutCompatible(), clang::AttributeList::getLoc(), clang::AttributeList::getMatchingCType(), clang::AttributeList::getMustBeNull(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::Sema::GetTypeFromParser(), clang::IdentifierLoc::Ident, and clang::AttributeList::isArgIdent().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2124 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedForMaybeUnused, clang::AttributeList::getAttributeSpellingListIndex(), clang::Sema::getLangOpts(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::AttributeList::getScopeName(), clang::AttributeList::isCXX11Attribute(), and isStaticDataMember().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2107 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedVariableOrFunction, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and isFunctionOrMethod().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 5065 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), AttributeLangSupport::C, clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::isHexDigit(), clang::AttributeList::isMicrosoftAttribute(), clang::Sema::LangOpts, and clang::Sema::mergeUuidAttr().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2015 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::RecordDecl::fields(), clang::Decl::getAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getRange(), and I.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2917 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Sema::getASTContext(), clang::Decl::getAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getTypeArg(), clang::Sema::GetTypeFromParser(), clang::AttributeList::hasParsedType(), clang::ASTContext::hasSameType(), clang::Type::isBooleanType(), clang::Type::isExtVectorType(), clang::Type::isFloatingType(), and clang::Type::isIntegralType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2581 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::LangAS::Default, clang::Sema::Diag(), clang::ExpectedTypeOrNamespace, clang::AttributeList::getAttributeSpellingListIndex(), clang::SourceRange::getBegin(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::hasProtectedVisibility(), clang::Sema::mergeTypeVisibilityAttr(), clang::Sema::mergeVisibilityAttr(), and clang::ast_matchers::type.
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2820 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getFunctionType(), clang::Sema::getLangOpts(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::FunctionType::getReturnType(), clang::AttributeList::getScopeName(), clang::AttributeList::isCXX11Attribute(), and clang::Type::isVoidType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2845 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Decl::canBeWeakImported(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedVariableOrFunction, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ASTContext::getTargetInfo(), and clang::TargetInfo::getTriple().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 1743 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getDeclContext(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), and clang::DeclContext::getRedeclContext().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 2870 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkUInt32Argument(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsExpr(), clang::Decl::getAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and clang::Stmt::getSourceRange().
|
static |
Definition at line 5503 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ValueDecl::getType(), clang::TypedefNameDecl::getUnderlyingType(), clang::Type::isFunctionPointerType(), and clang::Type::isFunctionType().
Referenced by ProcessDeclAttribute().
|
static |
Definition at line 4604 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkFunctionOrMethodParameterIndex(), clang::Sema::Context, clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
Return true if the given decl has a declarator that should have been processed by Sema::GetTypeForDeclarator.
Definition at line 69 of file SemaDeclAttr.cpp.
Referenced by handleCallConvAttr(), handleNoReturnAttr(), handleNSReturnsRetainedAttr(), and handleObjCOwnershipAttr().
hasFunctionProto - Return true if the given decl has a argument information.
This decl should have already passed isFunctionOrMethod or isFunctionOrMethodOrBlock.
Definition at line 78 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), and handleMipsInterruptAttr().
Definition at line 537 of file SemaDeclAttr.cpp.
References E, and typeHasCapability().
Referenced by checkAttrArgsAreCapabilityObjs().
|
inlinestatic |
Definition at line 161 of file SemaDeclAttr.cpp.
References clang::IdentifierTable::get(), clang::Type::getAs(), clang::RecordType::getDecl(), clang::NamedDecl::getIdentifier(), clang::PointerType::getPointeeType(), clang::TagDecl::getTagKind(), clang::ASTContext::Idents, and clang::TTK_Struct.
Referenced by handleFormatArgAttr(), and handleFormatAttr().
|
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 6767 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::sema::DelayedDiagnostic::getForbiddenTypeDiagnostic(), clang::Decl::getLocation(), clang::ASTContext::getSourceManager(), and clang::SourceManager::isInSystemHeader().
Referenced by handleDelayedForbiddenType().
isFunctionOrMethod - Return true if the given decl has function type (function or function-typed variable) or an Objective-C method.
Definition at line 57 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by GetFullTypeForDeclarator(), handleAnyX86InterruptAttr(), handleArgumentWithTypeTagAttr(), handleAVRInterruptAttr(), handleAVRSignalAttr(), handleMipsInterruptAttr(), handleUsedAttr(), isFunctionOrMethodOrBlock(), and LookupVisibleDecls().
Return true if the given decl has function type (function or function-typed variable) or an Objective-C method or a block.
Definition at line 63 of file SemaDeclAttr.cpp.
References isFunctionOrMethod().
Referenced by checkFunctionOrMethodParameterIndex(), and handleAnalyzerNoReturnAttr().
Definition at line 128 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType(), and clang::FunctionProtoType::isVariadic().
Referenced by checkFunctionOrMethodParameterIndex(), handleFormatAttr(), and handleNonNullAttr().
Definition at line 5762 of file SemaDeclAttr.cpp.
References S.
Referenced by handleNoSanitizeAttr(), and handleNoSanitizeSpecificAttr().
Definition at line 139 of file SemaDeclAttr.cpp.
Referenced by checkFunctionOrMethodParameterIndex(), clang::getCursorKindForDecl(), handleAnyX86InterruptAttr(), and handleFormatAttr().
Check if the passed-in expression is of type int or bool.
Definition at line 422 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().
Referenced by checkTryLockFunAttrCommon().
|
inlinestatic |
Definition at line 145 of file SemaDeclAttr.cpp.
References clang::IdentifierTable::get(), clang::Type::getAs(), clang::NamedDecl::getIdentifier(), clang::ObjCObjectType::getInterface(), clang::ObjCObjectPointerType::getObjectType(), and clang::ASTContext::Idents.
Referenced by handleFormatArgAttr(), and handleFormatAttr().
Definition at line 4634 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), clang::Type::isPointerType(), and isValidSubjectOfNSAttribute().
Referenced by clang::Sema::AddNSConsumedAttr(), and handleNSReturnsRetainedAttr().
Definition at line 4628 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Type::isDependentType(), clang::ASTContext::isObjCNSObjectType(), and clang::Type::isObjCObjectPointerType().
Referenced by clang::Sema::AddNSConsumedAttr(), handleNSReturnsRetainedAttr(), and isValidSubjectOfCFAttribute().
Definition at line 4623 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), and clang::Type::isObjCRetainableType().
Referenced by clang::Sema::checkNSReturnsRetainedReturnType(), and handleNSReturnsRetainedAttr().
Pointer-like types in the default address space.
Definition at line 4334 of file SemaDeclAttr.cpp.
References clang::QualType::getAddressSpace(), clang::Type::getPointeeType(), clang::Type::hasPointerRepresentation(), and clang::Type::isDependentType().
Referenced by clang::Sema::AddParameterABIAttr(), and isValidSwiftErrorResultType().
Pointers and references to pointers in the default address space.
Definition at line 4353 of file SemaDeclAttr.cpp.
References clang::Qualifiers::empty(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Type::isDependentType(), and isValidSwiftContextType().
Referenced by clang::Sema::AddParameterABIAttr().
Pointers and references in the default address space.
Definition at line 4341 of file SemaDeclAttr.cpp.
References clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Type::getPointeeType(), and clang::Type::isDependentType().
Referenced by clang::Sema::AddParameterABIAttr().
|
static |
Definition at line 4463 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::Sema::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ActionResult< PtrTy, CompressInvalid >::getAs(), clang::ASTContext::getConstType(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), I, clang::InitializedEntity::InitializeParameter(), clang::ASTContext::IntTy, clang::Expr::isIntegerConstantExpr(), clang::Expr::isValueDependent(), and clang::Sema::PerformCopyInitialization().
Referenced by clang::Sema::AddLaunchBoundsAttr().
|
static |
Definition at line 2552 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::SourceRange::getBegin().
|
static |
Normalize the attribute, foo becomes foo.
Returns true if normalization was applied.
Definition at line 1625 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::AddModeAttr(), handleFormatAttr(), handleNoSanitizeSpecificAttr(), and handleOwnershipAttr().
|
static |
parseModeAttrArg - Parses attribute mode string and returns parsed type attribute.
Definition at line 3724 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::TargetInfo::getCharWidth(), clang::TargetInfo::getPointerWidth(), clang::TargetInfo::getRegisterWidth(), clang::ASTContext::getTargetInfo(), and clang::TargetInfo::getUnwindWordWidth().
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 5909 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::existsInTarget(), clang::AttributeList::getKind(), clang::AttributeList::getLoc(), clang::Decl::getLocation(), clang::AttributeList::getName(), clang::ASTContext::getTargetInfo(), handleAbiTagAttr(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), handleAliasAttr(), handleAlignedAttr(), handleAlignValueAttr(), handleAllocAlignAttr(), handleAllocSizeAttr(), handleAlwaysInlineAttr(), handleAMDGPUFlatWorkGroupSizeAttr(), handleAMDGPUNumSGPRAttr(), handleAMDGPUNumVGPRAttr(), handleAMDGPUWavesPerEUAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArgumentWithTypeTagAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAssumeAlignedAttr(), handleAvailabilityAttr(), handleAVRSignalAttr(), handleBlocksAttr(), handleCallableWhenAttr(), handleCallConvAttr(), handleCapabilityAttr(), handleCFAuditedTransferAttr(), handleCFUnknownTransferAttr(), handleCleanupAttr(), handleColdAttr(), handleCommonAttr(), handleCommonAttributeFeatures(), handleConstantAttr(), handleConstructorAttr(), handleConsumableAttr(), handleDeclspecThreadAttr(), handleDependencyAttr(), handleDeprecatedAttr(), handleDestructorAttr(), handleDiagnoseIfAttr(), handleDisableTailCallsAttr(), handleDLLAttr(), handleEnableIfAttr(), handleEnumExtensibilityAttr(), handleExclusiveTrylockFunctionAttr(), handleExternalSourceSymbolAttr(), handleExtVectorTypeAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHotAttr(), handleIBOutlet(), handleIBOutletCollection(), handleIFuncAttr(), handleInitPriorityAttr(), handleInternalLinkageAttr(), handleInterruptAttr(), handleLaunchBoundsAttr(), handleLayoutVersion(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleMinSizeAttr(), handleModeAttr(), handleMSInheritanceAttr(), handleNakedAttr(), handleNoCallerSavedRegsAttr(), handleNoDebugAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNoSanitizeAttr(), handleNoSanitizeSpecificAttr(), handleNotTailCalledAttr(), handleNSConsumedAttr(), handleNSReturnsRetainedAttr(), handleObjCBoxable(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCIndependentClass(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRuntimeName(), handleObjCSuppresProtocolAttr(), handleOpenCLAccessAttr(), handleOpenCLNoSVMAttr(), handleOptimizeNoneAttr(), handleOwnershipAttr(), handlePackedAttr(), handleParameterABIAttr(), handleParamTypestateAttr(), handlePassObjectSizeAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleRestrictAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedAttr(), handleSharedTrylockFunctionAttr(), handleSimpleAttributeWithExclusions(), handleSubGroupSize(), handleSuppressAttr(), handleTargetAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUnusedAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleX86ForceAlignArgPointerAttr(), handleXRayLogArgsAttr(), clang::AttributeList::IgnoredAttribute, clang::AttributeList::isCXX11Attribute(), clang::AttributeList::isDeclspecAttribute(), clang::AttributeList::isInvalid(), clang::AttributeList::isStmtAttr(), clang::AttributeList::isTypeAttr(), S, clang::SwiftContext, clang::SwiftErrorResult, clang::SwiftIndirectResult, and clang::AttributeList::UnknownAttribute.
Referenced by clang::Sema::ProcessAccessDeclAttributeList(), and clang::Sema::ProcessDeclAttributeList().
|
static |
Definition at line 6966 of file SemaDeclAttr.cpp.
References clang::ASTContext::getTargetInfo(), and clang::TargetInfo::getTriple().
Referenced by DoEmitAvailabilityWarning().
|
static |
whether we should emit a diagnostic for K and DeclVersion in the context of Ctx.
For example, we should emit an unavailable diagnostic in a deprecated context, but not the other way around.
Definition at line 6903 of file SemaDeclAttr.cpp.
References clang::AR_Available, clang::AR_Deprecated, clang::AR_NotYetIntroduced, clang::Sema::Context, getAttrForPlatform(), clang::Decl::getDeclContext(), and clang::Sema::OriginalLexicalContext.
Referenced by DoEmitAvailabilityWarning().
|
static |
The diagnostic we should emit for D, and the declaration that originated it, or AR_Available.
| D | The declaration to check. |
| Message | If non-null, this will be populated with the message from the availability attribute that is selected. |
Definition at line 6863 of file SemaDeclAttr.cpp.
References clang::AR_Available, clang::Type::getAs(), clang::Decl::getAvailability(), and Result.
Referenced by clang::Sema::DiagnoseAvailabilityOfDecl().
|
static |
Check if passed in Decl is a pointer type.
Note that this function may produce an error message.
Definition at line 447 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Type::getAs(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::ValueDecl::getType(), and threadSafetyCheckIsSmartPointer().
Referenced by handlePtGuardedByAttr(), and handlePtGuardedVarAttr().
|
static |
Definition at line 430 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, clang::DeclContextLookupResult::empty(), clang::DeclarationNameTable::getCXXOperatorName(), clang::RecordType::getDecl(), and clang::DeclContext::lookup().
Referenced by checkRecordTypeForCapability(), and threadSafetyCheckIsPointer().
Definition at line 527 of file SemaDeclAttr.cpp.
References checkRecordTypeForCapability(), and checkTypedefTypeForCapability().
Referenced by checkAcquireOrderAttrCommon(), checkAttrArgsAreCapabilityObjs(), and isCapabilityExpr().
|
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 2236 of file SemaDeclAttr.cpp.
References clang::VersionTuple::empty().
Referenced by clang::Sema::mergeAvailabilityAttr().
1.8.6