clang 22.0.0git
|
#include "clang/Sema/SemaWasm.h"
Public Member Functions | |
SemaWasm (Sema &S) | |
bool | CheckWebAssemblyBuiltinFunctionCall (const TargetInfo &TI, unsigned BuiltinID, CallExpr *TheCall) |
bool | BuiltinWasmRefNullExtern (CallExpr *TheCall) |
bool | BuiltinWasmRefIsNullExtern (CallExpr *TheCall) |
bool | BuiltinWasmRefNullFunc (CallExpr *TheCall) |
bool | BuiltinWasmTableGet (CallExpr *TheCall) |
Check that the first argument is a WebAssembly table, and the second is an index to use as index into the table. | |
bool | BuiltinWasmTableSet (CallExpr *TheCall) |
Check that the first argumnet is a WebAssembly table, the second is an index to use as index into the table and the third is the reference type to set into the table. | |
bool | BuiltinWasmTableSize (CallExpr *TheCall) |
Check that the argument is a WebAssembly table. | |
bool | BuiltinWasmTableGrow (CallExpr *TheCall) |
Check that the first argument is a WebAssembly table, the second is the value to use for new elements (of a type matching the table type), the third value is an integer. | |
bool | BuiltinWasmTableFill (CallExpr *TheCall) |
Check that the first argument is a WebAssembly table, the second is an integer, the third is the value to use to fill the table (of a type matching the table type), and the fourth is an integer. | |
bool | BuiltinWasmTableCopy (CallExpr *TheCall) |
Check that the first argument is a WebAssembly table, the second is also a WebAssembly table (of the same element type), and the third to fifth arguments are integers. | |
bool | BuiltinWasmTestFunctionPointerSignature (const TargetInfo &TI, CallExpr *TheCall) |
WebAssemblyImportNameAttr * | mergeImportNameAttr (Decl *D, const WebAssemblyImportNameAttr &AL) |
WebAssemblyImportModuleAttr * | mergeImportModuleAttr (Decl *D, const WebAssemblyImportModuleAttr &AL) |
void | handleWebAssemblyExportNameAttr (Decl *D, const ParsedAttr &AL) |
void | handleWebAssemblyImportModuleAttr (Decl *D, const ParsedAttr &AL) |
void | handleWebAssemblyImportNameAttr (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 |
DeclContext * | getCurContext () 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. | |
SemaDiagnosticBuilder | DiagCompat (SourceLocation Loc, unsigned CompatDiagId, bool DeferHint=false) |
Emit a compatibility diagnostic. | |
PartialDiagnostic | PDiag (unsigned DiagID=0) |
Build a partial diagnostic. |
Additional Inherited Members | |
Public Attributes inherited from clang::SemaBase | |
Sema & | SemaRef |
Definition at line 23 of file SemaWasm.h.
clang::SemaWasm::SemaWasm | ( | Sema & | S | ) |
Definition at line 26 of file SemaWasm.cpp.
References clang::SemaBase::SemaBase().
Definition at line 63 of file SemaWasm.cpp.
References clang::CallExpr::getArg(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::isWebAssemblyExternrefType(), and clang::SemaBase::SemaRef.
Referenced by CheckWebAssemblyBuiltinFunctionCall().
Definition at line 55 of file SemaWasm.cpp.
References clang::SemaBase::getASTContext(), clang::SemaBase::SemaRef, and clang::Expr::setType().
Referenced by CheckWebAssemblyBuiltinFunctionCall().
Definition at line 79 of file SemaWasm.cpp.
References clang::SemaBase::getASTContext(), clang::SemaBase::SemaRef, clang::Expr::setType(), and clang::wasm_funcref.
Referenced by CheckWebAssemblyBuiltinFunctionCall().
Check that the first argument is a WebAssembly table, the second is also a WebAssembly table (of the same element type), and the third to fifth arguments are integers.
Definition at line 204 of file SemaWasm.cpp.
References clang::CheckWasmBuiltinArgIsInteger(), clang::CheckWasmBuiltinArgIsTable(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::SemaBase::getASTContext(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), and clang::SemaBase::SemaRef.
Referenced by CheckWebAssemblyBuiltinFunctionCall().
Check that the first argument is a WebAssembly table, the second is an integer, the third is the value to use to fill the table (of a type matching the table type), and the fourth is an integer.
Definition at line 177 of file SemaWasm.cpp.
References clang::CheckWasmBuiltinArgIsInteger(), clang::CheckWasmBuiltinArgIsTable(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::SemaBase::getASTContext(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::SemaBase::SemaRef.
Referenced by CheckWebAssemblyBuiltinFunctionCall().
Check that the first argument is a WebAssembly table, and the second is an index to use as index into the table.
Definition at line 98 of file SemaWasm.cpp.
References clang::CheckWasmBuiltinArgIsInteger(), clang::CheckWasmBuiltinArgIsTable(), clang::SemaBase::SemaRef, and clang::Expr::setType().
Referenced by CheckWebAssemblyBuiltinFunctionCall().
Check that the first argument is a WebAssembly table, the second is the value to use for new elements (of a type matching the table type), the third value is an integer.
Definition at line 153 of file SemaWasm.cpp.
References clang::CheckWasmBuiltinArgIsInteger(), clang::CheckWasmBuiltinArgIsTable(), clang::SemaBase::Diag(), clang::CallExpr::getArg(), clang::SemaBase::getASTContext(), clang::Stmt::getBeginLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::SemaBase::SemaRef.
Referenced by CheckWebAssemblyBuiltinFunctionCall().
Check that the first argumnet is a WebAssembly table, the second is an index to use as index into the table and the third is the reference type to set into the table.
Definition at line 121 of file SemaWasm.cpp.
References clang::CheckWasmBuiltinArgIsInteger(), clang::CheckWasmBuiltinArgIsTable(), clang::CallExpr::getArg(), clang::SemaBase::getASTContext(), clang::Expr::getType(), and clang::SemaBase::SemaRef.
Referenced by CheckWebAssemblyBuiltinFunctionCall().
Check that the argument is a WebAssembly table.
Definition at line 139 of file SemaWasm.cpp.
References clang::CheckWasmBuiltinArgIsTable(), and clang::SemaBase::SemaRef.
Referenced by CheckWebAssemblyBuiltinFunctionCall().
bool clang::SemaWasm::BuiltinWasmTestFunctionPointerSignature | ( | const TargetInfo & | TI, |
CallExpr * | TheCall ) |
Definition at line 231 of file SemaWasm.cpp.
References clang::SemaBase::Diag(), clang::TargetInfo::getABI(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::SemaBase::getASTContext(), clang::Stmt::getBeginLoc(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::Type::getPointeeType(), clang::FunctionType::getReturnType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::SemaBase::SemaRef, clang::Expr::setType(), and clang::T.
Referenced by CheckWebAssemblyBuiltinFunctionCall().
bool clang::SemaWasm::CheckWebAssemblyBuiltinFunctionCall | ( | const TargetInfo & | TI, |
unsigned | BuiltinID, | ||
CallExpr * | TheCall ) |
Definition at line 283 of file SemaWasm.cpp.
References BuiltinWasmRefIsNullExtern(), BuiltinWasmRefNullExtern(), BuiltinWasmRefNullFunc(), BuiltinWasmTableCopy(), BuiltinWasmTableFill(), BuiltinWasmTableGet(), BuiltinWasmTableGrow(), BuiltinWasmTableSet(), BuiltinWasmTableSize(), and BuiltinWasmTestFunctionPointerSignature().
void clang::SemaWasm::handleWebAssemblyExportNameAttr | ( | Decl * | D, |
const ParsedAttr & | AL ) |
Definition at line 386 of file SemaWasm.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::SemaBase::Diag(), clang::ExpectedFunction, clang::SemaBase::getASTContext(), clang::Decl::getLocation(), clang::isFuncOrMethodForAttrSubject(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
void clang::SemaWasm::handleWebAssemblyImportModuleAttr | ( | Decl * | D, |
const ParsedAttr & | AL ) |
Definition at line 353 of file SemaWasm.cpp.
References clang::cast(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
void clang::SemaWasm::handleWebAssemblyImportNameAttr | ( | Decl * | D, |
const ParsedAttr & | AL ) |
Definition at line 370 of file SemaWasm.cpp.
References clang::cast(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
WebAssemblyImportModuleAttr * clang::SemaWasm::mergeImportModuleAttr | ( | Decl * | D, |
const WebAssemblyImportModuleAttr & | AL ) |
Definition at line 313 of file SemaWasm.cpp.
References clang::cast(), clang::SemaBase::Diag(), and clang::SemaBase::getASTContext().
Referenced by mergeDeclAttribute().
WebAssemblyImportNameAttr * clang::SemaWasm::mergeImportNameAttr | ( | Decl * | D, |
const WebAssemblyImportNameAttr & | AL ) |
Definition at line 334 of file SemaWasm.cpp.
References clang::cast(), clang::SemaBase::Diag(), and clang::SemaBase::getASTContext().
Referenced by mergeDeclAttribute().