clang 22.0.0git
clang::SemaSwift Class Reference

#include "clang/Sema/SemaSwift.h"

Inheritance diagram for clang::SemaSwift:
[legend]

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.
void AddParameterABIAttr (Decl *D, const AttributeCommonInfo &CI, ParameterABI abi)
Public Member Functions inherited from clang::SemaBase
 SemaBase (Sema &S)
ASTContextgetASTContext () const
DiagnosticsEnginegetDiagnostics () const
const LangOptionsgetLangOpts () const
DeclContextgetCurContext () 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
SemaSemaRef

Detailed Description

Definition at line 28 of file SemaSwift.h.

Constructor & Destructor Documentation

◆ SemaSwift()

clang::SemaSwift::SemaSwift ( Sema & S)

Definition at line 24 of file SemaSwift.cpp.

References clang::SemaBase::SemaBase().

Member Function Documentation

◆ AddParameterABIAttr()

◆ DiagnoseName()

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.

Returns
true if the name is a valid swift name for 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().

◆ handleAsyncAttr()

◆ handleAsyncError()

◆ handleAsyncName()

void clang::SemaSwift::handleAsyncName ( Decl * D,
const ParsedAttr & AL )

◆ handleAttrAttr()

◆ handleBridge()

◆ handleError()

◆ handleName()

void clang::SemaSwift::handleName ( Decl * D,
const ParsedAttr & AL )

◆ handleNewType()

◆ mergeNameAttr()

SwiftNameAttr * clang::SemaSwift::mergeNameAttr ( Decl * D,
const SwiftNameAttr & SNA,
StringRef Name )

The documentation for this class was generated from the following files: