clang
6.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 | handleNoEscapeAttr (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 &Attrs) |
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 &Attrs, 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 &Attrs) |
static void | handleObjCRequiresSuperAttr (Sema &S, Decl *D, const AttributeList &Attrs) |
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 Optional< AttributeInsertion > | createAttributeInsertion (const NamedDecl *D, const SourceManager &SM, const LangOptions &LangOpts) |
Returns a source location in which it's appropriate to insert a new attribute for the given declaration . More... | |
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 3184 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1438 of file SemaDeclAttr.cpp.
|
static |
Definition at line 693 of file SemaDeclAttr.cpp.
|
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 567 of file SemaDeclAttr.cpp.
|
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.
|
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.
|
static |
Check if the attribute has exactly as many args as Num.
May output an error.
Definition at line 196 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::CheckCallingConvAttr(), clang::Sema::CheckNoReturnAttr(), and clang::Sema::CheckRegparmAttr().
|
static |
Definition at line 183 of file SemaDeclAttr.cpp.
|
static |
Diagnose mutually exclusive attributes when present on a given declaration.
Returns true if diagnosed.
Definition at line 299 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2216 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::mergeAvailabilityAttr().
|
static |
Definition at line 1106 of file SemaDeclAttr.cpp.
|
static |
Definition at line 933 of file SemaDeclAttr.cpp.
|
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.
|
static |
Definition at line 655 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1332 of file SemaDeclAttr.cpp.
|
static |
Definition at line 741 of file SemaDeclAttr.cpp.
|
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 785 of file SemaDeclAttr.cpp.
|
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 811 of file SemaDeclAttr.cpp.
|
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.
Definition at line 483 of file SemaDeclAttr.cpp.
|
static |
Definition at line 859 of file SemaDeclAttr.cpp.
Definition at line 515 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Decl::hasAttr().
|
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.
Referenced by clang::Sema::CheckRegparmAttr().
|
static |
checkUnusedDeclAttributes - Check a list of attributes to see if it contains any decl attributes that we should warn about.
Definition at line 6669 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::ActOnCastExpr(), clang::Sema::ActOnTypeName(), clang::Sema::checkUnusedDeclAttributes(), and clang::Sema::CorrectDelayedTyposInExpr().
|
static |
Returns a source location in which it's appropriate to insert a new attribute for the given declaration .
Definition at line 7082 of file SemaDeclAttr.cpp.
References clang::Lexer::getLocForEndOfToken(), clang::SourceLocation::isInvalid(), and SM.
|
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 7112 of file SemaDeclAttr.cpp.
|
static |
Definition at line 7387 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::DiagnoseAvailabilityOfDecl().
Definition at line 7044 of file SemaDeclAttr.cpp.
References clang::Decl::getLocEnd(), and clang::Decl::getLocStart().
|
static |
Definition at line 6881 of file SemaDeclAttr.cpp.
|
static |
A helper function to provide Attribute Location for the Attr types AND the AttributeList.
Definition at line 226 of file SemaDeclAttr.cpp.
|
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.
|
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 3195 of file SemaDeclAttr.cpp.
References CFStringFormat, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.
|
static |
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().
|
static |
Definition at line 104 of file SemaDeclAttr.cpp.
Definition at line 95 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
|
static |
Definition at line 120 of file SemaDeclAttr.cpp.
Definition at line 114 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by clang::Sema::AddAllocAlignAttr().
|
static |
Definition at line 177 of file SemaDeclAttr.cpp.
References clang::AttributeList::getNumArgs(), and clang::AttributeList::hasParsedType().
|
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 clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody(), and clang::ASTContext::getTypeDeclType().
|
static |
Definition at line 5188 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5715 of file SemaDeclAttr.cpp.
|
static |
Definition at line 715 of file SemaDeclAttr.cpp.
|
static |
Definition at line 728 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1852 of file SemaDeclAttr.cpp.
|
static |
Definition at line 3543 of file SemaDeclAttr.cpp.
|
static |
Definition at line 3492 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1557 of file SemaDeclAttr.cpp.
|
static |
Definition at line 820 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4070 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5459 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5517 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5529 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5487 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2015 of file SemaDeclAttr.cpp.
|
static |
Definition at line 3474 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5344 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4567 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5220 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5704 of file SemaDeclAttr.cpp.
|
static |
Definition at line 764 of file SemaDeclAttr.cpp.
|
static |
Definition at line 751 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1549 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2192 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2437 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5410 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5423 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2732 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1123 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4172 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5680 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4897 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4908 of file SemaDeclAttr.cpp.
|
static |
Definition at line 3062 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1885 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1933 of file SemaDeclAttr.cpp.
|
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 5873 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4095 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2169 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1084 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5169 of file SemaDeclAttr.cpp.
|
static |
Definition at line 7320 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::PopParsingDeclaration().
|
static |
Handle a delayed forbidden-type diagnostic.
Definition at line 6855 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::PopParsingDeclaration().
|
static |
Definition at line 2093 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5770 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2180 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1020 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2120 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5610 of file SemaDeclAttr.cpp.
|
static |
Definition at line 963 of file SemaDeclAttr.cpp.
|
static |
Definition at line 3119 of file SemaDeclAttr.cpp.
|
static |
Definition at line 890 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2554 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1295 of file SemaDeclAttr.cpp.
|
static |
Handle attribute((format_arg((idx)))) attribute based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html.
Definition at line 3143 of file SemaDeclAttr.cpp.
|
static |
Handle attribute((format(type,idx,firstarg))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html.
Definition at line 3278 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4127 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4160 of file SemaDeclAttr.cpp.
|
static |
Definition at line 670 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1893 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1358 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1367 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1836 of file SemaDeclAttr.cpp.
|
static |
Handle attribute((init_priority(priority))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html.
Definition at line 3216 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5853 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5436 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4556 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5566 of file SemaDeclAttr.cpp.
|
static |
Definition at line 901 of file SemaDeclAttr.cpp.
|
static |
Definition at line 915 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4082 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5285 of file SemaDeclAttr.cpp.
|
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 3822 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5153 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5249 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1945 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1981 of file SemaDeclAttr.cpp.
|
static |
Definition at line 3978 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1533 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1454 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1498 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1965 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5810 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5836 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2110 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4678 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4730 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5014 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4919 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4949 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4963 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4981 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2716 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2657 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2687 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5037 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5045 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4875 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4847 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4999 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2203 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5910 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5861 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4088 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1663 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1301 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4404 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1161 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1047 of file SemaDeclAttr.cpp.
|
static |
Definition at line 679 of file SemaDeclAttr.cpp.
|
static |
Definition at line 645 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5741 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5752 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1921 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1520 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1198 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2994 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2752 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1246 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4108 of file SemaDeclAttr.cpp.
|
static |
Definition at line 877 of file SemaDeclAttr.cpp.
|
static |
Applies the given attribute to the Decl without performing any additional semantic checking.
Definition at line 396 of file SemaDeclAttr.cpp.
|
static |
Definition at line 403 of file SemaDeclAttr.cpp.
|
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.
|
static |
Definition at line 2919 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4273 of file SemaDeclAttr.cpp.
|
static |
Definition at line 3050 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1270 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1901 of file SemaDeclAttr.cpp.
|
static |
Definition at line 3400 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::ProcessDeclAttributeDelayed().
|
static |
Definition at line 5727 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4612 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2147 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2130 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5103 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2038 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2940 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2604 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2843 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2868 of file SemaDeclAttr.cpp.
|
static |
Definition at line 1772 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2893 of file SemaDeclAttr.cpp.
|
static |
Definition at line 5541 of file SemaDeclAttr.cpp.
|
static |
Definition at line 4642 of file SemaDeclAttr.cpp.
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.
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().
Definition at line 537 of file SemaDeclAttr.cpp.
|
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.
|
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 6820 of file SemaDeclAttr.cpp.
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 isFunctionOrMethodOrBlock(), clang::DeclContext::isLookupContext(), 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().
Definition at line 128 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType(), and clang::FunctionProtoType::isVariadic().
Definition at line 5804 of file SemaDeclAttr.cpp.
Definition at line 139 of file SemaDeclAttr.cpp.
Referenced by clang::ObjCMethodDecl::getCanonicalDecl(), clang::getCursorKindForDecl(), clang::ObjCMethodDecl::getMethodFamily(), and clang::ObjCMethodDecl::setMethodParams().
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().
|
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.
Definition at line 4672 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::AddNSConsumedAttr().
Definition at line 4666 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::AddNSConsumedAttr().
Definition at line 4661 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), and clang::Type::isObjCRetainableType().
Referenced by clang::Sema::checkNSReturnsRetainedReturnType().
Pointer-like types in the default address space.
Definition at line 4372 of file SemaDeclAttr.cpp.
References clang::Default, 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 4391 of file SemaDeclAttr.cpp.
References clang::Qualifiers::empty(), clang::Type::getAs(), clang::Type::getPointeeType(), clang::QualType::getQualifiers(), clang::Type::isDependentType(), and isValidSwiftContextType().
Pointers and references in the default address space.
Definition at line 4379 of file SemaDeclAttr.cpp.
References clang::Default, clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::Type::getPointeeType(), and clang::Type::isDependentType().
|
static |
Definition at line 4501 of file SemaDeclAttr.cpp.
|
static |
Definition at line 2575 of file SemaDeclAttr.cpp.
|
static |
Normalize the attribute, foo becomes foo.
Returns true if normalization was applied.
Definition at line 1654 of file SemaDeclAttr.cpp.
|
static |
parseModeAttrArg - Parses attribute mode string and returns parsed type attribute.
Definition at line 3762 of file SemaDeclAttr.cpp.
|
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 5951 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::ProcessAccessDeclAttributeList().
|
static |
Definition at line 7019 of file SemaDeclAttr.cpp.
|
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 6956 of file SemaDeclAttr.cpp.
|
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 6916 of file SemaDeclAttr.cpp.
References clang::AR_Available, clang::Type::getAs(), and clang::Decl::getAvailability().
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.
|
static |
Definition at line 430 of file SemaDeclAttr.cpp.
Definition at line 527 of file SemaDeclAttr.cpp.
|
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 2259 of file SemaDeclAttr.cpp.
References clang::VersionTuple::empty().
Referenced by clang::Sema::mergeAvailabilityAttr().