clang 20.0.0git
Public Member Functions | Public Attributes | List of all members
clang::UserDefinedConversionSequence Struct Reference

UserDefinedConversionSequence - Represents a user-defined conversion sequence (C++ 13.3.3.1.2). More...

#include "clang/Sema/Overload.h"

Public Member Functions

void dump () const
 dump - Print this user-defined conversion sequence to standard error.
 

Public Attributes

StandardConversionSequence Before
 Represents the standard conversion that occurs before the actual user-defined conversion.
 
bool EllipsisConversion: 1
 EllipsisConversion - When this is true, it means user-defined conversion sequence starts with a ... (ellipsis) conversion, instead of a standard conversion.
 
bool HadMultipleCandidates: 1
 HadMultipleCandidates - When this is true, it means that the conversion function was resolved from an overloaded set having size greater than 1.
 
StandardConversionSequence After
 After - Represents the standard conversion that occurs after the actual user-defined conversion.
 
FunctionDeclConversionFunction
 ConversionFunction - The function that will perform the user-defined conversion.
 
DeclAccessPair FoundConversionFunction
 The declaration that we found via name lookup, which might be the same as ConversionFunction or it might be a using declaration that refers to ConversionFunction.
 

Detailed Description

UserDefinedConversionSequence - Represents a user-defined conversion sequence (C++ 13.3.3.1.2).

Definition at line 422 of file Overload.h.

Member Function Documentation

◆ dump()

void UserDefinedConversionSequence::dump ( ) const

dump - Print this user-defined conversion sequence to standard error.

Useful for debugging overloading issues.

Definition at line 652 of file SemaOverload.cpp.

References After, Before, ConversionFunction, clang::StandardConversionSequence::dump(), clang::StandardConversionSequence::First, clang::StandardConversionSequence::Second, and clang::StandardConversionSequence::Third.

Referenced by clang::ImplicitConversionSequence::dump().

Member Data Documentation

◆ After

StandardConversionSequence clang::UserDefinedConversionSequence::After

◆ Before

StandardConversionSequence clang::UserDefinedConversionSequence::Before

Represents the standard conversion that occurs before the actual user-defined conversion.

C++11 13.3.3.1.2p1: If the user-defined conversion is specified by a constructor (12.3.1), the initial standard conversion sequence converts the source type to the type required by the argument of the constructor. If the user-defined conversion is specified by a conversion function (12.3.2), the initial standard conversion sequence converts the source type to the implicit object parameter of the conversion function.

Definition at line 434 of file Overload.h.

Referenced by BuildConvertedConstantExpression(), dump(), FindConversionForRefInit(), hasDeprecatedStringLiteralToCharPtrConversion(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), and clang::Sema::PerformImplicitConversion().

◆ ConversionFunction

FunctionDecl* clang::UserDefinedConversionSequence::ConversionFunction

ConversionFunction - The function that will perform the user-defined conversion.

Null if the conversion is an aggregate initialization from an initializer list.

Definition at line 456 of file Overload.h.

Referenced by CompareImplicitConversionSequences(), dump(), FindConversionForRefInit(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), clang::Sema::PerformImplicitConversion(), TryReferenceInit(), and TryUserDefinedConversion().

◆ EllipsisConversion

bool clang::UserDefinedConversionSequence::EllipsisConversion

EllipsisConversion - When this is true, it means user-defined conversion sequence starts with a ... (ellipsis) conversion, instead of a standard conversion.

In this case, 'Before' field must be ignored.

Definition at line 442 of file Overload.h.

Referenced by FindConversionForRefInit(), IsUserDefinedConversion(), and clang::Sema::PerformImplicitConversion().

◆ FoundConversionFunction

DeclAccessPair clang::UserDefinedConversionSequence::FoundConversionFunction

The declaration that we found via name lookup, which might be the same as ConversionFunction or it might be a using declaration that refers to ConversionFunction.

Definition at line 461 of file Overload.h.

Referenced by FindConversionForRefInit(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), clang::Sema::PerformImplicitConversion(), and TryUserDefinedConversion().

◆ HadMultipleCandidates

bool clang::UserDefinedConversionSequence::HadMultipleCandidates

HadMultipleCandidates - When this is true, it means that the conversion function was resolved from an overloaded set having size greater than 1.

Definition at line 447 of file Overload.h.

Referenced by FindConversionForRefInit(), IsInitializerListConstructorConversion(), IsUserDefinedConversion(), and clang::Sema::PerformImplicitConversion().


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