clang 19.0.0git
Macros | Enumerations | Functions
UnixAPIChecker.cpp File Reference
#include "clang/Basic/TargetInfo.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.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/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>

Go to the source code of this file.

Macros

#define REGISTER_CHECKER(CHECKERNAME)
 

Enumerations

enum class  OpenVariant { Open , OpenAt }
 

Functions

static bool IsZeroByteAllocation (ProgramStateRef state, const SVal argVal, ProgramStateRef *trueState, ProgramStateRef *falseState)
 

Macro Definition Documentation

◆ REGISTER_CHECKER

#define REGISTER_CHECKER (   CHECKERNAME)
Value:
void ento::register##CHECKERNAME(CheckerManager &mgr) { \
mgr.registerChecker<CHECKERNAME>(); \
} \
\
bool ento::shouldRegister##CHECKERNAME(const CheckerManager &mgr) { \
return true; \
}
CHECKER * registerChecker(AT &&... Args)
Used to register checkers.

Definition at line 624 of file UnixAPIChecker.cpp.

Enumeration Type Documentation

◆ OpenVariant

enum class OpenVariant
strong
Enumerator
Open 

The standard open() call: int open(const char *path, int oflag, ...);.

OpenAt 

The variant taking a directory file descriptor and a relative path: int openat(int fd, const char *path, int oflag, ...);.

Definition at line 33 of file UnixAPIChecker.cpp.

Function Documentation

◆ IsZeroByteAllocation()

static bool IsZeroByteAllocation ( ProgramStateRef  state,
const SVal  argVal,
ProgramStateRef trueState,
ProgramStateRef falseState 
)
static

Definition at line 449 of file UnixAPIChecker.cpp.

References clang::ento::SVal::castAs().