clang  15.0.0git
Macros | Functions
StdLibraryFunctionsChecker.cpp File Reference
#include "ErrnoModeling.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include <string>
Include dependency graph for StdLibraryFunctionsChecker.cpp:

Go to the source code of this file.

Macros

#define REGISTER_CHECKER(name)
 

Functions

static const char * describeErrnoCheckState (errno_modeling::ErrnoCheckState CS)
 Produce a textual description of the state of errno (this describes the way how it is allowed to be used). More...
 
static BasicValueFactorygetBVF (ProgramStateRef State)
 

Macro Definition Documentation

◆ REGISTER_CHECKER

#define REGISTER_CHECKER (   name)
Value:
void ento::register##name(CheckerManager &mgr) { \
StdLibraryFunctionsChecker *checker = \
mgr.getChecker<StdLibraryFunctionsChecker>(); \
checker->ChecksEnabled[StdLibraryFunctionsChecker::CK_##name] = true; \
checker->CheckNames[StdLibraryFunctionsChecker::CK_##name] = \
mgr.getCurrentCheckerName(); \
} \
\
bool ento::shouldRegister##name(const CheckerManager &mgr) { return true; }

Definition at line 3019 of file StdLibraryFunctionsChecker.cpp.

Function Documentation

◆ describeErrnoCheckState()

static const char* describeErrnoCheckState ( errno_modeling::ErrnoCheckState  CS)
static

Produce a textual description of the state of errno (this describes the way how it is allowed to be used).

The returned string is insertable into a longer warning message (in the form "the value 'errno' <...>"). Currently only the errno_modeling::MustNotBeChecked state is supported. But later other kind of errno state may be needed if functions with special handling of errno are added.

Definition at line 67 of file StdLibraryFunctionsChecker.cpp.

References clang::ento::errno_modeling::MustNotBeChecked.

◆ getBVF()

static BasicValueFactory& getBVF ( ProgramStateRef  State)
static
clang::ento::CheckerManager
Definition: CheckerManager.h:126
clang::transformer::name
RangeSelector name(std::string ID)
Given a node with a "name", (like NamedDecl, DeclRefExpr, CxxCtorInitializer, and TypeLoc) selects th...
Definition: RangeSelector.cpp:200