clang 18.0.0git
Classes | Functions
UninitializedPointee.cpp File Reference
#include "UninitializedObject.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/DynamicType.h"
#include <optional>

Go to the source code of this file.

Classes

struct  DereferenceInfo
 

Functions

static std::optional< DereferenceInfodereference (ProgramStateRef State, const FieldRegion *FR)
 Dereferences FR and returns with the pointee's region, and whether it needs to be casted back to it's location type.
 
static bool isVoidPointer (QualType T)
 Returns whether T can be (transitively) dereferenced to a void pointer type (void*, void**, ...).
 

Function Documentation

◆ dereference()

static std::optional< DereferenceInfo > dereference ( ProgramStateRef  State,
const FieldRegion FR 
)
static

◆ isVoidPointer()

static bool isVoidPointer ( QualType  T)
static

Returns whether T can be (transitively) dereferenced to a void pointer type (void*, void**, ...).

Definition at line 274 of file UninitializedPointee.cpp.

References clang::Type::getPointeeType(), clang::QualType::isNull(), and clang::Type::isVoidPointerType().

Referenced by dereference().