clang 8.0.0

Public Member Functions | Public Attributes | List of all members
clang::Sema::ContextualImplicitConverter Class Referenceabstract

Abstract base class used to perform a contextual implicit conversion from an expression to any type passing a filter. More...

`#include "clang/Sema/Sema.h"`

Inheritance diagram for clang::Sema::ContextualImplicitConverter:
[legend]
Collaboration diagram for clang::Sema::ContextualImplicitConverter:
[legend]

## Public Member Functions
| ContextualImplicitConverter (bool Suppress=false, bool SuppressConversion=false)
virtual bool | match (QualType T)=0
| Determine whether the specified type is a valid destination type for this conversion. More...
virtual SemaDiagnosticBuilder | diagnoseNoMatch (Sema &S, SourceLocation Loc, QualType T)=0
| Emits a diagnostic complaining that the expression does not have integral or enumeration type. More...
virtual SemaDiagnosticBuilder | diagnoseIncomplete (Sema &S, SourceLocation Loc, QualType T)=0
| Emits a diagnostic when the expression has incomplete class type. More...
virtual SemaDiagnosticBuilder | diagnoseExplicitConv (Sema &S, SourceLocation Loc, QualType T, QualType ConvTy)=0
| Emits a diagnostic when the only matching conversion function is explicit. More...
virtual SemaDiagnosticBuilder | noteExplicitConv (Sema &S, CXXConversionDecl *Conv, QualType ConvTy)=0
| Emits a note for the explicit conversion function. More...
virtual SemaDiagnosticBuilder | diagnoseAmbiguous (Sema &S, SourceLocation Loc, QualType T)=0
| Emits a diagnostic when there are multiple possible conversion functions. More...
virtual SemaDiagnosticBuilder | noteAmbiguous (Sema &S, CXXConversionDecl *Conv, QualType ConvTy)=0
| Emits a note for one of the candidate conversions. More...
virtual SemaDiagnosticBuilder | diagnoseConversion (Sema &S, SourceLocation Loc, QualType T, QualType ConvTy)=0
| Emits a diagnostic when we picked a conversion function (for cases when we are not allowed to pick a conversion function). More...
virtual | ~ContextualImplicitConverter ()

## Public Attributes
bool | Suppress
bool | SuppressConversion

## Detailed Description

Abstract base class used to perform a contextual implicit conversion from an expression to any type passing a filter.

Definition at line 2653 of file Sema.h.

## Constructor & Destructor Documentation

## ◆ ContextualImplicitConverter()

clang::Sema::ContextualImplicitConverter::ContextualImplicitConverter | ( | bool | Suppress = `false`,
|  | bool | SuppressConversion = `false`
| ) |  |
| inline

Definition at line 2658 of file Sema.h.

References clang::ast_matchers::match().

## ◆ ~ContextualImplicitConverter()

virtual clang::Sema::ContextualImplicitConverter::~ContextualImplicitConverter | ( |  | ) |
| inline virtual

Definition at line 2698 of file Sema.h.

## Member Function Documentation

## ◆ diagnoseAmbiguous()

virtual SemaDiagnosticBuilder clang::Sema::ContextualImplicitConverter::diagnoseAmbiguous | ( | Sema & | S,
|  | SourceLocation | Loc,
|  | QualType | T
| ) |  |
| pure virtual

Emits a diagnostic when there are multiple possible conversion functions.

Referenced by diagnoseAmbiguousConversion().

## ◆ diagnoseConversion()

virtual SemaDiagnosticBuilder clang::Sema::ContextualImplicitConverter::diagnoseConversion | ( | Sema & | S,
|  | SourceLocation | Loc,
|  | QualType | T,
|  | QualType | ConvTy
| ) |  |
| pure virtual

Emits a diagnostic when we picked a conversion function (for cases when we are not allowed to pick a conversion function).

Referenced by recordConversion().

## ◆ diagnoseExplicitConv()

virtual SemaDiagnosticBuilder clang::Sema::ContextualImplicitConverter::diagnoseExplicitConv | ( | Sema & | S,
|  | SourceLocation | Loc,
|  | QualType | T,
|  | QualType | ConvTy
| ) |  |
| pure virtual

Emits a diagnostic when the only matching conversion function is explicit.

Referenced by diagnoseNoViableConversion().

## ◆ diagnoseIncomplete()

virtual SemaDiagnosticBuilder clang::Sema::ContextualImplicitConverter::diagnoseIncomplete | ( | Sema & | S,
|  | SourceLocation | Loc,
|  | QualType | T
| ) |  |
| pure virtual

Emits a diagnostic when the expression has incomplete class type.

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

## ◆ diagnoseNoMatch()

virtual SemaDiagnosticBuilder clang::Sema::ContextualImplicitConverter::diagnoseNoMatch | ( | Sema & | S,
|  | SourceLocation | Loc,
|  | QualType | T
| ) |  |
| pure virtual

Emits a diagnostic complaining that the expression does not have integral or enumeration type.

Implemented in clang::Sema::ICEConvertDiagnoser.

Referenced by finishContextualImplicitConversion(), and clang::Sema::PerformContextualImplicitConversion().

## ◆ match()

virtual bool clang::Sema::ContextualImplicitConverter::match | ( | QualType | T | ) |
| pure virtual

Determine whether the specified type is a valid destination type for this conversion.

Implemented in clang::Sema::ICEConvertDiagnoser.

Referenced by finishContextualImplicitConversion(), and clang::Sema::PerformContextualImplicitConversion().

## ◆ noteAmbiguous()

virtual SemaDiagnosticBuilder clang::Sema::ContextualImplicitConverter::noteAmbiguous | ( | Sema & | S,
|  | CXXConversionDecl * | Conv,
|  | QualType | ConvTy
| ) |  |
| pure virtual

Emits a note for one of the candidate conversions.

Referenced by diagnoseAmbiguousConversion().

## ◆ noteExplicitConv()

virtual SemaDiagnosticBuilder clang::Sema::ContextualImplicitConverter::noteExplicitConv | ( | Sema & | S,
|  | CXXConversionDecl * | Conv,
|  | QualType | ConvTy
| ) |  |
| pure virtual

Emits a note for the explicit conversion function.

Referenced by diagnoseNoViableConversion().

## Member Data Documentation

## ◆ Suppress

bool clang::Sema::ContextualImplicitConverter::Suppress

Definition at line 2655 of file Sema.h.

Referenced by diagnoseAmbiguousConversion(), diagnoseNoViableConversion(), finishContextualImplicitConversion(), and clang::Sema::PerformContextualImplicitConversion().

## ◆ SuppressConversion

bool clang::Sema::ContextualImplicitConverter::SuppressConversion

Definition at line 2656 of file Sema.h.

Referenced by recordConversion().

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

- include/clang/Sema/Sema.h