clang 20.0.0git
|
#include "clang/Sema/SemaARM.h"
Public Types | |
enum | ArmStreamingType { ArmNonStreaming , ArmStreaming , ArmStreamingCompatible , VerifyRuntimeMode } |
Public Member Functions | |
SemaARM (Sema &S) | |
bool | CheckARMBuiltinExclusiveCall (unsigned BuiltinID, CallExpr *TheCall, unsigned MaxWidth) |
bool | CheckNeonBuiltinFunctionCall (const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) |
bool | CheckMVEBuiltinFunctionCall (unsigned BuiltinID, CallExpr *TheCall) |
bool | CheckSVEBuiltinFunctionCall (unsigned BuiltinID, CallExpr *TheCall) |
bool | ParseSVEImmChecks (CallExpr *TheCall, llvm::SmallVector< std::tuple< int, int, int >, 3 > &ImmChecks) |
bool | CheckSMEBuiltinFunctionCall (unsigned BuiltinID, CallExpr *TheCall) |
bool | CheckCDEBuiltinFunctionCall (const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) |
bool | CheckARMCoprocessorImmediate (const TargetInfo &TI, const Expr *CoprocArg, bool WantCDE) |
bool | CheckARMBuiltinFunctionCall (const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) |
bool | CheckAArch64BuiltinFunctionCall (const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) |
bool | BuiltinARMSpecialReg (unsigned BuiltinID, CallExpr *TheCall, int ArgNum, unsigned ExpectedFieldNum, bool AllowName) |
BuiltinARMSpecialReg - Handle a check if argument ArgNum of CallExpr TheCall is an ARM/AArch64 special register string literal. | |
bool | BuiltinARMMemoryTaggingCall (unsigned BuiltinID, CallExpr *TheCall) |
BuiltinARMMemoryTaggingCall - Handle calls of memory tagging extensions. | |
bool | MveAliasValid (unsigned BuiltinID, llvm::StringRef AliasName) |
bool | CdeAliasValid (unsigned BuiltinID, llvm::StringRef AliasName) |
bool | SveAliasValid (unsigned BuiltinID, llvm::StringRef AliasName) |
bool | SmeAliasValid (unsigned BuiltinID, llvm::StringRef AliasName) |
void | handleBuiltinAliasAttr (Decl *D, const ParsedAttr &AL) |
void | handleNewAttr (Decl *D, const ParsedAttr &AL) |
void | handleCmseNSEntryAttr (Decl *D, const ParsedAttr &AL) |
void | handleInterruptAttr (Decl *D, const ParsedAttr &AL) |
Public Member Functions inherited from clang::SemaBase | |
SemaBase (Sema &S) | |
ASTContext & | getASTContext () const |
DiagnosticsEngine & | getDiagnostics () const |
const LangOptions & | getLangOpts () const |
SemaDiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID, bool DeferHint=false) |
Emit a diagnostic. | |
SemaDiagnosticBuilder | Diag (SourceLocation Loc, const PartialDiagnostic &PD, bool DeferHint=false) |
Emit a partial diagnostic. | |
PartialDiagnostic | PDiag (unsigned DiagID=0) |
Build a partial diagnostic. | |
Additional Inherited Members | |
Public Attributes inherited from clang::SemaBase | |
Sema & | SemaRef |
Enumerator | |
---|---|
ArmNonStreaming | |
ArmStreaming | Intrinsic is only available in normal mode. |
ArmStreamingCompatible | Intrinsic is only available in Streaming-SVE mode. |
VerifyRuntimeMode | Intrinsic is available both in normal and Streaming-SVE mode. Intrinsic is available in normal mode with SVE flags, or in Streaming-SVE mode with SME flags. Do Sema checks for the runtime mode. |
clang::SemaARM::SemaARM | ( | Sema & | S | ) |
Definition at line 23 of file SemaARM.cpp.
BuiltinARMMemoryTaggingCall - Handle calls of memory tagging extensions.
Definition at line 26 of file SemaARM.cpp.
References clang::Sema::BuiltinConstantArgRange(), clang::Sema::checkArgCount(), clang::Sema::DefaultFunctionArrayLvalueConversion(), clang::Sema::DefaultLvalueConversion(), clang::SemaBase::Diag(), E, clang::ActionResult< PtrTy, Compress >::get(), clang::CallExpr::getArg(), clang::SemaBase::getASTContext(), clang::CallExpr::getBeginLoc(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Sema::ImpCastExprToType(), clang::Type::isAnyPointerType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::NPC_ValueDependentIsNotNull, clang::SemaBase::SemaRef, clang::CallExpr::setArg(), and clang::Expr::setType().
Referenced by CheckAArch64BuiltinFunctionCall().
bool clang::SemaARM::BuiltinARMSpecialReg | ( | unsigned | BuiltinID, |
CallExpr * | TheCall, | ||
int | ArgNum, | ||
unsigned | ExpectedFieldNum, | ||
bool | AllowName | ||
) |
BuiltinARMSpecialReg - Handle a check if argument ArgNum of CallExpr TheCall is an ARM/AArch64 special register string literal.
Definition at line 188 of file SemaARM.cpp.
References clang::Sema::BuiltinConstantArgRange(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::CallExpr::getNumArgs(), clang::Stmt::getSourceRange(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::SemaBase::SemaRef.
Referenced by CheckAArch64BuiltinFunctionCall(), and CheckARMBuiltinFunctionCall().
Definition at line 1177 of file SemaARM.cpp.
References clang::BuiltinAliasValid().
Referenced by handleBuiltinAliasAttr(), and handleBuiltinAliasAttr().
bool clang::SemaARM::CheckAArch64BuiltinFunctionCall | ( | const TargetInfo & | TI, |
unsigned | BuiltinID, | ||
CallExpr * | TheCall | ||
) |
Definition at line 1064 of file SemaARM.cpp.
References BuiltinARMMemoryTaggingCall(), BuiltinARMSpecialReg(), clang::Sema::BuiltinConstantArgRange(), CheckARMBuiltinExclusiveCall(), CheckNeonBuiltinFunctionCall(), CheckSMEBuiltinFunctionCall(), CheckSVEBuiltinFunctionCall(), and clang::SemaBase::SemaRef.
bool clang::SemaARM::CheckARMBuiltinExclusiveCall | ( | unsigned | BuiltinID, |
CallExpr * | TheCall, | ||
unsigned | MaxWidth | ||
) |
Definition at line 867 of file SemaARM.cpp.
References clang::Sema::AA_Passing, clang::QualType::addConst(), clang::Sema::checkArgCount(), clang::Sema::DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), clang::ActionResult< PtrTy, Compress >::get(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::DeclRefExpr::getBeginLoc(), clang::CallExpr::getCallee(), clang::QualType::getObjCLifetime(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::IgnoreParenCasts(), clang::Sema::ImpCastExprToType(), clang::InitializedEntity::InitializeParameter(), clang::Type::isAnyPointerType(), clang::QualType::isAtLeastAsQualifiedAs(), clang::Type::isBlockPointerType(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::Sema::PerformCopyInitialization(), clang::ast_matchers::pointerType, clang::SemaBase::SemaRef, clang::CallExpr::setArg(), clang::Expr::setType(), and clang::QualType::withVolatile().
Referenced by CheckAArch64BuiltinFunctionCall(), and CheckARMBuiltinFunctionCall().
bool clang::SemaARM::CheckARMBuiltinFunctionCall | ( | const TargetInfo & | TI, |
unsigned | BuiltinID, | ||
CallExpr * | TheCall | ||
) |
Definition at line 986 of file SemaARM.cpp.
References BuiltinARMSpecialReg(), clang::Sema::BuiltinConstantArgRange(), CheckARMBuiltinExclusiveCall(), CheckARMCoprocessorImmediate(), CheckCDEBuiltinFunctionCall(), CheckMVEBuiltinFunctionCall(), CheckNeonBuiltinFunctionCall(), clang::CallExpr::getArg(), and clang::SemaBase::SemaRef.
bool clang::SemaARM::CheckARMCoprocessorImmediate | ( | const TargetInfo & | TI, |
const Expr * | CoprocArg, | ||
bool | WantCDE | ||
) |
Definition at line 842 of file SemaARM.cpp.
References clang::SemaBase::Diag(), clang::TargetInfo::getARMCDECoprocMask(), clang::SemaBase::getASTContext(), clang::Stmt::getBeginLoc(), clang::Expr::getIntegerConstantExpr(), clang::Stmt::getSourceRange(), int, clang::Sema::isConstantEvaluatedContext(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), and clang::SemaBase::SemaRef.
Referenced by CheckARMBuiltinFunctionCall(), and CheckCDEBuiltinFunctionCall().
bool clang::SemaARM::CheckCDEBuiltinFunctionCall | ( | const TargetInfo & | TI, |
unsigned | BuiltinID, | ||
CallExpr * | TheCall | ||
) |
Definition at line 826 of file SemaARM.cpp.
References CheckARMCoprocessorImmediate(), and clang::CallExpr::getArg().
Referenced by CheckARMBuiltinFunctionCall().
Definition at line 817 of file SemaARM.cpp.
Referenced by CheckARMBuiltinFunctionCall().
bool clang::SemaARM::CheckNeonBuiltinFunctionCall | ( | const TargetInfo & | TI, |
unsigned | BuiltinID, | ||
CallExpr * | TheCall | ||
) |
Definition at line 728 of file SemaARM.cpp.
References clang::Sema::AA_Assigning, ArmNonStreaming, clang::Sema::BuiltinConstantArg(), clang::Sema::BuiltinConstantArgRange(), clang::checkArmStreamingBuiltin(), clang::Sema::CheckSingleAssignmentConstraints(), clang::Sema::DefaultFunctionArrayLvalueConversion(), clang::SemaBase::Diag(), clang::Sema::DiagnoseAssignmentResult(), clang::ActionResult< PtrTy, Compress >::get(), clang::CallExpr::getArg(), clang::SemaBase::getASTContext(), clang::CallExpr::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::Sema::getCurFunctionDecl(), clang::TargetInfo::getInt64Type(), clang::getNeonEltType(), clang::CallExpr::getNumArgs(), clang::ASTContext::getPointerType(), clang::Stmt::getSourceRange(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Result, clang::SemaBase::SemaRef, clang::TransferrableTargetInfo::SignedLong, and clang::QualType::withConst().
Referenced by CheckAArch64BuiltinFunctionCall(), and CheckARMBuiltinFunctionCall().
Definition at line 660 of file SemaARM.cpp.
References clang::ArmZAMask, clang::ArmZT0Mask, clang::checkArmStreamingBuiltin(), clang::SemaBase::Diag(), clang::CallExpr::getBeginLoc(), clang::Sema::getCurFunctionDecl(), clang::getSMEState(), clang::Stmt::getSourceRange(), clang::hasArmZAState(), clang::hasArmZT0State(), ParseSVEImmChecks(), and clang::SemaBase::SemaRef.
Referenced by CheckAArch64BuiltinFunctionCall().
Definition at line 700 of file SemaARM.cpp.
References clang::checkArmStreamingBuiltin(), clang::Sema::getCurFunctionDecl(), ParseSVEImmChecks(), and clang::SemaBase::SemaRef.
Referenced by CheckAArch64BuiltinFunctionCall().
void clang::SemaARM::handleBuiltinAliasAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1196 of file SemaARM.cpp.
References clang::AANT_ArgumentIdentifier, CdeAliasValid(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::IdentifierInfo::getBuiltinID(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), MveAliasValid(), SmeAliasValid(), and SveAliasValid().
Referenced by ProcessDeclAttribute().
void clang::SemaARM::handleCmseNSEntryAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1296 of file SemaARM.cpp.
References clang::CPlusPlus, D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::SemaBase::getLangOpts(), and clang::AttributeCommonInfo::getLoc().
Referenced by ProcessDeclAttribute().
void clang::SemaARM::handleInterruptAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1311 of file SemaARM.cpp.
References clang::Sema::checkStringLiteralArgumentAttr(), D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::hasFeature(), Kind, and clang::SemaBase::SemaRef.
Referenced by handleInterruptAttr().
void clang::SemaARM::handleNewAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 1243 of file SemaARM.cpp.
References clang::FunctionType::ARM_None, clang::checkNewAttrMutualExclusion(), clang::Sema::checkStringLiteralArgumentAttr(), D, clang::SemaBase::Diag(), E, clang::FunctionType::getArmZAState(), clang::FunctionType::getArmZT0State(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::ParsedAttr::getNumArgs(), clang::SemaBase::SemaRef, and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
Definition at line 1169 of file SemaARM.cpp.
References clang::BuiltinAliasValid().
Referenced by handleBuiltinAliasAttr(), and handleBuiltinAliasAttr().
bool clang::SemaARM::ParseSVEImmChecks | ( | CallExpr * | TheCall, |
llvm::SmallVector< std::tuple< int, int, int >, 3 > & | ImmChecks | ||
) |
Definition at line 407 of file SemaARM.cpp.
References bool, clang::Sema::BuiltinConstantArg(), clang::Sema::BuiltinConstantArgMultiple(), clang::Sema::BuiltinConstantArgRange(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::isTypeDependent(), clang::Expr::isValueDependent(), clang::SemaBase::SemaRef, and V.
Referenced by CheckSMEBuiltinFunctionCall(), and CheckSVEBuiltinFunctionCall().
Definition at line 1189 of file SemaARM.cpp.
References clang::ASTContext::BuiltinInfo, BuiltinInfo, clang::AArch64::FirstSMEBuiltin, clang::SemaBase::getASTContext(), clang::Builtin::Context::getAuxBuiltinID(), and clang::AArch64::LastSMEBuiltin.
Referenced by handleBuiltinAliasAttr().
Definition at line 1182 of file SemaARM.cpp.
References clang::ASTContext::BuiltinInfo, BuiltinInfo, clang::AArch64::FirstSVEBuiltin, clang::SemaBase::getASTContext(), clang::Builtin::Context::getAuxBuiltinID(), and clang::AArch64::LastSVEBuiltin.
Referenced by handleBuiltinAliasAttr(), and handleBuiltinAliasAttr().