clang
20.0.0git
|
#include "clang/Sema/SemaSwift.h"
Public Member Functions | |
SemaSwift (Sema &S) | |
SwiftNameAttr * | mergeNameAttr (Decl *D, const SwiftNameAttr &SNA, StringRef Name) |
void | handleAttrAttr (Decl *D, const ParsedAttr &AL) |
void | handleAsyncAttr (Decl *D, const ParsedAttr &AL) |
void | handleBridge (Decl *D, const ParsedAttr &AL) |
void | handleError (Decl *D, const ParsedAttr &AL) |
void | handleAsyncError (Decl *D, const ParsedAttr &AL) |
void | handleName (Decl *D, const ParsedAttr &AL) |
void | handleAsyncName (Decl *D, const ParsedAttr &AL) |
void | handleNewType (Decl *D, const ParsedAttr &AL) |
bool | DiagnoseName (Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync) |
Do a check to make sure Name looks like a legal argument for the swift_name attribute applied to decl D . More... | |
void | AddParameterABIAttr (Decl *D, const AttributeCommonInfo &CI, ParameterABI abi) |
Public Member Functions inherited from clang::SemaBase | |
SemaBase (Sema &S) | |
ASTContext & | getASTContext () const |
DiagnosticsEngine & | getDiagnostics () const |
const LangOptions & | getLangOpts () const |
void | addFDToReachableFromSyclDevice (const FunctionDecl *Callee, const FunctionDecl *Caller) |
bool | isFDReachableFromSyclDevice (const FunctionDecl *Callee, const FunctionDecl *Caller) |
SemaDiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID, bool DeferHint=false) |
Emit a diagnostic. More... | |
SemaDiagnosticBuilder | Diag (SourceLocation Loc, const PartialDiagnostic &PD, bool DeferHint=false) |
Emit a partial diagnostic. More... | |
PartialDiagnostic | PDiag (unsigned DiagID=0) |
Build a partial diagnostic. More... | |
Additional Inherited Members | |
Public Types inherited from clang::SemaBase | |
enum class | DeviceDiagnosticReason { None = 0 , OmpDevice = 1 << 0 , OmpHost = 1 << 1 , OmpAll = OmpDevice | OmpHost , CudaDevice = 1 << 2 , CudaHost = 1 << 3 , CudaAll = CudaDevice | CudaHost , Sycl = 1 << 4 , Esimd = 1 << 5 , All = OmpAll | CudaAll | Sycl | Esimd } |
Bitmask to contain the list of reasons a single diagnostic should be emitted, based on its language. More... | |
Public Attributes inherited from clang::SemaBase | |
Sema & | SemaRef |
Definition at line 28 of file SemaSwift.h.
clang::SemaSwift::SemaSwift | ( | Sema & | S | ) |
Definition at line 24 of file SemaSwift.cpp.
void clang::SemaSwift::AddParameterABIAttr | ( | Decl * | D, |
const AttributeCommonInfo & | CI, | ||
ParameterABI | abi | ||
) |
Definition at line 710 of file SemaSwift.cpp.
Referenced by clang::Sema::InstantiateAttrs().
bool clang::SemaSwift::DiagnoseName | ( | Decl * | D, |
StringRef | Name, | ||
SourceLocation | Loc, | ||
const ParsedAttr & | AL, | ||
bool | IsAsync | ||
) |
Do a check to make sure Name
looks like a legal argument for the swift_name attribute applied to decl D
.
Raise a diagnostic if the name is invalid for the given declaration.
AL
is used to provide caret diagnostics in case of a malformed name.
D
, false otherwise. Definition at line 510 of file SemaSwift.cpp.
void clang::SemaSwift::handleAsyncAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 657 of file SemaSwift.cpp.
References clang::AANT_ArgumentIdentifier, clang::Type::castAs(), clang::ParsedAttr::checkExactlyNumArgs(), clang::Sema::checkFunctionOrMethodParameterIndex(), clang::checkSwiftAsyncErrorBlock(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::ParamIdx::getASTIndex(), clang::getFunctionOrMethodParam(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), getPointeeType(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::Type::isBlockPointerType(), clang::Type::isVoidType(), Kind, clang::XRayInstrKind::None, and clang::SemaBase::SemaRef.
void clang::SemaSwift::handleAsyncError | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 282 of file SemaSwift.cpp.
References clang::ParsedAttr::checkExactlyNumArgs(), clang::checkSwiftAsyncErrorBlock(), clang::Sema::checkUInt32Argument(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::XRayInstrKind::None, and clang::SemaBase::SemaRef.
void clang::SemaSwift::handleAsyncName | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 616 of file SemaSwift.cpp.
void clang::SemaSwift::handleAttrAttr | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 75 of file SemaSwift.cpp.
References clang::Sema::checkStringLiteralArgumentAttr(), D, clang::SemaBase::getASTContext(), and clang::SemaBase::SemaRef.
void clang::SemaSwift::handleBridge | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 85 of file SemaSwift.cpp.
References clang::Sema::checkStringLiteralArgumentAttr(), D, clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::Other, and clang::SemaBase::SemaRef.
void clang::SemaSwift::handleError | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 125 of file SemaSwift.cpp.
void clang::SemaSwift::handleName | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 604 of file SemaSwift.cpp.
void clang::SemaSwift::handleNewType | ( | Decl * | D, |
const ParsedAttr & | AL | ||
) |
Definition at line 629 of file SemaSwift.cpp.
References clang::AANT_ArgumentIdentifier, clang::ParsedAttr::checkExactlyNumArgs(), D, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::IdentifierLoc::Ident, clang::ParsedAttr::isArgIdent(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), Kind, and clang::SemaBase::SemaRef.
SwiftNameAttr * clang::SemaSwift::mergeNameAttr | ( | Decl * | D, |
const SwiftNameAttr & | SNA, | ||
StringRef | Name | ||
) |
Definition at line 26 of file SemaSwift.cpp.