9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_EXCEPTION_SPEC_ANALYZER_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_UTILS_EXCEPTION_SPEC_ANALYZER_H
12#include "clang/AST/DeclCXX.h"
13#include "llvm/ADT/DenseMap.h"
35 enum class DefaultableMemberKind {
53 State analyzeUnresolvedOrDefaulted(
const CXXMethodDecl *MethodDecl,
54 const FunctionProtoType *FuncProto);
56 State analyzeFieldDecl(
const FieldDecl *FDecl, DefaultableMemberKind
Kind);
58 State analyzeBase(
const CXXBaseSpecifier &Base, DefaultableMemberKind
Kind);
60 enum class SkipMethods :
bool {
65 State analyzeRecord(
const CXXRecordDecl *RecordDecl,
66 DefaultableMemberKind
Kind,
67 SkipMethods SkipMethods = SkipMethods::No);
70 const FunctionProtoType *FuncProto);
72 static bool hasTrivialMemberKind(
const CXXRecordDecl *RecDecl,
73 DefaultableMemberKind
Kind);
75 static bool isConstructor(DefaultableMemberKind
Kind);
77 static bool isSpecialMember(DefaultableMemberKind
Kind);
79 static bool isComparison(DefaultableMemberKind
Kind);
81 static DefaultableMemberKind
82 getDefaultableMemberKind(
const FunctionDecl *
FuncDecl);
84 llvm::DenseMap<const FunctionDecl *, State> FunctionCache{32U};
This class analysis if a FunctionDecl has been declared implicitly through defaulting or explicitly a...
State analyze(const FunctionDecl *FuncDecl)
@ Throwing
This function has been declared as possibly throwing.
@ Unknown
We're unable to tell if this function is declared as throwing or not.
@ NotThrowing
This function has been declared as not throwing.
ExceptionSpecAnalyzer()=default
static constexpr const char FuncDecl[]