clang 19.0.0git
Namespaces | Enumerations | Functions
ErrnoModeling.h File Reference
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include <optional>

Go to the source code of this file.

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::ento
 
namespace  clang::ento::errno_modeling
 

Enumerations

enum  clang::ento::errno_modeling::ErrnoCheckState : unsigned { clang::ento::errno_modeling::Irrelevant = 0 , clang::ento::errno_modeling::MustBeChecked = 1 , clang::ento::errno_modeling::MustNotBeChecked = 2 }
 Describe how reads and writes of errno are handled by the checker. More...
 

Functions

std::optional< SValclang::ento::errno_modeling::getErrnoValue (ProgramStateRef State)
 Returns the value of 'errno', if 'errno' was found in the AST.
 
ErrnoCheckState clang::ento::errno_modeling::getErrnoState (ProgramStateRef State)
 Returns the errno check state, Errno_Irrelevant if 'errno' was not found (this is not the only case for that value).
 
std::optional< Locclang::ento::errno_modeling::getErrnoLoc (ProgramStateRef State)
 Returns the location that points to the MemoryRegion where the 'errno' value is stored.
 
ProgramStateRef clang::ento::errno_modeling::setErrnoValue (ProgramStateRef State, const LocationContext *LCtx, SVal Value, ErrnoCheckState EState)
 Set value of 'errno' to any SVal, if possible.
 
ProgramStateRef clang::ento::errno_modeling::setErrnoValue (ProgramStateRef State, CheckerContext &C, uint64_t Value, ErrnoCheckState EState)
 Set value of 'errno' to a concrete (signed) integer, if possible.
 
ProgramStateRef clang::ento::errno_modeling::setErrnoState (ProgramStateRef State, ErrnoCheckState EState)
 Set the errno check state, do not modify the errno value.
 
ProgramStateRef clang::ento::errno_modeling::clearErrnoState (ProgramStateRef State)
 Clear state of errno (make it irrelevant).
 
bool clang::ento::errno_modeling::isErrno (const Decl *D)
 Determine if a Decl node related to 'errno'.
 
const NoteTagclang::ento::errno_modeling::getErrnoNoteTag (CheckerContext &C, const std::string &Message)
 Create a NoteTag that displays the message if the 'errno' memory region is marked as interesting, and resets the interestingness.
 
ProgramStateRef clang::ento::errno_modeling::setErrnoForStdSuccess (ProgramStateRef State, CheckerContext &C)
 Set errno state for the common case when a standard function is successful.
 
ProgramStateRef clang::ento::errno_modeling::setErrnoForStdFailure (ProgramStateRef State, CheckerContext &C, NonLoc ErrnoSym)
 Set errno state for the common case when a standard function fails.
 
ProgramStateRef clang::ento::errno_modeling::setErrnoStdMustBeChecked (ProgramStateRef State, CheckerContext &C, const Expr *InvalE)
 Set errno state for the common case when a standard function indicates failure only by errno.