clang 22.0.0git
|
Models the behavior of Chromium's CHECK, DCHECK, etc. More...
#include "clang/Analysis/FlowSensitive/Models/ChromiumCheckModel.h"
Public Member Functions | |
ChromiumCheckModel ()=default | |
bool | transfer (const CFGElement &Element, Environment &Env) override |
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< WidenResult > | widen (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. |
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.
|
default |
|
overridevirtual |
Return value indicates whether the model processed the Element.
Implements clang::dataflow::DataflowModel.
Definition at line 54 of file ChromiumCheckModel.cpp.
References clang::dataflow::Environment::arena(), clang::dataflow::Environment::assume(), clang::Call, clang::CFGElement::getAs(), clang::dataflow::isCheckLikeMethod(), and clang::dataflow::Arena::makeLiteral().