9#ifndef CLANG_ANALYSIS_FLOWSENSITIVE_MODELS_UNCHECKEDSTATUSORACCESSMODEL_H
10#define CLANG_ANALYSIS_FLOWSENSITIVE_MODELS_UNCHECKEDSTATUSORACCESSMODEL_H
23#include "llvm/ADT/SmallVector.h"
24#include "llvm/ADT/StringMap.h"
25#include "llvm/ADT/StringRef.h"
Defines the clang::SourceLocation class and associated facilities.
C Language Family Type Representation.
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.
Represents a C++ struct/union/class.
A (possibly-)qualified type.
The base class of the type hierarchy.
Collects cases of a "match switch": a collection of matchers paired with callbacks,...
DataflowAnalysis(ASTContext &Context)
Holds the state of the program (store and heap) at a given program point.
A storage location for a record (struct, class, or union).
Base class for elements of the local variable store and of the heap.
UncheckedStatusOrAccessDiagnoser(UncheckedStatusOrAccessModelOptions Options={})
llvm::SmallVector< SourceLocation > operator()(const CFGElement &Elt, ASTContext &Ctx, const TransferStateForDiagnostics< UncheckedStatusOrAccessModel::Lattice > &State)
static Lattice initialElement()
UncheckedStatusOrAccessModel(ASTContext &Ctx, Environment &Env)
void transfer(const CFGElement &Elt, Lattice &L, Environment &Env)
internal::Matcher< QualType > TypeMatcher
internal::Matcher< Decl > DeclarationMatcher
Types of matchers for the top-level classes in the AST class hierarchy.
TransferState< UncheckedStatusOrAccessModel::Lattice > LatticeTransferState
RecordStorageLocation & locForStatus(RecordStorageLocation &StatusOrLoc)
clang::ast_matchers::DeclarationMatcher statusOrClass()
clang::ast_matchers::TypeMatcher statusOrType()
clang::ast_matchers::DeclarationMatcher statusClass()
BoolValue & initializeStatusOr(RecordStorageLocation &StatusOrLoc, Environment &Env)
QualType findStatusType(const ASTContext &Ctx)
BoolValue & initializeStatus(RecordStorageLocation &StatusLoc, Environment &Env)
llvm::StringMap< QualType > getSyntheticFields(QualType Ty, QualType StatusType, const CXXRecordDecl &RD)
StorageLocation & locForOk(RecordStorageLocation &StatusLoc)
BoolValue & valForOk(RecordStorageLocation &StatusLoc, Environment &Env)
bool isStatusOrType(QualType Type)
CFGMatchSwitch< LatticeTransferState > buildTransferMatchSwitch(ASTContext &Ctx, CFGMatchSwitchBuilder< LatticeTransferState > Builder)
bool isStatusType(QualType Type)
clang::ast_matchers::DeclarationMatcher statusOrOperatorBaseClass()
std::function< Result(const CFGElement &, ASTContext &, State &)> CFGMatchSwitch
A read-only version of TransferState.
A common form of state shared between the cases of a transfer function.