clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::CXXConversionDecl Class Reference

Represents a C++ conversion function within a class. More...

#include <DeclCXX.h>

Inheritance diagram for clang::CXXConversionDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::CXXConversionDecl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool isExplicitSpecified () const
bool isExplicit () const
 Whether this is an explicit conversion operator (C++11 and later).
QualType getConversionType () const
 Returns the type that this conversion function is converting to.
bool isLambdaToBlockPointerConversion () const
 Determine whether this conversion function is a conversion from a lambda closure type to a block pointer.

Static Public Member Functions

static CXXConversionDeclCreate (ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, bool isInline, bool isExplicit, bool isConstexpr, SourceLocation EndLocation)
static CXXConversionDeclCreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Friends

class ASTDeclReader
class ASTDeclWriter

Detailed Description

Represents a C++ conversion function within a class.

For example:

 class X {
 public:
   operator bool();
 };

Definition at line 2397 of file DeclCXX.h.


Member Function Documentation

static bool clang::CXXConversionDecl::classof ( const Decl D) [inline, static]

Reimplemented from clang::CXXMethodDecl.

Definition at line 2446 of file DeclCXX.h.

References classofKind(), and clang::Decl::getKind().

static bool clang::CXXConversionDecl::classofKind ( Kind  K) [inline, static]

Reimplemented from clang::CXXMethodDecl.

Definition at line 2447 of file DeclCXX.h.

Referenced by classof().

CXXConversionDecl * CXXConversionDecl::Create ( ASTContext C,
CXXRecordDecl RD,
SourceLocation  StartLoc,
const DeclarationNameInfo NameInfo,
QualType  T,
TypeSourceInfo TInfo,
bool  isInline,
bool  isExplicit,
bool  isConstexpr,
SourceLocation  EndLocation 
) [static]

Reimplemented from clang::CXXMethodDecl.

Definition at line 1894 of file DeclCXX.cpp.

References AttributeLangSupport::C.

Whether this is an explicit conversion operator (C++11 and later).

Explicit conversion operators are only considered for direct initialization, e.g., when the user has explicitly written a cast.

Definition at line 2432 of file DeclCXX.h.

References clang::Redeclarable< FunctionDecl >::getFirstDecl(), and isExplicitSpecified().

Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::BuildCallToObjectOfClassType(), and clang::Sema::PerformContextualImplicitConversion().

Whether this conversion function declaration is marked "explicit", meaning that it can only be used for direct initialization (including explitly written casts). This is a C++11 feature.

Definition at line 2426 of file DeclCXX.h.

Referenced by isExplicit().

Determine whether this conversion function is a conversion from a lambda closure type to a block pointer.

Definition at line 1916 of file DeclCXX.cpp.

References getConversionType(), clang::CXXMethodDecl::getParent(), clang::Type::isBlockPointerType(), clang::Decl::isImplicit(), and clang::CXXRecordDecl::isLambda().

Referenced by clang::Sema::MarkFunctionReferenced().


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Reimplemented from clang::FunctionDecl.

Definition at line 2449 of file DeclCXX.h.

friend class ASTDeclWriter [friend]

Reimplemented from clang::FunctionDecl.

Definition at line 2450 of file DeclCXX.h.


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