clang 20.0.0git
Macros | Functions
CStringChecker.cpp File Reference
#include "InterCheckerAPI.h"
#include "clang/AST/OperationKinds.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/CharInfo.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/CallDescription.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicExtent.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/SVals.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/raw_ostream.h"
#include <functional>
#include <optional>

Go to the source code of this file.

Macros

#define REGISTER_CHECKER(name)
 

Functions

static std::optional< NonLocgetIndex (ProgramStateRef State, const ElementRegion *ER, CharKind CK)
 
static void printIdxWithOrdinalSuffix (llvm::raw_ostream &Os, unsigned Idx)
 

Macro Definition Documentation

◆ REGISTER_CHECKER

#define REGISTER_CHECKER (   name)
Value:
void ento::register##name(CheckerManager &mgr) { \
CStringChecker *checker = mgr.getChecker<CStringChecker>(); \
checker->Filter.Check##name = true; \
checker->Filter.CheckName##name = mgr.getCurrentCheckerName(); \
} \
\
bool ento::shouldRegister##name(const CheckerManager &mgr) { return true; }
CheckerNameRef getCurrentCheckerName() const

Definition at line 2844 of file CStringChecker.cpp.

Function Documentation

◆ getIndex()

static std::optional< NonLoc > getIndex ( ProgramStateRef  State,
const ElementRegion ER,
CharKind  CK 
)
static

◆ printIdxWithOrdinalSuffix()

static void printIdxWithOrdinalSuffix ( llvm::raw_ostream &  Os,
unsigned  Idx 
)
static

Definition at line 431 of file CStringChecker.cpp.