| clang 22.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 Namelooks like a legal argument for the swift_name attribute applied to declD. | |
| 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 | 
| DeclContext * | getCurContext () const | 
| SemaDiagnosticBuilder | Diag (SourceLocation Loc, unsigned DiagID) | 
| Emit a diagnostic. | |
| SemaDiagnosticBuilder | Diag (SourceLocation Loc, const PartialDiagnostic &PD) | 
| Emit a partial diagnostic. | |
| SemaDiagnosticBuilder | DiagCompat (SourceLocation Loc, unsigned CompatDiagId) | 
| 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 28 of file SemaSwift.h.
| clang::SemaSwift::SemaSwift | ( | Sema & | S | ) | 
Definition at line 24 of file SemaSwift.cpp.
References clang::SemaBase::SemaBase().
| void clang::SemaSwift::AddParameterABIAttr | ( | Decl * | D, | 
| const AttributeCommonInfo & | CI, | ||
| ParameterABI | abi ) | 
Definition at line 723 of file SemaSwift.cpp.
References clang::Decl::addAttr(), clang::cast(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::getParameterABISpelling(), clang::HLSLInOut, clang::HLSLOut, clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::isValidSwiftContextType(), clang::isValidSwiftErrorResultType(), clang::isValidSwiftIndirectResultType(), clang::Ordinary, clang::SwiftAsyncContext, clang::SwiftContext, clang::SwiftErrorResult, clang::SwiftIndirectResult, and clang::ast_matchers::type.
Referenced by clang::Sema::InstantiateAttrs(), and ProcessDeclAttribute().
| 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 523 of file SemaSwift.cpp.
References clang::cast(), clang::SemaBase::Diag(), clang::ExpectedFunctionWithProtoType, clang::Type::getPointeeType(), clang::isa(), clang::QualType::isConstQualified(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), clang::isValidAsciiIdentifier(), clang::isValidSwiftContextName(), clang::Method, clang::SemaBase::SemaRef, and clang::validateSwiftFunctionName().
Referenced by handleAsyncName(), and handleName().
| void clang::SemaSwift::handleAsyncAttr | ( | Decl * | D, | 
| const ParsedAttr & | AL ) | 
Definition at line 670 of file SemaSwift.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::Type::castAs(), clang::ParsedAttr::checkExactlyNumArgs(), clang::checkSwiftAsyncErrorBlock(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::ParamIdx::getASTIndex(), clang::Decl::getAttr(), clang::getFunctionOrMethodParam(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::Decl::getLocation(), clang::IdentifierInfo::getName(), getPointeeType(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::ParsedAttr::isArgIdent(), clang::Type::isBlockPointerType(), clang::Type::isVoidType(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
| void clang::SemaSwift::handleAsyncError | ( | Decl * | D, | 
| const ParsedAttr & | AL ) | 
Definition at line 295 of file SemaSwift.cpp.
References clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::checkSwiftAsyncErrorBlock(), clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsExpr(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
| void clang::SemaSwift::handleAsyncName | ( | Decl * | D, | 
| const ParsedAttr & | AL ) | 
Definition at line 629 of file SemaSwift.cpp.
References clang::Decl::addAttr(), DiagnoseName(), clang::SemaBase::getASTContext(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
| void clang::SemaSwift::handleAttrAttr | ( | Decl * | D, | 
| const ParsedAttr & | AL ) | 
Definition at line 84 of file SemaSwift.cpp.
References clang::Decl::addAttr(), clang::SemaBase::getASTContext(), clang::ParsedAttr::isInvalid(), clang::ParsedAttr::isUsedAsTypeAttr(), clang::SemaBase::SemaRef, and clang::ParsedAttr::setInvalid().
Referenced by ProcessDeclAttribute().
| void clang::SemaSwift::handleBridge | ( | Decl * | D, | 
| const ParsedAttr & | AL ) | 
Definition at line 99 of file SemaSwift.cpp.
References clang::Decl::addAttr(), clang::SemaBase::Diag(), clang::SemaBase::getASTContext(), clang::Decl::getAttr(), clang::AttributeCommonInfo::getLoc(), clang::Other, and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
| void clang::SemaSwift::handleError | ( | Decl * | D, | 
| const ParsedAttr & | AL ) | 
Definition at line 139 of file SemaSwift.cpp.
References clang::Decl::addAttr(), clang::Sema::Context, clang::SemaBase::Diag(), clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::getFunctionOrMethodNumParams(), clang::getFunctionOrMethodParamType(), clang::getFunctionOrMethodResultType(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::Type::hasPointerRepresentation(), clang::isa(), clang::isErrorParameter(), clang::Type::isIntegralType(), clang::Decl::isInvalidDecl(), clang::Type::isReferenceType(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
| void clang::SemaSwift::handleName | ( | Decl * | D, | 
| const ParsedAttr & | AL ) | 
Definition at line 617 of file SemaSwift.cpp.
References clang::Decl::addAttr(), DiagnoseName(), clang::SemaBase::getASTContext(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
| void clang::SemaSwift::handleNewType | ( | Decl * | D, | 
| const ParsedAttr & | AL ) | 
Definition at line 642 of file SemaSwift.cpp.
References clang::AANT_ArgumentIdentifier, clang::Decl::addAttr(), clang::ParsedAttr::checkExactlyNumArgs(), clang::SemaBase::Diag(), clang::ExpectedTypedef, clang::ParsedAttr::getArgAsIdent(), clang::SemaBase::getASTContext(), clang::IdentifierLoc::getIdentifierInfo(), clang::AttributeCommonInfo::getLoc(), clang::IdentifierInfo::getName(), clang::isa(), clang::ParsedAttr::isArgIdent(), clang::AttributeCommonInfo::isRegularKeywordAttribute(), and clang::SemaBase::SemaRef.
Referenced by ProcessDeclAttribute().
| SwiftNameAttr * clang::SemaSwift::mergeNameAttr | ( | Decl * | D, | 
| const SwiftNameAttr & | SNA, | ||
| StringRef | Name ) | 
Definition at line 26 of file SemaSwift.cpp.
References clang::SemaBase::Diag(), clang::Decl::dropAttr(), clang::SemaBase::getASTContext(), and clang::Decl::getAttr().
Referenced by mergeDeclAttribute().