#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/Type.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Sema/SemaInternal.h"
#define DEBUG_TYPE …
usingnamespaceclang;
namespace {
enum class ViolationID : uint8_t { … };
class ViolationSite { … };
struct Violation { … };
enum class SpecialFuncType : uint8_t { … };
enum class CallableType : uint8_t { … };
static bool functionIsVerifiable(const FunctionDecl *FD) { … }
static bool isNoexcept(const FunctionDecl *FD) { … }
static FunctionEffectKindSet getBuiltinFunctionEffects(unsigned BuiltinID) { … }
struct CallableInfo { … };
class EffectToViolationMap { … };
class PendingFunctionAnalysis { … };
class CompleteFunctionAnalysis { … };
class Analyzer { … };
Analyzer::AnalysisMap::~AnalysisMap() { … }
}
namespace clang {
bool Sema::diagnoseConflictingFunctionEffect(
const FunctionEffectsRef &FX, const FunctionEffectWithCondition &NewEC,
SourceLocation NewAttrLoc) { … }
void Sema::diagnoseFunctionEffectMergeConflicts(
const FunctionEffectSet::Conflicts &Errs, SourceLocation NewLoc,
SourceLocation OldLoc) { … }
void Sema::maybeAddDeclWithEffects(const Decl *D,
const FunctionEffectsRef &FX) { … }
void Sema::addDeclWithEffects(const Decl *D, const FunctionEffectsRef &FX) { … }
void Sema::performFunctionEffectAnalysis(TranslationUnitDecl *TU) { … }
Sema::FunctionEffectDiffVector::FunctionEffectDiffVector(
const FunctionEffectsRef &Old, const FunctionEffectsRef &New) { … }
bool Sema::FunctionEffectDiff::shouldDiagnoseConversion(
QualType SrcType, const FunctionEffectsRef &SrcFX, QualType DstType,
const FunctionEffectsRef &DstFX) const { … }
bool Sema::FunctionEffectDiff::shouldDiagnoseRedeclaration(
const FunctionDecl &OldFunction, const FunctionEffectsRef &OldFX,
const FunctionDecl &NewFunction, const FunctionEffectsRef &NewFX) const { … }
Sema::FunctionEffectDiff::OverrideResult
Sema::FunctionEffectDiff::shouldDiagnoseMethodOverride(
const CXXMethodDecl &OldMethod, const FunctionEffectsRef &OldFX,
const CXXMethodDecl &NewMethod, const FunctionEffectsRef &NewFX) const { … }
}