clang 19.0.0git
Public Member Functions | List of all members
clang::dataflow::ChromiumCheckModel Class Reference

Models the behavior of Chromium's CHECK, DCHECK, etc. More...

#include "clang/Analysis/FlowSensitive/Models/ChromiumCheckModel.h"

Inheritance diagram for clang::dataflow::ChromiumCheckModel:
Inheritance graph
[legend]

Public Member Functions

 ChromiumCheckModel ()=default
 
bool transfer (const CFGElement &Element, Environment &Env) override
 Return value indicates whether the model processed the Element.
 
virtual bool transfer (const CFGElement &Element, Environment &Env)=0
 Return value indicates whether the model processed the Element.
 
- Public Member Functions inherited from clang::dataflow::Environment::ValueModel
virtual ~ValueModel ()=default
 
virtual ComparisonResult compare (QualType Type, const Value &Val1, const Environment &Env1, const Value &Val2, const Environment &Env2)
 Returns: Same: Val1 is equivalent to Val2, according to the model.
 
virtual void join (QualType Type, const Value &Val1, const Environment &Env1, const Value &Val2, const Environment &Env2, Value &JoinedVal, Environment &JoinedEnv)
 Modifies JoinedVal to approximate both Val1 and Val2.
 
virtual std::optional< WidenResultwiden (QualType Type, Value &Prev, const Environment &PrevEnv, Value &Current, Environment &CurrentEnv)
 This function may widen the current value – replace it with an approximation that can reach a fixed point more quickly than iterated application of the transfer function alone.
 

Detailed Description

Models the behavior of Chromium's CHECK, DCHECK, etc.

macros, so that code after a call to *CHECK can rely on the condition being true.

Definition at line 25 of file ChromiumCheckModel.h.

Constructor & Destructor Documentation

◆ ChromiumCheckModel()

clang::dataflow::ChromiumCheckModel::ChromiumCheckModel ( )
default

Member Function Documentation

◆ transfer()

bool clang::dataflow::ChromiumCheckModel::transfer ( const CFGElement Element,
Environment Env 
)
overridevirtual

Return value indicates whether the model processed the Element.

Implements clang::dataflow::DataflowModel.

Definition at line 53 of file ChromiumCheckModel.cpp.

References clang::Call, Env, and clang::dataflow::isCheckLikeMethod().


The documentation for this class was generated from the following files: