14#ifndef CLANG_ANALYSIS_FLOWSENSITIVE_MODELS_UNCHECKEDOPTIONALACCESSMODEL_H
15#define CLANG_ANALYSIS_FLOWSENSITIVE_MODELS_UNCHECKEDOPTIONALACCESSMODEL_H
Defines the clang::ASTContext interface.
Defines the clang::SourceLocation class and associated facilities.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Represents a top-level expression in a basic block.
A (possibly-)qualified type.
The base class of the type hierarchy.
Base class template for dataflow analyses built on a single lattice type.
Holds the state of the program (store and heap) at a given program point.
Trivial lattice for dataflow analysis with exactly one element.
std::vector< SourceLocation > diagnose(ASTContext &Ctx, const CFGElement *Elt, const Environment &Env)
Dataflow analysis that models whether optionals hold values or not.
ComparisonResult compare(QualType Type, const Value &Val1, const Environment &Env1, const Value &Val2, const Environment &Env2) override
Returns: Same: Val1 is equivalent to Val2, according to the model.
bool merge(QualType Type, const Value &Val1, const Environment &Env1, const Value &Val2, const Environment &Env2, Value &MergedVal, Environment &MergedEnv) override
Modifies MergedVal to approximate both Val1 and Val2.
void transfer(const CFGElement &Elt, NoopLattice &L, Environment &Env)
Value * widen(QualType Type, Value &Prev, const Environment &PrevEnv, Value &Current, Environment &CurrentEnv) override
This function may widen the current value – replace it with an approximation that can reach a fixed p...
static NoopLattice initialElement()
static ast_matchers::DeclarationMatcher optionalClassDecl()
Returns a matcher for the optional classes covered by this model.
Base class for all values computed by abstract interpretation.
internal::Matcher< Decl > DeclarationMatcher
Types of matchers for the top-level classes in the AST class hierarchy.
ComparisonResult
Indicates the result of a tentative comparison.
std::function< Result(const CFGElement &, ASTContext &, State &)> CFGMatchSwitch
bool IgnoreSmartPointerDereference
In generating diagnostics, ignore optionals reachable through overloaded operator* or operator-> (oth...