#include "clang/Sema/SemaInternal.h"
#include "clang/AST/ASTMutationListener.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/StmtObjC.h"
#include "clang/AST/TypeLoc.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include <optional>
namespace clang {
static const FunctionProtoType *GetUnderlyingFunction(QualType T)
{ … }
bool Sema::isLibstdcxxEagerExceptionSpecHack(const Declarator &D) { … }
ExprResult Sema::ActOnNoexceptSpec(Expr *NoexceptExpr,
ExceptionSpecificationType &EST) { … }
bool Sema::CheckSpecifiedExceptionType(QualType &T, SourceRange Range) { … }
bool Sema::CheckDistantExceptionSpec(QualType T) { … }
const FunctionProtoType *
Sema::ResolveExceptionSpec(SourceLocation Loc, const FunctionProtoType *FPT) { … }
void
Sema::UpdateExceptionSpec(FunctionDecl *FD,
const FunctionProtoType::ExceptionSpecInfo &ESI) { … }
static bool exceptionSpecNotKnownYet(const FunctionDecl *FD) { … }
static bool CheckEquivalentExceptionSpecImpl(
Sema &S, const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID,
const FunctionProtoType *Old, SourceLocation OldLoc,
const FunctionProtoType *New, SourceLocation NewLoc,
bool *MissingExceptionSpecification = nullptr,
bool *MissingEmptyExceptionSpecification = nullptr,
bool AllowNoexceptAllMatchWithNoSpec = false, bool IsOperatorNew = false);
static bool hasImplicitExceptionSpec(FunctionDecl *Decl) { … }
bool Sema::CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New) { … }
bool Sema::CheckEquivalentExceptionSpec(
const FunctionProtoType *Old, SourceLocation OldLoc,
const FunctionProtoType *New, SourceLocation NewLoc) { … }
static bool CheckEquivalentExceptionSpecImpl(
Sema &S, const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID,
const FunctionProtoType *Old, SourceLocation OldLoc,
const FunctionProtoType *New, SourceLocation NewLoc,
bool *MissingExceptionSpecification,
bool *MissingEmptyExceptionSpecification,
bool AllowNoexceptAllMatchWithNoSpec, bool IsOperatorNew) { … }
bool Sema::CheckEquivalentExceptionSpec(const PartialDiagnostic &DiagID,
const PartialDiagnostic &NoteID,
const FunctionProtoType *Old,
SourceLocation OldLoc,
const FunctionProtoType *New,
SourceLocation NewLoc) { … }
bool Sema::handlerCanCatch(QualType HandlerType, QualType ExceptionType) { … }
bool Sema::CheckExceptionSpecSubset(
const PartialDiagnostic &DiagID, const PartialDiagnostic &NestedDiagID,
const PartialDiagnostic &NoteID, const PartialDiagnostic &NoThrowDiagID,
const FunctionProtoType *Superset, bool SkipSupersetFirstParameter,
SourceLocation SuperLoc, const FunctionProtoType *Subset,
bool SkipSubsetFirstParameter, SourceLocation SubLoc) { … }
static bool
CheckSpecForTypesEquivalent(Sema &S, const PartialDiagnostic &DiagID,
const PartialDiagnostic &NoteID, QualType Target,
SourceLocation TargetLoc, QualType Source,
SourceLocation SourceLoc) { … }
bool Sema::CheckParamExceptionSpec(
const PartialDiagnostic &DiagID, const PartialDiagnostic &NoteID,
const FunctionProtoType *Target, bool SkipTargetFirstParameter,
SourceLocation TargetLoc, const FunctionProtoType *Source,
bool SkipSourceFirstParameter, SourceLocation SourceLoc) { … }
bool Sema::CheckExceptionSpecCompatibility(Expr *From, QualType ToType) { … }
bool Sema::CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New,
const CXXMethodDecl *Old) { … }
static CanThrowResult canSubStmtsThrow(Sema &Self, const Stmt *S) { … }
CanThrowResult Sema::canCalleeThrow(Sema &S, const Expr *E, const Decl *D,
SourceLocation Loc) { … }
static CanThrowResult canVarDeclThrow(Sema &Self, const VarDecl *VD) { … }
static CanThrowResult canDynamicCastThrow(const CXXDynamicCastExpr *DC) { … }
static CanThrowResult canTypeidThrow(Sema &S, const CXXTypeidExpr *DC) { … }
CanThrowResult Sema::canThrow(const Stmt *S) { … }
}