clang API Documentation
#include "clang/Sema/SemaInternal.h"
#include "clang/AST/ASTContext.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/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/Lookup.h"
#include "clang/Sema/Scope.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/MathExtras.h"
Go to the source code of this file.
enum FormatAttrKind |
CFStringFormat | |
NSStringFormat | |
StrftimeFormat | |
SupportedFormat | |
IgnoredFormat | |
InvalidFormat |
Definition at line 2458 of file SemaDeclAttr.cpp.
static bool attrNonNullArgCheck | ( | Sema & | S, |
QualType | T, | ||
const AttributeList & | Attr, | ||
SourceRange | AttrParmRange, | ||
SourceRange | TypeRange, | ||
bool | isReturnValue = false |
||
) | [static] |
Definition at line 1153 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 bool checkAcquireOrderAttrCommon | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr, | ||
SmallVectorImpl< Expr * > & | Args | ||
) | [static] |
Definition at line 618 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs(), checkAttributeAtLeastNumArgs(), clang::Sema::Diag(), clang::RecordType::getDecl(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), getRecordType(), clang::Decl::hasAttr(), and clang::Type::isDependentType().
Referenced by handleAcquiredAfterAttr(), and handleAcquiredBeforeAttr().
static void checkAttrArgsAreCapabilityObjs | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr, | ||
SmallVectorImpl< Expr * > & | Args, | ||
int | Sidx = 0 , |
||
bool | ParamIdxOk = false |
||
) | [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 492 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(), typeHasCapability(), and clang::UO_AddrOf.
Referenced by checkAcquireOrderAttrCommon(), checkGuardedByAttrCommon(), checkLockFunAttrCommon(), checkTryLockFunAttrCommon(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleReleaseCapabilityAttr(), and handleRequiresCapabilityAttr().
static bool checkAttributeAtLeastNumArgs | ( | Sema & | S, |
const AttributeList & | Attr, | ||
unsigned | Num | ||
) | [static] |
Check if the attribute has at least as many args as Num. May output an error.
Definition at line 193 of file SemaDeclAttr.cpp.
References checkAttributeNumArgsImpl().
Referenced by checkAcquireOrderAttrCommon(), checkTryLockFunAttrCommon(), handleCallableWhenAttr(), handleCommonAttributeFeatures(), handleLocksExcludedAttr(), and handleRequiresCapabilityAttr().
static bool checkAttributeAtMostNumArgs | ( | Sema & | S, |
const AttributeList & | Attr, | ||
unsigned | Num | ||
) | [static] |
Check if the attribute has at most as many args as Num. May output an error.
Definition at line 202 of file SemaDeclAttr.cpp.
References checkAttributeNumArgsImpl().
Referenced by handleCommonAttributeFeatures().
static bool checkAttributeNumArgs | ( | Sema & | S, |
const AttributeList & | Attr, | ||
unsigned | Num | ||
) | [static] |
Check if the attribute has exactly as many args as Num. May output an error.
Definition at line 184 of file SemaDeclAttr.cpp.
References checkAttributeNumArgsImpl().
Referenced by clang::Sema::CheckCallingConvAttr(), clang::Sema::CheckNoReturnAttr(), clang::Sema::CheckRegparmAttr(), handleArgumentWithTypeTagAttr(), handleAvailabilityAttr(), handleCommonAttributeFeatures(), handleMSP430InterruptAttr(), and handleTypeTagForDatatypeAttr().
static bool checkAttributeNumArgsImpl | ( | Sema & | S, |
const AttributeList & | Attr, | ||
unsigned | Num, | ||
unsigned | Diag, | ||
Compare | Comp | ||
) | [static] |
Definition at line 171 of file SemaDeclAttr.cpp.
References Diag(), clang::Sema::Diag(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), and getNumAttributeArgs().
Referenced by checkAttributeAtLeastNumArgs(), checkAttributeAtMostNumArgs(), and checkAttributeNumArgs().
static bool checkAttrMutualExclusion | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Diagnose mutually exclusive attributes when present on a given declaration. Returns true if diagnosed.
Definition at line 241 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::Decl::getAttr(), clang::AttributeList::getLoc(), and clang::AttributeList::getName().
static bool checkAvailabilityAttr | ( | Sema & | S, |
SourceRange | Range, | ||
IdentifierInfo * | Platform, | ||
VersionTuple | Introduced, | ||
VersionTuple | Deprecated, | ||
VersionTuple | Obsoleted | ||
) | [static] |
Definition at line 1742 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 bool checkForConsumableClass | ( | Sema & | S, |
const CXXMethodDecl * | MD, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 834 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 bool checkFunctionOrMethodParameterIndex | ( | Sema & | S, |
const Decl * | D, | ||
const AttributeList & | Attr, | ||
unsigned | AttrArgNum, | ||
const Expr * | IdxExpr, | ||
uint64_t & | Idx | ||
) | [static] |
Check if IdxExpr is a valid parameter index for a function or instance method D. May output an error.
Definition at line 255 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::Sema::Diag(), getFunctionOrMethodNumParams(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::Stmt::getSourceRange(), hasFunctionProto(), isFunctionOrMethod(), isFunctionOrMethodVariadic(), isInstanceMethod(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by handleArgumentWithTypeTagAttr(), handleFormatArgAttr(), handleNonNullAttr(), and handleOwnershipAttr().
static bool checkGuardedByAttrCommon | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr, | ||
Expr *& | Arg | ||
) | [static] |
Definition at line 580 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleGuardedByAttr(), and handlePtGuardedByAttr().
static bool checkIBOutletCommon | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1047 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeList::getLoc(), and clang::AttributeList::getName().
Referenced by handleIBOutlet(), and handleIBOutletCollection().
static bool checkLockFunAttrCommon | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr, | ||
SmallVectorImpl< Expr * > & | Args | ||
) | [static] |
Definition at line 669 of file SemaDeclAttr.cpp.
References checkAttrArgsAreCapabilityObjs().
Referenced by handleAcquireCapabilityAttr(), handleAssertExclusiveLockAttr(), and handleAssertSharedLockAttr().
static bool checkRecordTypeForCapability | ( | Sema & | S, |
QualType | Ty | ||
) | [static] |
Definition at line 406 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), clang::RecordType::getDecl(), getRecordType(), clang::CXXBaseSpecifier::getType(), clang::Decl::hasAttr(), clang::Type::isIncompleteType(), P, and threadSafetyCheckIsSmartPointer().
Referenced by typeHasCapability().
static bool checkTryLockFunAttrCommon | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr, | ||
SmallVectorImpl< Expr * > & | Args | ||
) | [static] |
Definition at line 707 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().
static bool checkTypedefTypeForCapability | ( | QualType | Ty | ) | [static] |
Definition at line 439 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Decl::hasAttr().
Referenced by typeHasCapability().
static bool checkUInt32Argument | ( | Sema & | S, |
const AttributeList & | Attr, | ||
const Expr * | Expr, | ||
uint32_t & | Val, | ||
unsigned | Idx = UINT_MAX |
||
) | [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 211 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIntegerConstant, clang::Sema::Context, clang::Sema::Diag(), clang::Expr::getExprLoc(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::Stmt::getSourceRange(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and UINT_MAX.
Referenced by clang::Sema::CheckRegparmAttr(), handleConstructorAttr(), handleDestructorAttr(), handleFormatAttr(), handleInitPriorityAttr(), handleLaunchBoundsAttr(), and handleWorkGroupSize().
static void checkUnusedDeclAttributes | ( | Sema & | S, |
const AttributeList * | A | ||
) | [static] |
checkUnusedDeclAttributes - Check a list of attributes to see if it contains any decl attributes that we should warn about.
Definition at line 4758 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::isInvalid(), and clang::AttributeList::isUsedAsTypeAttr().
Referenced by clang::Sema::ActOnCastExpr().
static void DoEmitAvailabilityWarning | ( | Sema & | S, |
DelayedDiagnostic::DDKind | K, | ||
Decl * | Ctx, | ||
const NamedDecl * | D, | ||
StringRef | Message, | ||
SourceLocation | Loc, | ||
const ObjCInterfaceDecl * | UnknownObjCClass, | ||
const ObjCPropertyDecl * | ObjCProperty, | ||
bool | ObjCPropertyAccess | ||
) | [static] |
Definition at line 4967 of file SemaDeclAttr.cpp.
References clang::sema::DelayedDiagnostic::Deprecation, clang::Sema::Diag(), clang::NamedDecl::getDeclName(), clang::Decl::getLocation(), isDeclDeprecated(), isDeclUnavailable(), and clang::sema::DelayedDiagnostic::Unavailable.
Referenced by clang::Sema::EmitAvailabilityWarning(), and handleDelayedAvailabilityCheck().
static FormatAttrKind getFormatAttrKind | ( | StringRef | Format | ) | [static] |
getFormatAttrKind - Map from format attribute names to supported format types.
Definition at line 2469 of file SemaDeclAttr.cpp.
References CFStringFormat, IgnoredFormat, InvalidFormat, NSStringFormat, StrftimeFormat, and SupportedFormat.
Referenced by handleFormatAttr().
static unsigned getFunctionOrMethodNumParams | ( | const Decl * | D | ) | [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 75 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), handleFormatAttr(), and handleNonNullAttr().
static SourceRange getFunctionOrMethodParamRange | ( | const Decl * | D, |
unsigned | Idx | ||
) | [static] |
Definition at line 92 of file SemaDeclAttr.cpp.
Referenced by handleFormatArgAttr(), handleFormatAttr(), and handleNonNullAttr().
static QualType getFunctionOrMethodParamType | ( | const Decl * | D, |
unsigned | Idx | ||
) | [static] |
Definition at line 83 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by handleArgumentWithTypeTagAttr(), handleFormatArgAttr(), handleFormatAttr(), handleNonNullAttr(), and handleOwnershipAttr().
static SourceRange getFunctionOrMethodResultSourceRange | ( | const Decl * | D | ) | [static] |
Definition at line 108 of file SemaDeclAttr.cpp.
Referenced by clang::Sema::AddAssumeAlignedAttr(), and handleReturnsNonNullAttr().
static QualType getFunctionOrMethodResultType | ( | const Decl * | D | ) | [static] |
Definition at line 102 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by clang::Sema::AddAssumeAlignedAttr(), handleFormatArgAttr(), and handleReturnsNonNullAttr().
static unsigned getNumAttributeArgs | ( | const AttributeList & | Attr | ) | [static] |
Definition at line 165 of file SemaDeclAttr.cpp.
References clang::AttributeList::getNumArgs(), and clang::AttributeList::hasParsedType().
Referenced by checkAttributeNumArgsImpl().
static const RecordType* getRecordType | ( | QualType | QT | ) | [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 395 of file SemaDeclAttr.cpp.
References clang::Type::getAs(), and clang::Type::getPointeeType().
Referenced by checkAcquireOrderAttrCommon(), checkAttrArgsAreCapabilityObjs(), checkRecordTypeForCapability(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), and clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody().
static void handleAcquireCapabilityAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 4087 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleAcquiredAfterAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 643 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleAcquiredBeforeAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 656 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAcquireOrderAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleAliasAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1481 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(), and clang::TargetInfo::getTriple().
Referenced by ProcessDeclAttribute().
static void handleAlignedAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2812 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignedAttr(), clang::Decl::addAttr(), clang::Expr::containsUnexpandedParameterPack(), clang::Sema::Context, clang::Sema::Diag(), clang::Sema::DiagnoseUnexpandedParameterPack(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getEllipsisLoc(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), clang::AttributeList::getRange(), and clang::AttributeList::isPackExpansion().
Referenced by ProcessDeclAttribute().
static void handleAlignValueAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2760 of file SemaDeclAttr.cpp.
References clang::Sema::AddAlignValueAttr(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleAlwaysInlineAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3139 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleAnalyzerNoReturnAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1583 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(), isFunctionOrMethod(), and clang::Type::isFunctionPointerType().
Referenced by ProcessDeclAttribute().
static void handleAnnotateAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2742 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), and clang::Decl::specific_attrs().
Referenced by clang::Sema::ProcessAccessDeclAttributeList(), and ProcessDeclAttribute().
static void handleArgumentWithTypeTagAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3395 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 void handleARMInterruptAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3870 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 void handleAssertCapabilityAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 4080 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 void handleAssertExclusiveLockAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 692 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleAssertSharedLockAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 679 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkLockFunAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleAssumeAlignedAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1246 of file SemaDeclAttr.cpp.
References clang::Sema::AddAssumeAlignedAttr(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getNumArgs(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleAttrWithMessage | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
static void handleAvailabilityAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1924 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttributeNumArgs(), clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getAvailabilityDeprecated(), clang::AttributeList::getAvailabilityIntroduced(), clang::AttributeList::getAvailabilityObsoleted(), clang::AttributeList::getLoc(), clang::AttributeList::getMessageExpr(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::AttributeList::getUnavailableLoc(), clang::IdentifierLoc::Ident, clang::SourceLocation::isValid(), clang::IdentifierLoc::Loc, clang::Sema::mergeAvailabilityAttr(), and clang::AvailabilityChange::Version.
Referenced by ProcessDeclAttribute().
static void handleBlocksAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2104 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 void handleCallableWhenAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 852 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttributeAtLeastNumArgs(), checkForConsumableClass(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getName(), clang::AttributeList::getNumArgs(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleCallConvAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3187 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 void handleCapabilityAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 4056 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 void handleCFAuditedTransferAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3649 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleCFUnknownTransferAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3659 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleCleanupAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2352 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::Expr::getExprLoc(), clang::AttributeList::getLoc(), clang::Decl::getLocation(), clang::AttributeList::getName(), clang::DeclarationNameInfo::getName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getParamDecl(), clang::ASTContext::getPointerType(), clang::AttributeList::getRange(), clang::ValueDecl::getType(), clang::VarDecl::hasLocalStorage(), clang::Sema::NoteAllOverloadCandidates(), clang::ASTContext::OverloadTy, and clang::Sema::ResolveSingleFunctionTemplateSpecialization().
Referenced by ProcessDeclAttribute().
static void handleColdAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1497 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleCommonAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1547 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, AttributeLangSupport::Cpp, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
static bool handleCommonAttributeFeatures | ( | Sema & | S, |
Scope * | scope, | ||
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [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 4158 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(), and clang::AttributeList::hasVariadicArg().
Referenced by ProcessDeclAttribute().
static void handleConstructorAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1695 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 void handleConsumableAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 811 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 void handleDeclspecThreadAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3851 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 void handleDelayedAvailabilityCheck | ( | Sema & | S, |
DelayedDiagnostic & | DD, | ||
Decl * | Ctx | ||
) | [static] |
Definition at line 5029 of file SemaDeclAttr.cpp.
References DoEmitAvailabilityWarning(), clang::sema::DelayedDiagnostic::getDeprecationDecl(), clang::sema::DelayedDiagnostic::getDeprecationMessage(), 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 void handleDelayedForbiddenType | ( | Sema & | S, |
DelayedDiagnostic & | diag, | ||
Decl * | decl | ||
) | [static] |
Handle a delayed forbidden-type diagnostic.
Definition at line 4919 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(), isForbiddenTypeAllowed(), clang::sema::DelayedDiagnostic::Loc, and clang::sema::DelayedDiagnostic::Triggered.
Referenced by clang::Sema::PopParsingDeclaration().
static void handleDependencyAttr | ( | Sema & | S, |
Scope * | Scope, | ||
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1661 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 void handleDeprecatedAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 4142 of file SemaDeclAttr.cpp.
References clang::Sema::Diag(), clang::AttributeList::getLoc(), and S.
Referenced by ProcessDeclAttribute().
static void handleDestructorAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1706 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 void handleDLLAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | A | ||
) | [static] |
Definition at line 3994 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::TargetCXXABI::isMicrosoft(), clang::Sema::mergeDLLExportAttr(), and clang::Sema::mergeDLLImportAttr().
Referenced by ProcessDeclAttribute().
static void handleEnableIfAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 783 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ActionResult< PtrTy, CompressInvalid >::get(), clang::AttributeList::getArgAsExpr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getRange(), clang::ActionResult< PtrTy, CompressInvalid >::isInvalid(), clang::Expr::isPotentialConstantExprUnevaluated(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::Sema::PerformContextuallyConvertToBool().
Referenced by ProcessDeclAttribute().
static void handleExclusiveTrylockFunctionAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 738 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 void handleExtVectorTypeAttr | ( | Sema & | S, |
Scope * | scope, | ||
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1021 of file SemaDeclAttr.cpp.
References clang::Sema::ExtVectorDecls, and clang::LazyVector< T, Source, Loader, LoadedStorage, LocalStorage >::push_back().
Referenced by ProcessDeclAttribute().
static void handleFormatArgAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Handle __attribute__((format_arg((idx)))) attribute based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
Definition at line 2417 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 void handleFormatAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Handle __attribute__((format(type,idx,firstarg))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
Definition at line 2549 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(), NSStringFormat, and StrftimeFormat.
Referenced by ProcessDeclAttribute().
static void handleGlobalAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3159 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::FixItHint::CreateReplacement(), clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::SourceRange::isValid(), and clang::Type::isVoidType().
Referenced by ProcessDeclAttribute().
static void handleGNUInlineAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3175 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 void handleGuardedByAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 595 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleHotAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1505 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleIBOutlet | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1073 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkIBOutletCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleIBOutletCollection | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1082 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 void handleInitPriorityAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Handle __attribute__((init_priority(priority))) attributes based on http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html
Definition at line 2487 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 void handleInterruptAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3935 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), handleARMInterruptAttr(), and handleMSP430InterruptAttr().
Referenced by ProcessDeclAttribute().
static void handleLaunchBoundsAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3379 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 void handleLockReturnedAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 751 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleLocksExcludedAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 765 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), checkAttributeAtLeastNumArgs(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleMallocAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1533 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getRange(), clang::Type::isAnyPointerType(), and clang::Type::isBlockPointerType().
Referenced by ProcessDeclAttribute().
static void handleModeAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [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 3004 of file SemaDeclAttr.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getArgAsIdent(), clang::Type::getAs(), clang::AttributeList::getAttributeSpellingListIndex(), clang::TargetInfo::getCharWidth(), clang::ASTContext::getComplexType(), clang::ASTContext::getIntTypeForBitwidth(), clang::AttributeList::getLoc(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), clang::AttributeList::getName(), clang::TargetInfo::getPointerWidth(), clang::AttributeList::getRange(), clang::ASTContext::getRealTypeForBitwidth(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getUnwindWordWidth(), clang::IdentifierLoc::Ident, clang::AttributeList::isArgIdent(), clang::Type::isComplexType(), clang::Type::isFloatingType(), clang::Type::isIntegralOrEnumerationType(), clang::QualType::isNull(), and clang::Type::isSignedIntegerType().
Referenced by ProcessDeclAttribute().
static void handleMSInheritanceAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3837 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), AttributeLangSupport::C, 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 void handleMSP430InterruptAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3899 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 void handleNoDebugAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3121 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(), and isFunctionOrMethod().
Referenced by ProcessDeclAttribute().
static void handleNonNullAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1167 of file SemaDeclAttr.cpp.
References clang::Sema::ActiveTemplateInstantiations, 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(), clang::Type::isDependentType(), clang::SourceLocation::isFileID(), isFunctionOrMethodVariadic(), and clang::Sema::isValidPointerAttrType().
Referenced by handleNonNullAttrParameter(), and ProcessDeclAttribute().
static void handleNonNullAttrParameter | ( | Sema & | S, |
ParmVarDecl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1211 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 void handleNoReturnAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | attr | ||
) | [static] |
Definition at line 1558 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 void handleNSConsumedAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3490 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getKind(), clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::ValueDecl::getType(), isValidSubjectOfCFAttribute(), and isValidSubjectOfNSAttribute().
Referenced by ProcessDeclAttribute().
static void handleNSReturnsRetainedAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3518 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedFunctionOrMethod, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getKind(), clang::Sema::getLangOpts(), clang::Decl::getLocStart(), clang::AttributeList::getName(), clang::AttributeList::getRange(), hasDeclarator(), isValidSubjectOfCFAttribute(), isValidSubjectOfNSAttribute(), and isValidSubjectOfNSReturnsRetainedAttribute().
Referenced by ProcessDeclAttribute().
static void handleObjCBridgeAttr | ( | Sema & | S, |
Scope * | Sc, | ||
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3669 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 void handleObjCBridgeMutableAttr | ( | Sema & | S, |
Scope * | Sc, | ||
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3683 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 void handleObjCBridgeRelatedAttr | ( | Sema & | S, |
Scope * | Sc, | ||
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3697 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 void handleObjCDesignatedInitializer | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3715 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 void handleObjCMethodFamilyAttr | ( | Sema & | S, |
Decl * | decl, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2045 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 void handleObjCNSObject | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2075 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 void handleObjCOwnershipAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3739 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 void handleObjCPreciseLifetimeAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3747 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 void handleObjCRequiresSuperAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | attr | ||
) | [static] |
Definition at line 3627 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 void handleObjCReturnsInnerPointerAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | attr | ||
) | [static] |
Definition at line 3598 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 void handleObjCRuntimeName | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3728 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 void handleObjCSuppresProtocolAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1729 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 void handleOptimizeNoneAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3149 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleOwnershipAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | AL | ||
) | [static] |
Definition at line 1305 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(), clang::IdentifierLoc::Ident, clang::Type::isAnyPointerType(), clang::AttributeList::isArgIdent(), clang::Type::isBlockPointerType(), clang::Type::isIntegerType(), clang::Sema::PP, and clang::Decl::specific_attrs().
Referenced by ProcessDeclAttribute().
static void handlePackedAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1027 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), and clang::ASTContext::getTypeAlign().
Referenced by ProcessDeclAttribute().
static void handleParamTypestateAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 885 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 void handlePtGuardedByAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 604 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkGuardedByAttrCommon(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
static void handlePtGuardedVarAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 570 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), and threadSafetyCheckIsPointer().
Referenced by ProcessDeclAttribute().
static void handleReleaseCapabilityAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 4113 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleRequiresCapabilityAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 4124 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), checkAttrArgsAreCapabilityObjs(), checkAttributeAtLeastNumArgs(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleReturnsNonNullAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1233 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 void handleReturnTypestateAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 923 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 void handleSectionAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2329 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::diag::Error, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getRange(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::isValidSectionSpecifier(), and clang::Sema::mergeSectionAttr().
Referenced by ProcessDeclAttribute().
static void handleSentinelAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2124 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::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), clang::Expr::isIntegerConstantExpr(), clang::Expr::isTypeDependent(), and clang::Expr::isValueDependent().
Referenced by ProcessDeclAttribute().
static void handleSetTypestateAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 972 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 void handleSharedTrylockFunctionAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 725 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 void handleSimpleAttribute | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Applies the given attribute to the Decl without performing any additional semantic checking.
Definition at line 338 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::AttributeList::getAttributeSpellingListIndex(), and clang::AttributeList::getRange().
static void handleTestTypestateAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 996 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 void handleTLSModelAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1513 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 void handleTransparentUnionAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2673 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedUnion, 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::isCompleteDefinition(), clang::TagDecl::isUnion(), clang::Type::isUnionType(), and clang::Type::isVectorType().
Referenced by ProcessDeclAttribute().
static void handleTryAcquireCapabilityAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 4099 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 void handleTypeTagForDatatypeAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3440 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 void handleUsedAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1678 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 void handleUuidAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3792 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), AttributeLangSupport::C, clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::ExpectedClass, clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::isHexDigit(), and clang::Sema::LangOpts.
Referenced by ProcessDeclAttribute().
static void handleVecReturnAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1606 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::Decl::getAttr(), clang::AttributeList::getAttributeSpellingListIndex(), clang::AttributeList::getLoc(), and clang::AttributeList::getRange().
Referenced by ProcessDeclAttribute().
static void handleVecTypeHint | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2284 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 void handleVisibilityAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr, | ||
bool | isTypeVisibility | ||
) | [static] |
Definition at line 1992 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::checkStringLiteralArgumentAttr(), clang::Sema::Context, 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 void handleWarnUnusedResult | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2215 of file SemaDeclAttr.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::getAttributeSpellingListIndex(), clang::Decl::getFunctionType(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::AttributeList::getRange(), clang::FunctionType::getReturnType(), and clang::Type::isVoidType().
Referenced by ProcessDeclAttribute().
static void handleWeakImportAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2234 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 void handleWeakRefAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 1417 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 void handleWorkGroupSize | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 2259 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 void handleX86ForceAlignArgPointerAttr | ( | Sema & | S, |
Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Definition at line 3943 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 bool hasDeclarator | ( | const Decl * | D | ) | [static] |
Return true if the given decl has a declarator that should have been processed by Sema::GetTypeForDeclarator.
Definition at line 57 of file SemaDeclAttr.cpp.
Referenced by handleCallConvAttr(), handleNoReturnAttr(), handleNSReturnsRetainedAttr(), and handleObjCOwnershipAttr().
static bool hasFunctionProto | ( | const Decl * | D | ) | [static] |
hasFunctionProto - Return true if the given decl has a argument information. This decl should have already passed isFunctionOrMethod or isFunctionOrMethodOrBlock.
Definition at line 66 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), and handleArgumentWithTypeTagAttr().
static bool isCapabilityExpr | ( | Sema & | S, |
const Expr * | Ex | ||
) | [static] |
Definition at line 461 of file SemaDeclAttr.cpp.
References clang::BO_LAnd, clang::BO_LOr, typeHasCapability(), and clang::UO_LNot.
Referenced by checkAttrArgsAreCapabilityObjs().
static bool isCFStringType | ( | QualType | T, |
ASTContext & | Ctx | ||
) | [inline, static] |
Definition at line 149 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 bool isDeclDeprecated | ( | Decl * | D | ) | [static] |
Definition at line 4945 of file SemaDeclAttr.cpp.
References clang::Decl::getDeclContext(), and clang::Decl::isDeprecated().
Referenced by DoEmitAvailabilityWarning().
static bool isDeclUnavailable | ( | Decl * | D | ) | [static] |
Definition at line 4956 of file SemaDeclAttr.cpp.
References clang::Decl::getDeclContext(), and clang::Decl::isUnavailable().
Referenced by DoEmitAvailabilityWarning().
static bool isForbiddenTypeAllowed | ( | Sema & | S, |
Decl * | decl | ||
) | [static] |
Is the given declaration allowed to use a forbidden type?
Definition at line 4905 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Decl::getLocation(), clang::ASTContext::getSourceManager(), and clang::SourceManager::isInSystemHeader().
Referenced by handleDelayedForbiddenType().
static bool isFunctionOrMethod | ( | const Decl * | D | ) | [static] |
isFunctionOrMethod - Return true if the given decl has function type (function or function-typed variable) or an Objective-C method.
Definition at line 51 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType().
Referenced by checkFunctionOrMethodParameterIndex(), handleAnalyzerNoReturnAttr(), handleArgumentWithTypeTagAttr(), handleNoDebugAttr(), handleUsedAttr(), and LookupVisibleDecls().
static bool isFunctionOrMethodVariadic | ( | const Decl * | D | ) | [static] |
Definition at line 116 of file SemaDeclAttr.cpp.
References clang::Decl::getFunctionType(), and clang::FunctionProtoType::isVariadic().
Referenced by checkFunctionOrMethodParameterIndex(), handleFormatAttr(), and handleNonNullAttr().
static bool isInstanceMethod | ( | const Decl * | D | ) | [static] |
Definition at line 127 of file SemaDeclAttr.cpp.
Referenced by checkFunctionOrMethodParameterIndex(), clang::getCursorKindForDecl(), and handleFormatAttr().
static bool isIntOrBool | ( | Expr * | Exp | ) | [static] |
Check if the passed-in expression is of type int or bool.
Definition at line 345 of file SemaDeclAttr.cpp.
References clang::Expr::getType(), clang::Type::isBooleanType(), and clang::Type::isIntegerType().
Referenced by checkTryLockFunAttrCommon().
static bool isNSStringType | ( | QualType | T, |
ASTContext & | Ctx | ||
) | [inline, static] |
Definition at line 133 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().
static bool isValidSubjectOfCFAttribute | ( | Sema & | S, |
QualType | type | ||
) | [static] |
Definition at line 3484 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), clang::Type::isPointerType(), and isValidSubjectOfNSAttribute().
Referenced by handleNSConsumedAttr(), and handleNSReturnsRetainedAttr().
static bool isValidSubjectOfNSAttribute | ( | Sema & | S, |
QualType | type | ||
) | [static] |
Definition at line 3479 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Type::isDependentType(), clang::ASTContext::isObjCNSObjectType(), and clang::Type::isObjCObjectPointerType().
Referenced by handleNSConsumedAttr(), handleNSReturnsRetainedAttr(), and isValidSubjectOfCFAttribute().
static bool isValidSubjectOfNSReturnsRetainedAttribute | ( | QualType | type | ) | [static] |
Definition at line 3474 of file SemaDeclAttr.cpp.
References clang::Type::isDependentType(), and clang::Type::isObjCRetainableType().
Referenced by handleNSReturnsRetainedAttr().
static T* mergeVisibilityAttr | ( | Sema & | S, |
Decl * | D, | ||
SourceRange | range, | ||
typename T::VisibilityType | value, | ||
unsigned | attrSpellingListIndex | ||
) | [static] |
Definition at line 1963 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::Decl::dropAttr(), clang::Decl::getAttr(), and clang::SourceRange::getBegin().
static void ProcessDeclAttribute | ( | Sema & | S, |
Scope * | scope, | ||
Decl * | D, | ||
const AttributeList & | Attr, | ||
bool | IncludeCXX11Attributes | ||
) | [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 4203 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::Sema::Diag(), clang::AttributeList::existsInTarget(), clang::AttributeList::getKind(), clang::AttributeList::getLoc(), clang::AttributeList::getName(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), handleAcquireCapabilityAttr(), handleAcquiredAfterAttr(), handleAcquiredBeforeAttr(), handleAliasAttr(), handleAlignedAttr(), handleAlignValueAttr(), handleAlwaysInlineAttr(), handleAnalyzerNoReturnAttr(), handleAnnotateAttr(), handleArgumentWithTypeTagAttr(), handleAssertCapabilityAttr(), handleAssertExclusiveLockAttr(), handleAssertSharedLockAttr(), handleAssumeAlignedAttr(), handleAvailabilityAttr(), handleBlocksAttr(), handleCallableWhenAttr(), handleCallConvAttr(), handleCapabilityAttr(), handleCFAuditedTransferAttr(), handleCFUnknownTransferAttr(), handleCleanupAttr(), handleColdAttr(), handleCommonAttr(), handleCommonAttributeFeatures(), handleConstructorAttr(), handleConsumableAttr(), handleDeclspecThreadAttr(), handleDependencyAttr(), handleDeprecatedAttr(), handleDestructorAttr(), handleDLLAttr(), handleEnableIfAttr(), handleExclusiveTrylockFunctionAttr(), handleExtVectorTypeAttr(), handleFormatArgAttr(), handleFormatAttr(), handleGlobalAttr(), handleGNUInlineAttr(), handleGuardedByAttr(), handleHotAttr(), handleIBOutlet(), handleIBOutletCollection(), handleInitPriorityAttr(), handleInterruptAttr(), handleLaunchBoundsAttr(), handleLockReturnedAttr(), handleLocksExcludedAttr(), handleMallocAttr(), handleModeAttr(), handleMSInheritanceAttr(), handleNoDebugAttr(), handleNonNullAttr(), handleNonNullAttrParameter(), handleNoReturnAttr(), handleNSConsumedAttr(), handleNSReturnsRetainedAttr(), handleObjCBridgeAttr(), handleObjCBridgeMutableAttr(), handleObjCBridgeRelatedAttr(), handleObjCDesignatedInitializer(), handleObjCMethodFamilyAttr(), handleObjCNSObject(), handleObjCOwnershipAttr(), handleObjCPreciseLifetimeAttr(), handleObjCRequiresSuperAttr(), handleObjCReturnsInnerPointerAttr(), handleObjCRuntimeName(), handleObjCSuppresProtocolAttr(), handleOptimizeNoneAttr(), handleOwnershipAttr(), handlePackedAttr(), handleParamTypestateAttr(), handlePtGuardedByAttr(), handlePtGuardedVarAttr(), handleReleaseCapabilityAttr(), handleRequiresCapabilityAttr(), handleReturnsNonNullAttr(), handleReturnTypestateAttr(), handleSectionAttr(), handleSentinelAttr(), handleSetTypestateAttr(), handleSharedTrylockFunctionAttr(), handleTestTypestateAttr(), handleTLSModelAttr(), handleTransparentUnionAttr(), handleTryAcquireCapabilityAttr(), handleTypeTagForDatatypeAttr(), handleUsedAttr(), handleUuidAttr(), handleVecReturnAttr(), handleVecTypeHint(), handleVisibilityAttr(), handleWarnUnusedResult(), handleWeakImportAttr(), handleWeakRefAttr(), handleX86ForceAlignArgPointerAttr(), clang::AttributeList::isCXX11Attribute(), clang::AttributeList::isDeclspecAttribute(), clang::AttributeList::isInvalid(), clang::AttributeList::isTypeAttr(), and S.
Referenced by clang::Sema::ProcessDeclAttributeList().
static bool threadSafetyCheckIsPointer | ( | Sema & | S, |
const Decl * | D, | ||
const AttributeList & | Attr | ||
) | [static] |
Check if passed in Decl is a pointer type. Note that this function may produce an error message.
Definition at line 370 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 bool threadSafetyCheckIsSmartPointer | ( | Sema & | S, |
const RecordType * | RT | ||
) | [static] |
Definition at line 353 of file SemaDeclAttr.cpp.
References clang::Sema::Context, clang::ASTContext::DeclarationNames, clang::DeclarationNameTable::getCXXOperatorName(), clang::RecordType::getDecl(), and clang::DeclContext::lookup().
Referenced by checkRecordTypeForCapability(), and threadSafetyCheckIsPointer().
static bool typeHasCapability | ( | Sema & | S, |
QualType | Ty | ||
) | [static] |
Definition at line 451 of file SemaDeclAttr.cpp.
References checkRecordTypeForCapability(), and checkTypedefTypeForCapability().
Referenced by checkAttrArgsAreCapabilityObjs(), and isCapabilityExpr().
static bool versionsMatch | ( | const VersionTuple & | X, |
const VersionTuple & | Y, | ||
bool | BeforeIsOkay | ||
) | [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 1785 of file SemaDeclAttr.cpp.
References clang::VersionTuple::empty().
Referenced by clang::Sema::mergeAvailabilityAttr().