clang  9.0.0svn
Macros | Enumerations | Functions
UnixAPIChecker.cpp File Reference
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
#include "clang/Basic/TargetInfo.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/CheckerContext.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for UnixAPIChecker.cpp:

Go to the source code of this file.

Macros

#define REGISTER_CHECKER(CHECKERNAME)
 

Enumerations

enum  OpenVariant { OpenVariant::Open, OpenVariant::OpenAt }
 

Functions

static void LazyInitialize (const CheckerBase *Checker, std::unique_ptr< BugType > &BT, const char *name)
 
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 LangOptions &LO) { \
return true; \
}
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:49

Definition at line 499 of file UnixAPIChecker.cpp.

Enumeration Type Documentation

◆ OpenVariant

enum 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 28 of file UnixAPIChecker.cpp.

Function Documentation

◆ IsZeroByteAllocation()

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

Definition at line 322 of file UnixAPIChecker.cpp.

References LazyInitialize().

◆ LazyInitialize()

static void LazyInitialize ( const CheckerBase *  Checker,
std::unique_ptr< BugType > &  BT,
const char *  name 
)
static