clang 20.0.0git
|
#include "clang/Sema/Sema.h"
Public Types | |
enum class | Kind { Added , Removed , ConditionMismatch } |
enum class | OverrideResult { NoAction , Warn , Merge } |
Describes the result of effects differing between a base class's virtual method and an overriding method in a subclass. More... | |
Public Member Functions | |
StringRef | effectName () const |
bool | shouldDiagnoseConversion (QualType SrcType, const FunctionEffectsRef &SrcFX, QualType DstType, const FunctionEffectsRef &DstFX) const |
Return true if adding or removing the effect as part of a type conversion should generate a diagnostic. | |
bool | shouldDiagnoseRedeclaration (const FunctionDecl &OldFunction, const FunctionEffectsRef &OldFX, const FunctionDecl &NewFunction, const FunctionEffectsRef &NewFX) const |
Return true if adding or removing the effect in a redeclaration should generate a diagnostic. | |
OverrideResult | shouldDiagnoseMethodOverride (const CXXMethodDecl &OldMethod, const FunctionEffectsRef &OldFX, const CXXMethodDecl &NewMethod, const FunctionEffectsRef &NewFX) const |
Return true if adding or removing the effect in a C++ virtual method override should generate a diagnostic. | |
Public Attributes | |
FunctionEffect::Kind | EffectKind |
Kind | DiffKind |
std::optional< FunctionEffectWithCondition > | Old |
std::optional< FunctionEffectWithCondition > | New |
|
strong |
|
strong |
|
inline |
bool clang::Sema::FunctionEffectDiff::shouldDiagnoseConversion | ( | QualType | SrcType, |
const FunctionEffectsRef & | SrcFX, | ||
QualType | DstType, | ||
const FunctionEffectsRef & | DstFX | ||
) | const |
Return true if adding or removing the effect as part of a type conversion should generate a diagnostic.
Definition at line 1550 of file SemaFunctionEffects.cpp.
References clang::FunctionEffect::Allocating, clang::FunctionEffect::Blocking, clang::FunctionEffect::NonAllocating, and clang::FunctionEffect::NonBlocking.
Sema::FunctionEffectDiff::OverrideResult clang::Sema::FunctionEffectDiff::shouldDiagnoseMethodOverride | ( | const CXXMethodDecl & | OldMethod, |
const FunctionEffectsRef & | OldFX, | ||
const CXXMethodDecl & | NewMethod, | ||
const FunctionEffectsRef & | NewFX | ||
) | const |
Return true if adding or removing the effect in a C++ virtual method override should generate a diagnostic.
Definition at line 1612 of file SemaFunctionEffects.cpp.
References clang::FunctionEffect::Allocating, clang::FunctionEffect::Blocking, clang::FunctionEffect::NonAllocating, and clang::FunctionEffect::NonBlocking.
bool clang::Sema::FunctionEffectDiff::shouldDiagnoseRedeclaration | ( | const FunctionDecl & | OldFunction, |
const FunctionEffectsRef & | OldFX, | ||
const FunctionDecl & | NewFunction, | ||
const FunctionEffectsRef & | NewFX | ||
) | const |
Return true if adding or removing the effect in a redeclaration should generate a diagnostic.
Definition at line 1587 of file SemaFunctionEffects.cpp.
References clang::FunctionEffect::Allocating, clang::FunctionEffect::Blocking, clang::FunctionEffect::NonAllocating, and clang::FunctionEffect::NonBlocking.
FunctionEffect::Kind clang::Sema::FunctionEffectDiff::EffectKind |
std::optional<FunctionEffectWithCondition> clang::Sema::FunctionEffectDiff::New |
std::optional<FunctionEffectWithCondition> clang::Sema::FunctionEffectDiff::Old |